This paper presents two independent contributions for Apache Pulsar practitioners. First, we validate 1,499,947 msg/s at 3.88 ms median publish latency on just three bare-metal Kubernetes nodes running Pulsar 4.0.8 with Java 21 and ZGC Generational garbage collection, and project a hardware-driven path to 15 million msg/s on 15 machines using five independent clusters with key-based partition routing. Hardware selection -- specifically dedicated NVMe journals achieving 0.02 ms fdatasync and 25 Gbps network interfaces -- is the primary determinant of throughput ceiling, not compute or software tuning. Second, we trace the complete latency optimization journey from 213 ms GC spikes and 13-18 ms median publish latency in production to 3.88 ms through Java Flight Recorder guided root cause analysis. Three independent root causes are identified and resolved: G1GC pauses eliminated by switching to ZGC Generational; journal fdatasync latency reduced from 5.1 ms to 0.02 ms through NVMe journal dedication; and a previously undocumented Linux kernel page cache writeback interaction inside BookKeeper's ForceWriteThread that degrades fdatasync from under 1 ms to 15-22 ms even across physically separate NVMe drives sharing the kernel block layer. This finding is undocumented in official Apache Pulsar and BookKeeper documentation and is relevant to all Pulsar operators experiencing unexplained P99.9 latency spikes. The combined optimizations achieve a 4.7x latency improvement at 50x higher throughput.


翻译:本文为Apache Pulsar实践者提供两项独立贡献。首先,我们在仅三台裸机Kubernetes节点上运行Pulsar 4.0.8(Java 21 + ZGC分代垃圾回收),验证了每秒1,499,947条消息的吞吐量,其中位发布延迟为3.88毫秒;并基于硬件驱动路径预测,通过五个独立集群配合基于键的分区路由,可在15台机器上实现每秒1500万条消息。硬件选型——特别是实现0.02毫秒fdatasync的专用NVMe日志和25 Gbps网络接口——是吞吐量上限的主要决定因素,而非计算或软件调优。其次,我们完整追溯了延迟优化历程:从生产环境中213毫秒的GC尖峰和13-18毫秒的中位发布延迟,通过Java飞行记录器引导的根因分析,最终降至3.88毫秒。识别并解决了三个独立根因:通过切换至ZGC分代消除G1GC暂停;通过NVMe日志专用化将fdatasync延迟从5.1毫秒降至0.02毫秒;以及一个此前未记录的Linux内核页面缓存回写交互问题(位于BookKeeper的ForceWriteThread内部),该问题即使在使用共享内核块层的物理隔离NVMe驱动器时,也会将fdatasync延迟从1毫秒以下劣化至15-22毫秒。这一发现未记录在官方Apache Pulsar和BookKeeper文档中,对所有遭遇不明P99.9延迟尖峰的Pulsar运维人员具有参考价值。综合优化在50倍吞吐量提升下实现了4.7倍的延迟改善。

0
下载
关闭预览

相关内容

Apache 是一个开放源代码的网页服务器,可以在大多数电脑操作系统中运行,由于其跨平台和安全性被广泛使用,是最流行的 Web 服务器端软件之一。 同时 Apache 也是一个专门为支持开源软件项目而办的一个非盈利性组织。
【2021新书】ApachePulsar 实战,402页pdf
专知会员服务
73+阅读 · 2021年12月29日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
Github 项目推荐 | YOLOv3 的最小化 PyTorch 实现
AI研习社
25+阅读 · 2018年5月31日
今日头条推荐系统架构演进之路
QCon
32+阅读 · 2017年6月21日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
BES:让语言模型通过双向进化搜索自我改进
专知会员服务
3+阅读 · 5月30日
以色列-美国-伊朗战争中的无人机:关键要点
专知会员服务
4+阅读 · 5月30日
《Palantir任务保障性软件安全标准(MA-S2)》
专知会员服务
10+阅读 · 5月30日
基于声学的无人机检测技术综述
专知会员服务
7+阅读 · 5月30日
《当代混合战争分析框架:俄乌战争经验教训》
战略前沿人工智能的再思考(中文)
专知会员服务
8+阅读 · 5月29日
《量化地基防空系统间接效应的博弈论方法》
专知会员服务
6+阅读 · 5月29日
相关VIP内容
【2021新书】ApachePulsar 实战,402页pdf
专知会员服务
73+阅读 · 2021年12月29日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员