测试环境:CentOS6.7-x86_64 虚拟机(4核,2G内存)
测试代码:1. smart/test/examples/throughput/
2. smart/test/examples/tpsclient/ --单链接
3. smart/test/examples/concurrence/ --并发多链接
[jackhen@192.168.4.117 bin_d]$ ./tpsserver_d //服务端
start tpsserver listen at[0.0.0.0:8800], listenfd=[4]
一、单链接
[jackhen@192.168.4.117 bin_d]$ ./tpsclient_d
Usage: ./tpsclient_d server_ip server_port block_size
[jackhen@192.168.4.117 bin_d]$ ./tpsclient_d 127.0.0.1 8800 16000
s
[jackhen@192.168.4.117 bin_d]$ ./tpsserver_d
start tpsserver listen at[0.0.0.0:8800], listenfd=[4]
TPS: 63.406372 MB/s
TPS: 64.233398 MB/s
TPS: 64.526367 MB/s
TPS: 66.513062 MB/s
TPS: 64.675903 MB/s
TPS: 64.511108 MB/s
TPS: 63.702393 MB/s
TPS: 64.840698 MB/s
TPS: 63.598633 MB/s
二、100个并发链接
[jackhen@192.168.4.117 bin_d]$ ./conclient_d
Usage: ./conclient_d server_ip server_port block_size [g_con_counts]
[jackhen@192.168.4.117 bin_d]$ ./conclient_d 127.0.0.1 8800 16000 100
// 100个并发链接,每个链接16000字节ping-pong测试
[jackhen@192.168.4.117 bin_d]$ ./conclient_d
Usage: ./conclient_d server_ip server_port block_size [g_con_counts]
[jackhen@192.168.4.117 bin_d]$ ./conclient_d 127.0.0.1 8800 16000 100
TPS: 760.052490 MB/s
TPS: 752.410889 MB/s
TPS: 750.952148 MB/s
TPS: 654.446411 MB/s
TPS: 645.294189 MB/s
TPS: 660.311890 MB/s
TPS: 662.033081 MB/s
TPS: 668.609619 MB/s
TPS: 656.381226 MB/s
TPS: 651.461792 MB/s
TPS: 665.548706 MB/s
==============================================================================
8核8G --32位物理机 测试
==============================================================================
32核128G --64位物理机 测试