(资料图片)
周末在家学习kafka 上午验证了grafana+kafka_exporter的监控下午想着验证一把性能相关. kafka学习之三里面,有成套的脚本. 我这边想起来之前还有一个机器, 是四个单盘HDD, 我可以直接进行使用和验证.
计划创建四个partition的topic进行测试首先仅使用第一个磁盘进行验证测试完删除掉, 重新初始化, log,dirs 增加多个分区的的挂载路径. 然后进行相关的测试验证
自己尝试进行了一些验证. 发现1块磁盘和四块磁盘, 如果使用一个producer-perf 进行测试时, 测试结果差异性不是很大. 可能跟CPU和磁盘的性能压力都有关系. 如果开启多个topic, 同时使用多个 producer-perf进行测试时. 总体的吞吐量, 四块硬盘比一块硬盘大约高50%压测的通知开启 iostat 验证单盘时压力都在 sdc 上面四块盘时 压力其实不是非常平均, 这也是造成压测结果不是线性提升的很大原因. 单盘时四个topic 同时压测.总计为: 96.99四盘时四个topic 同时压测.总计为: 140.78总体的性能比率为: 45%
/dev/sdc ext4 1.8T 539G 1.2T 31% /hdd1/dev/sdf xfs 1.9T 4.6G 1.9T 1% /hdd4/dev/sde xfs 1.9T 1.9G 1.9T 1% /hdd3/dev/sdd xfs 1.9T 380G 1.5T 21% /hdd2
第一次测试时:log.dirs=/hdd1/kafkahdd第二次测试时log.dirs=/hdd1/kafkahdd2,/hdd2/kafkahdd2,/hdd3/kafkahdd2,/hdd4/kafkahdd2注意: 如果是四个目录时 会这样:Formatting /hdd1/kafkahdd2 with metadata.version 3.5-IV2.Formatting /hdd2/kafkahdd2 with metadata.version 3.5-IV2.Formatting /hdd3/kafkahdd2 with metadata.version 3.5-IV2.Formatting /hdd4/kafkahdd2 with metadata.version 3.5-IV2.
cd /root/kafka_2.13-3.5.0bin/kafka-server-stop.sh config/kraft/server.propertiesbin/kafka-storage.sh format -t 7ONT3dn3RWWNCZyIwLrEqg -c config/kraft/server.propertiesbin/kafka-server-start.sh -daemon config/kraft/server.propertiesbin/kafka-topics.sh --create --command-config config/sasl.conf --replication-factor 1 --partitions 4 --topic zhaobsh01 --bootstrap-server 127.0.0.1:9093
# 生产者测试bin/kafka-producer-perf-test.sh --num-records 200000 --record-size 1024 --throughput -1 --producer.config config/sasl.conf --topic zhaobsh01 --print-metrics --producer-props bootstrap.servers=127.0.0.1:9093# 单盘时的测试结果200000 records sent, 36812.074360 records/sec (35.95 MB/sec), 638.59 ms avg latency, 950.00 ms max latency, 680 ms 50th, 899 ms 95th, 937 ms 99th, 946 ms 99.9th.# 四盘时的测试结果200000 records sent, 36172.906493 records/sec (35.33 MB/sec), 646.08 ms avg latency, 971.00 ms max latency, 705 ms 50th, 909 ms 95th, 952 ms 99th, 968 ms 99.9th.# 消费者测试bin/kafka-consumer-perf-test.sh --fetch-size 10000 --messages 2000000 --topic zhaobsh01 --consumer.config config/sasl.conf --print-metrics --bootstrap-server 127.0.0.1:9093# 单盘时的测试结果2023-06-24 14:03:49:723, 2023-06-24 14:04:13:453, 195.3125, 8.2306, 200000, 8428.1500, 4282, 19448, 10.0428, 10283.8338# 四盘时的测试结果2023-06-24 14:14:20:733, 2023-06-24 14:14:44:324, 195.3125, 8.2791, 200000, 8477.8093, 4889, 18702, 10.4434, 10694.0434# 增加四盘时 增加io_threads 到16, network到6 # 生产者测试200000 records sent, 37622.272385 records/sec (36.74 MB/sec), 589.76 ms avg latency, 889.00 ms max latency, 587 ms 50th, 843 ms 95th, 876 ms 99th, 885 ms 99.9th.# 消费者测试2023-06-24 14:25:03:258, 2023-06-24 14:25:26:604, 195.3125, 8.3660, 200000, 8566.7780, 3779, 19567, 9.9817, 10221.2909
# 单一磁盘时grep -ir "200000 records sent"1.txt:200000 records sent, 24573.043371 records/sec (24.00 MB/sec), 977.14 ms avg latency, 1330.00 ms max latency, 995 ms 50th, 1263 ms 95th, 1313 ms 99th, 1324 ms 99.9th.2.txt:200000 records sent, 24919.013207 records/sec (24.33 MB/sec), 966.64 ms avg latency, 1309.00 ms max latency, 1001 ms 50th, 1247 ms 95th, 1289 ms 99th, 1304 ms 99.9th.3.txt:200000 records sent, 24479.804162 records/sec (23.91 MB/sec), 940.11 ms avg latency, 1281.00 ms max latency, 992 ms 50th, 1244 ms 95th, 1268 ms 99th, 1276 ms 99.9th.4.txt:200000 records sent, 25348.542459 records/sec (24.75 MB/sec), 847.37 ms avg latency, 1425.00 ms max latency, 821 ms 50th, 1274 ms 95th, 1328 ms 99th, 1335 ms 99.9th.# 四块磁盘时grep -ir "200000 records sent"1.txt:200000 records sent, 38044.512079 records/sec (37.15 MB/sec), 545.91 ms avg latency, 895.00 ms max latency, 572 ms 50th, 653 ms 95th, 663 ms 99th, 667 ms 99.9th.2.txt:200000 records sent, 34668.053389 records/sec (33.86 MB/sec), 621.67 ms avg latency, 868.00 ms max latency, 658 ms 50th, 810 ms 95th, 847 ms 99th, 851 ms 99.9th.3.txt:200000 records sent, 37383.177570 records/sec (36.51 MB/sec), 584.06 ms avg latency, 828.00 ms max latency, 594 ms 50th, 747 ms 95th, 761 ms 99th, 767 ms 99.9th.4.txt:200000 records sent, 34059.945504 records/sec (33.26 MB/sec), 562.29 ms avg latency, 1297.00 ms max latency, 566 ms 50th, 796 ms 95th, 808 ms 99th, 812 ms 99.9th.
# 单一磁盘时grep -ir "800000 records sent"1.txt:800000 records sent, 42413.317782 records/sec (41.42 MB/sec), 617.73 ms avg latency, 1633.00 ms max latency, 574 ms 50th, 926 ms 95th, 1613 ms 99th, 1630 ms 99.9th.2.txt:800000 records sent, 42753.313382 records/sec (41.75 MB/sec), 619.57 ms avg latency, 1315.00 ms max latency, 586 ms 50th, 939 ms 95th, 1301 ms 99th, 1310 ms 99.9th.3.txt:800000 records sent, 45300.113250 records/sec (44.24 MB/sec), 571.20 ms avg latency, 1321.00 ms max latency, 564 ms 50th, 841 ms 95th, 1299 ms 99th, 1315 ms 99.9th.4.txt:800000 records sent, 43773.254541 records/sec (42.75 MB/sec), 596.18 ms avg latency, 1329.00 ms max latency, 570 ms 50th, 931 ms 95th, 1320 ms 99th, 1326 ms 99.9th.# 四块磁盘时grep -ir "800000 records sent"1.txt:800000 records sent, 47292.504138 records/sec (46.18 MB/sec), 571.88 ms avg latency, 924.00 ms max latency, 580 ms 50th, 814 ms 95th, 900 ms 99th, 918 ms 99.9th.2.txt:800000 records sent, 46794.571830 records/sec (45.70 MB/sec), 551.35 ms avg latency, 1138.00 ms max latency, 510 ms 50th, 925 ms 95th, 1102 ms 99th, 1130 ms 99.9th.3.txt:800000 records sent, 47092.064987 records/sec (45.99 MB/sec), 568.98 ms avg latency, 1095.00 ms max latency, 534 ms 50th, 862 ms 95th, 998 ms 99th, 1083 ms 99.9th.4.txt:800000 records sent, 46114.825917 records/sec (45.03 MB/sec), 459.42 ms avg latency, 1374.00 ms max latency, 452 ms 50th, 959 ms 95th, 992 ms 99th, 1009 ms 99.9th.
bin/kafka-topics.sh --create --command-config config/sasl.conf --replication-factor 1 --partitions 4 --topic zhaobsh02 --bootstrap-server 127.0.0.1:9093 bin/kafka-topics.sh --create --command-config config/sasl.conf --replication-factor 1 --partitions 4 --topic zhaobsh03 --bootstrap-server 127.0.0.1:9093 bin/kafka-topics.sh --create --command-config config/sasl.conf --replication-factor 1 --partitions 4 --topic zhaobsh04 --bootstrap-server 127.0.0.1:9093 bin/kafka-topics.sh --create --command-config config/sasl.conf --replication-factor 1 --partitions 4 --topic zhaobsh05 --bootstrap-server 127.0.0.1:9093nohup bin/kafka-producer-perf-test.sh --num-records 800000 --record-size 1024 --throughput -1 --producer.config config/sasl.conf --topic zhaobsh02 --print-metrics --producer-props bootstrap.servers=127.0.0.1:9093 >log/1.txt &nohup bin/kafka-producer-perf-test.sh --num-records 800000 --record-size 1024 --throughput -1 --producer.config config/sasl.conf --topic zhaobsh03 --print-metrics --producer-props bootstrap.servers=127.0.0.1:9093 >log/2.txt &nohup bin/kafka-producer-perf-test.sh --num-records 800000 --record-size 1024 --throughput -1 --producer.config config/sasl.conf --topic zhaobsh04 --print-metrics --producer-props bootstrap.servers=127.0.0.1:9093 >log/3.txt &nohup bin/kafka-producer-perf-test.sh --num-records 800000 --record-size 1024 --throughput -1 --producer.config config/sasl.conf --topic zhaobsh05 --print-metrics --producer-props bootstrap.servers=127.0.0.1:9093 >log/4.txt &grep -ir "800000 records sent"
标签:
kafka学习之五_多个磁盘的性能验证 背景```周末在家学习kafka上午验
第54届巴黎国际航空航天展览会目前正在进行中,航展上的新型交通工具也
早上在苏州等一碗热乎的头汤面中午在阳澄湖来一顿大快朵颐的大闸蟹晚上
原标题:公众希望走出游园活动同质化,上海各公园正探索更多元服务(引
央视网消息(新闻联播):传统文化,创新表达。今年端午节,各地的端午
1、没有叫过任何前缀的印象毕竟双鬼戏份不多……感觉应该是队长吧,这
地产市场的疲软仍在延续。作为河南本土地产大鳄,建业集团旗下地产板块
6月20日上午,韩国知名设计师、国际手绘大师石上源(SangwonSeok)应邀
女子买房在郑州某银行存40多万,银行数了数去竟少了两千块!河南郑州某
1、百日誓师大会主持词老师,同学们,你们好:男:春回大地,万物吐生
今日马刺名宿托尼-帕克接受媒体采访时谈到了马刺状元文班亚马。当被问
1、抗浪鱼(国家二级保护动物)学名:Schizothoraxtaliensis原名鱇浪白鱼
白玉兰红毯:赵丽颖秀美背,殷桃好身材,秦岚太拼了,谭卓穿的啥,殷桃,
您好,现在蔡蔡来为大家解答以上的问题。word2007无法插入页码,word200
1、真品特征: (1)商标。2、上海自行车三厂生产的“凤凰”牌自
当我们处于焦虑、愤怒和压力等负面状态时,我们就难以感受到周围的美好
1、hotel,英文单词,主要作为名词。2、作名词时意为“旅馆;酒吧;餐
在开始游戏前,有几点《IGI—2》的游戏经验之谈想特别提示大家。如果你
根据TheAthletic权威记者ShamsCharania的爆料,今年NBA选秀大会中的落
win10用户在使用电脑的时候遇到了显示屏有黑边、无法全屏的情况,怎么
近日,智己品牌旗下的全新中型纯电SUV——LS6的申报信息被曝光,从信息
蓝色基本贯穿了当年的流行色,或干净活泼,或热烈明快,或充满浪漫文
猛龙GM:在今天的对话中向上交易的询问要多于向下交易,交易,迪克,韦伯
数据孤岛一直是商业健康险主要痛点之一。目前,商业健康险信息与医保信
深夜里,因12元打车费如何支付引发了一场纠纷,出租车司机也为此遭受殴
广大乘客朋友: 一年一度的中考即将来临,根据上级部门全力助力
6月23日,生意社硫酸铵基准价为696 67元 吨,与本月初(783 33元 吨)相
1、疾病分析:吃一个完整的榴莲肯定会长胖。2、这是因为榴莲的热量很高
1 手竿手竿是指在竿子末端装线进行近距离垂钓的手持式钓竿。手竿的可钓
中国青年报客户端北京6月22日电(中青报·中青网见习记者赵丽梅)记者
Copyright © 2015-2022 青年服装网版权所有 备案号:皖ICP备2022009963号-20 联系邮箱:39 60 291 42@qq.com