我在一个16核虚拟机上的测试结果和您测试的结果相差很大。
hjianhao opened this issue · comments
Jason Huang commented
测试default,10ms
./wrk -t16 -c500 -d30s http://127.0.0.1:9000/hello
Running 30s test @ http://127.0.0.1:9000/hello
16 threads and 500 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 10.48ms 593.22us 20.03ms 94.04%
Req/Sec 2.97k 71.19 3.13k 71.33%
1419118 requests in 30.04s, 173.23MB read
Requests/sec: 47247.64
Transfer/sec: 5.77MB
看你主页的结果,500 connection的结果在40w左右。 差距有些太大了。 您调整了什么网络相关的参数吗?
而且我发现16个核,平均每个核的CPU占用也就在5%左右,压不上去。
smallnest commented
测试环境进行了调优:
可以参照
http://colobu.com/2014/09/18/linux-tcpip-tuning/?from=groupmessage&isappinstalled=0
还有 可打开文件数要设的足够大,我直接设成10万