正文
WorkStation的网络损耗
背景
对周六遇到的问题进行了一下深入思考.
发现虽然可以通过WorkStation的方式来进行Clients以及新命令的扩容.
但是Workstation的桥接网络模式的性能不清楚有多大的损耗.
为了房子性能出现巨大的衰退.
这边进行了一下简要的测试与验证.
结论
Windows物理机 本地进行测试和使用linux远程测试 3.2.100 的QPS 都在 24000 左右.
比较稳定, linux上面的测试结果甚至要比 Windows本地测试的要稍微高一点
但是 Windows 上面的 WorkStation虚拟机就就存在问题.
虚拟机内直接的测试结果是 35000左右
在虚拟机外部使用桥接网络测试的结果只有 10000多一点.
桥接网络导致redis的QPS只有实际值的三分之一, 也只有Windows 上面 3.2.100 的 一半.
感觉桥接网络导致了非常大的性能损耗.
在远程的测试结果
PING_INLINE: 10070.49 requests per second, p50=1.935 msec
PING_MBULK: 10324.18 requests per second, p50=1.903 msec
SET: 10163.63 requests per second, p50=1.943 msec
GET: 10234.37 requests per second, p50=1.919 msec
INCR: 10114.29 requests per second, p50=1.935 msec
LPUSH: 9981.04 requests per second, p50=1.951 msec
RPUSH: 9984.03 requests per second, p50=1.967 msec
LPOP: 4917.63 requests per second, p50=2.015 msec
RPOP: 10145.07 requests per second, p50=1.935 msec
SADD: 11287.96 requests per second, p50=1.703 msec
HSET: 10566.36 requests per second, p50=1.911 msec
SPOP: 9944.31 requests per second, p50=1.951 msec
ZADD: 9992.01 requests per second, p50=1.967 msec
ZPOPMIN: 10371.29 requests per second, p50=1.887 msec
LPUSH (needed to benchmark LRANGE): 10228.09 requests per second, p50=1.919 msec
LRANGE_100 (first 100 elements): 8338.89 requests per second, p50=2.263 msec
LRANGE_300 (first 300 elements): 5620.19 requests per second, p50=3.255 msec
LRANGE_500 (first 500 elements): 4011.55 requests per second, p50=4.623 msec
LRANGE_600 (first 600 elements): 3725.37 requests per second, p50=4.991 msec
MSET (10 keys): 8932.56 requests per second, p50=2.079 msec
在本地的测试结果
PING_INLINE: 35714.29 requests per second, p50=0.287 msec
PING_MBULK: 35285.81 requests per second, p50=0.295 msec
SET: 35599.86 requests per second, p50=0.311 msec
GET: 35958.29 requests per second, p50=0.303 msec
INCR: 35958.29 requests per second, p50=0.303 msec
LPUSH: 35001.75 requests per second, p50=0.327 msec
RPUSH: 34734.29 requests per second, p50=0.319 msec
LPOP: 35523.98 requests per second, p50=0.327 msec
RPOP: 34940.60 requests per second, p50=0.319 msec
SADD: 35498.76 requests per second, p50=0.311 msec
HSET: 34364.26 requests per second, p50=0.319 msec
SPOP: 35816.62 requests per second, p50=0.303 msec
ZADD: 34411.56 requests per second, p50=0.335 msec
ZPOPMIN: 35211.27 requests per second, p50=0.303 msec
LPUSH (needed to benchmark LRANGE): 34566.20 requests per second, p50=0.319 msec
LRANGE_100 (first 100 elements): 22784.23 requests per second, p50=0.455 msec
LRANGE_300 (first 300 elements): 9814.51 requests per second, p50=1.031 msec
LRANGE_500 (first 500 elements): 6954.59 requests per second, p50=1.447 msec
LRANGE_600 (first 600 elements): 5993.41 requests per second, p50=1.671 msec
MSET (10 keys): 35100.04 requests per second, p50=0.391 msec
Windows 本地Redis3.2.100的测试结果
PING_INLINE: 22296.54 requests per second
PING_BULK: 22872.83 requests per second
SET: 22967.39 requests per second
GET: 23380.88 requests per second
INCR: 22246.94 requests per second
LPUSH: 23375.41 requests per second
RPUSH: 22862.37 requests per second
LPOP: 23239.60 requests per second
RPOP: 22794.62 requests per second
SADD: 23299.16 requests per second
SPOP: 23062.73 requests per second
LPUSH (needed to benchmark LRANGE): 23272.05 requests per second
LRANGE_100 (first 100 elements): 12515.64 requests per second
LRANGE_300 (first 300 elements): 7000.84 requests per second
LRANGE_500 (first 450 elements): 5093.21 requests per second
LRANGE_600 (first 600 elements): 4213.72 requests per second
MSET (10 keys): 19845.21 requests per second
Windows 远程测试结果
PING_INLINE: 21422.45 requests per second, p50=0.863 msec
PING_MBULK: 24348.67 requests per second, p50=0.759 msec
SET: 25201.61 requests per second, p50=0.743 msec
GET: 25933.61 requests per second, p50=0.719 msec
INCR: 26034.89 requests per second, p50=0.719 msec
LPUSH: 26581.61 requests per second, p50=0.703 msec
RPUSH: 24888.00 requests per second, p50=0.751 msec
LPOP: 25542.79 requests per second, p50=0.735 msec
RPOP: 25406.50 requests per second, p50=0.735 msec
SADD: 25621.32 requests per second, p50=0.735 msec
HSET: 25733.40 requests per second, p50=0.727 msec
SPOP: 25879.92 requests per second, p50=0.727 msec
ZADD: 25859.84 requests per second, p50=0.727 msec