phxqueue icon indicating copy to clipboard operation
phxqueue copied to clipboard

bin/producer_benchmark_main用这个测试用例,100个paxos group,100个queue性能测试结果与公众号给出的相差很大?

Open liuliuwd opened this issue 7 years ago • 14 comments

liuliuwd avatar Oct 19 '17 11:10 liuliuwd

测试机器: 32核cpu 128G内存 ssd硬盘

liuliuwd avatar Oct 20 '17 08:10 liuliuwd

你好,你所使用的bin/producer_benchmark_main 参数是什么? 可以试试 bin/producer_benchmark_main 20000 50 100 1000,并且在多台client机器上执行多个实例。单个bin/producer_benchmark_main实例是跑不到上限的。

unixliang avatar Oct 23 '17 02:10 unixliang

谢谢解答我的问题。我试了下你提供的参数,总qps只提升了几百,最高到8.3W左右,还是相差较大。producer_benchmark_main这个测试实例好像不是批量发送,怎么打开批量发送呢?

liuliuwd avatar Oct 23 '17 11:10 liuliuwd

批量发送可以试试 bin/producer_benchmark_main 2000000 100 500 10 2 * 4

unixliang avatar Oct 23 '17 13:10 unixliang

目前在你的压测环境中瓶颈在哪?cpu?IO?

unixliang avatar Oct 23 '17 13:10 unixliang

多谢指导。用bin/producer_benchmark_main 2000000 100 500 10 2*4这个跑,单client实例qps能到8W左右,三台机器三个client实例压时,每个实例qps只能到1.5W,cpu不高,负载快到80,iowait快到30。另外,默认store集群中有100个paxos group,但是测试时25个queue左右qps最高,100个queue qps并不高。

liuliuwd avatar Oct 23 '17 16:10 liuliuwd

从你提供的数据看,cpu/io并不是瓶颈。 网卡是千兆还是万兆?如果是千兆的话,buf为1k,网卡会成为瓶颈,这时建议改buf为10字节,可以 bin/producer_benchmark_main 20000 100 200 10 开多个实例。 另外建议截图贴一下 producer_benchmark_main 的标准输出。

unixliang avatar Oct 24 '17 01:10 unixliang

是千兆网卡。 参数一:bin/producer_benchmark_main 20000 100 200 10 ndaemon_batch_thread 0 qps: 20000 nthread: 100 nroutine: 200 routine_sleep_time(ms): 1000 start run...


-- total: 17181 -- time(ms): 10000 -- qps: 1718.10 -- routine_sleep: 72.35% -- retcode cnt percent -- 0 16867 98.17 -- 10102 314 1.83 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 0 0.00 -- < 5 0 0.00 -- < 10 0 0.00 -- < 20 0 0.00 -- < 50 30 0.17 -- < 100 125 0.73 -- < 200 171 1.00 -- < 500 2475 14.41 -- < 1000 11002 64.04 -- >= 1000 3378 19.66 -- avg_usetime(ms): 1508.35


-- total: 28519 -- time(ms): 10001 -- qps: 2851.61 -- routine_sleep: 62.61% -- retcode cnt percent -- -1 8903 31.22 -- 0 17685 62.01 -- 10102 1931 6.77 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 0 0.00 -- < 5 0 0.00 -- < 10 0 0.00 -- < 20 0 0.00 -- < 50 0 0.00 -- < 100 0 0.00 -- < 200 0 0.00 -- < 500 3446 12.08 -- < 1000 10486 36.77 -- >= 1000 14587 51.15 -- avg_usetime(ms): 7195.67

liuliuwd avatar Oct 24 '17 03:10 liuliuwd

参数二:bin/producer_benchmark_main 2000000 100 500 10 2 *1 ndaemon_batch_thread 2 qps: 2000000 nthread: 100 nroutine: 500 routine_sleep_time(ms): 25 start run...


-- total: 642468 -- time(ms): 10000 -- qps: 64246.80 -- routine_sleep: 13.53% -- retcode cnt percent -- 0 638041 99.31 -- 10102 4427 0.69 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 13 0.00 -- < 5 913 0.14 -- < 10 4874 0.76 -- < 20 26142 4.07 -- < 50 86855 13.52 -- < 100 11723 1.82 -- < 200 16420 2.56 -- < 500 274513 42.73 -- < 1000 198268 30.86 -- >= 1000 22747 3.54 -- avg_usetime(ms): 541.35


-- total: 813136 -- time(ms): 10021 -- qps: 81143.20 -- routine_sleep: 11.15% -- retcode cnt percent -- -1 1226 0.15 -- 0 806224 99.15 -- 10102 5686 0.70 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 31 0.00 -- < 5 1526 0.19 -- < 10 11495 1.41 -- < 20 55647 6.84 -- < 50 176535 21.71 -- < 100 3796 0.47 -- < 200 120031 14.76 -- < 500 184494 22.69 -- < 1000 219397 26.98 -- >= 1000 40184 4.94 -- avg_usetime(ms): 583.07

liuliuwd avatar Oct 24 '17 03:10 liuliuwd

参数三:bin/producer_benchmark_main 2000000 100 500 10 2 *3 ndaemon_batch_thread 2 qps: 2000000 nthread: 100 nroutine: 500 routine_sleep_time(ms): 25 start run...


-- total: 80378 -- time(ms): 10000 -- qps: 8037.80 -- routine_sleep: 32.08% -- retcode cnt percent -- 0 74765 93.02 -- 10102 5613 6.98 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 0 0.00 -- < 5 0 0.00 -- < 10 0 0.00 -- < 20 0 0.00 -- < 50 0 0.00 -- < 100 0 0.00 -- < 200 0 0.00 -- < 500 1514 1.88 -- < 1000 46418 57.75 -- >= 1000 32446 40.37 -- avg_usetime(ms): 1894.93


-- total: 88316 -- time(ms): 10007 -- qps: 8825.42 -- routine_sleep: 25.11% -- retcode cnt percent -- -1 21517 24.36 -- 0 59708 67.61 -- 10102 7091 8.03 -- usetime(ms) cnt percent -- < 1 0 0.00 -- < 2 0 0.00 -- < 5 0 0.00 -- < 10 0 0.00 -- < 20 0 0.00 -- < 50 0 0.00 -- < 100 0 0.00 -- < 200 0 0.00 -- < 500 685 0.78 -- < 1000 45793 51.85 -- >= 1000 41838 47.37 -- avg_usetime(ms): 5815.40

liuliuwd avatar Oct 24 '17 03:10 liuliuwd

@unixliang 可以留个邮箱咨询下吗

liuliuwd avatar Oct 27 '17 06:10 liuliuwd

不好意思,回复晚了。我看到你上面贴的这个耗时是有问题的,应该有其它瓶颈,建议细聊。 我的邮箱是 [email protected]

unixliang avatar Oct 27 '17 06:10 unixliang

同步进展:与 @liuliuwd 一起排除了以下问题,目前压满了千兆网卡。

  1. 数据的写盘位置不在SSD上;
  2. 如下调大并发:

改etc/store_server.conf:

MaxThreads = 7200
IOThreadCount = 12

改etc/topicconfig.conf:

"ranges": ["0-99"]

unixliang avatar Nov 01 '17 01:11 unixliang

感谢@unixliang支持

liuliuwd avatar Nov 02 '17 03:11 liuliuwd