机器 | 规格 | 参数 |
---|---|---|
camellia-redis-proxy-async | 4C8G云主机 | -Xms4096m -Xmx4096m -XX:+UseG1GC |
redis cluster | Intel(R)Xeon(R)[email protected] 40核 | 单机混部 |
压测机 | Intel(R)Xeon(R)[email protected] 40核 |
- 在相同redis集群下
- 单redis、3主3从:1.0.9_disruptor版本TPS最优;
- 15主15从:1.0.9_none_queue版本TPS最优;
- TPS最优:3主3从_1.0.9_none_queue版本TPS最优;
- 在相同redis集群下
- 单redis:1.0.8版本TPS最优;
- 3主3从、15主15从:1.0.9_none_queue版本TPS最优;
- 相同版本下,redis节点数量越多指令性能越差;
- TPS最优:单redis_1.0.8版本TPS最优;
- 在相同redis集群下
- 单redis、3主3从:1.0.9_disruptor版本TPS最优;
- 15主15从:1.0.9_none_queue版本TPS最优;
- 相同版本下,redis节点数量越多指令性能越差;
- TPS最优:单redis_1.0.9_disruptor版本TPS最优;
- 在相同redis集群下
- 单redis、3主3从、15主15从:1.0.9_none_queue版本TPS最优;
- 相同版本下,redis节点数量越多指令性能越差;
- TPS最优:单redis_1.0.9_none_queue版本TPS最优;
-
proxy实现是将mget的key数组拆分然后路由到对应redis节点用get指令获取数据,这个指令的性能比代理到单点redis差太多,只进行多集群对比;
-
在相同redis集群下
-
单redis、3主3从、15主15从:1.0.9_disruptor版本TPS最优;
-
相同版本下,redis节点数量越多指令性能越差;
-
PS:由于对比的维度过多,具体选择集群可以根据测试数据进行对比选择;
-
场景说明:压测端固定为32并发,使用jedis作为客户端
-
setex指令(key长度=20字符,value长度=30字符)
配置 | 版本 | 场景 | 参数tps | mrt | proxy-cpu | inbps | outbps | redis-qps | redis-cpu | 同一集群和1.0.8版本tps提升比 | 同一集群和1.0.8版本对比proxy-cpu增长量 | 和单redis对应版本对比TPS提升比 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
单redis | 1.0.8 | setex | 54976 | 0.55 | 71% | 90 | 96 | 57371 | 39% | |||
1.0.9_none_queue | setex | 54511 | 0.55 | 47% | 90 | 104 | 56160 | 51.50% | -1% | -24% | ||
1.0.9_linkedblockingqueue | setex | 59353 | 0.5 | 63% | 102 | 110 | 60580 | 54% | 8% | -8% | ||
1.0.9_disruptor | setex | 62034 | 0.48 | 71% | 96 | 101 | 65220 | 46.50% | 13% | 0% | ||
3主3从 | 1.0.8 | setex | 54230 | 0.55 | 82% | 93 | 101 | 18496*3 | 33% | -1% | ||
1.0.9_none_queue | setex | 56075 | 0.53 | 54% | 98 | 109 | 18963*3 | 37% | 3% | -28% | 3% | |
1.0.9_linkedblockingqueue | setex | 56701 | 0.53 | 66% | 106 | 114 | 19227*3 | 37% | 5% | -16% | -4% | |
1.0.9_disruptor | setex | 58794 | 0.51 | 66% | 101 | 107 | 20000*3 | 35% | 8% | -16% | -5% | |
15主15从 | 1.0.8 | setex | 48859 | 0.62 | 81% | 89 | 95 | 3325*15 | 9% | -11% | ||
1.0.9_none_queue | setex | 54796 | 0.55 | 73% | 99 | 106 | 3770*15 | 10% | 12% | -8% | 1% | |
1.0.9_linkedblockingqueue | setex | 53909 | 0.55 | 53% | 97 | 102 | 3700*15 | 10% | 10% | -28% | -9% | |
1.0.9_disruptor | setex | 52948.5 | 0.55 | 67% | 98 | 102 | 3600*15 | 10% | 8% | -14% | -15% |
- pipline setex指令(key长度=20字符,value长度=30字符,每次30个key)
配置 | 版本 | 场景 | 参数tps | mrt | proxy-cpu | inbps | outbps | redis-qps | redis-cpu | 同一集群和1.0.8版本tps提升比 | 同一集群和1.0.8版本对比proxy-cpu增长量 | 和单redis对应版本对比TPS提升比 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
单redis | 1.0.8 | pipelineSetex | 5778 | 5.49 | 48% | 166 | 266 | 177140 | 46% | |||
1.0.9_none_queue | pipelineSetex | 5596 | 5.68 | 51% | 160 | 216 | 171737 | 44% | -3% | 3% | ||
1.0.9_linkedblockingqueue | pipelineSetex | 5727 | 5.55 | 46% | 166 | 232 | 175319 | 46% | -1% | -2% | ||
1.0.9_disruptor | pipelineSetex | 5665 | 5.61 | 54% | 161 | 221 | 171306 | 46.50% | -2% | 6% | ||
3主3从 | 1.0.8 | pipelineSetex | 5293 | 6 | 57% | 159 | 212 | 53374*3 | 26% | -8% | ||
1.0.9_none_queue | pipelineSetex | 5408 | 5.88 | 46% | 151 | 204 | 54654*3 | 28% | 2% | -11% | -3% | |
1.0.9_linkedblockingqueue | pipelineSetex | 5384 | 5.91 | 43% | 150 | 290 | 54807*3 | 27% | 2% | -14% | -6% | |
1.0.9_disruptor | pipelineSetex | 5275 | 6.03 | 69% | 154 | 212 | 5.3w*3 | 25% | 0% | 12% | -7% | |
15主15从 | 1.0.8 | pipelineSetex | 3749 | 8.49 | 74% | 126 | 172 | 7500*15 | 10% | -35% | ||
1.0.9_none_queue | pipelineSetex | 3920 | 8.08 | 45% | 138 | 187 | 8000*15 | 11% | 5% | -29% | -30% | |
1.0.9_linkedblockingqueue | pipelineSetex | 3824.88 | 8.31 | 43% | 139 | 189 | 28000*15 | 13% | 2% | -31% | -33% | |
1.0.9_disruptor | pipelineSetex | 3835.52 | 8.31 | 61% | 140 | 192 | 7700*15 | 10% | 2% | -13% | -32% |
- get指令(key长度=20字符,value长度=30字符,随机1个key,共10000个key)
配置 | 版本 | 场景 | 参数tps | mrt | proxy-cpu | inbps | outbps | redis-qps | redis-cpu | 同一集群和1.0.8版本tps提升比 | 同一集群和1.0.8版本对比proxy-cpu增长量 | 和单redis对应版本对比TPS提升比 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
单redis | 1.0.8 | get | 56527 | 0.53 | 63% | 93 | 100 | 58279 | 42% | |||
1.0.9_none_queue | get | 56509 | 0.53 | 47% | 87 | 100 | 58767 | 48.30% | 0% | -16% | ||
1.0.9_linkedblockingqueue | get | 61097 | 0.49 | 54% | 93 | 100 | 63680 | 46.80% | 8% | -9% | ||
1.0.9_disruptor | get | 65073 | 0.46 | 68% | 94 | 99 | 66949 | 36.50% | 15% | 5% | ||
3主3从 | 1.0.8 | get | 55282 | 0.54 | 82% | 85 | 92 | 18790*3 | 19% | -2% | ||
1.0.9_none_queue | get | 56351 | 0.53 | 54% | 91 | 99 | 19367*3 | 21% | 2% | -28% | 0% | |
1.0.9_linkedblockingqueue | get | 57791 | 0.52 | 51% | 90 | 96 | 19946*3 | 22% | 5% | -31% | -5% | |
1.0.9_disruptor | get | 61157 | 0.49 | 76% | 98 | 104 | 21551*3 | 21% | 11% | -6% | -6% | |
15主15从 | 1.0.8 | get | 49821 | 0.61 | 88% | 81 | 87 | 3300*15 | 5% | -12% | ||
1.0.9_none_queue | get | 56092 | 0.54 | 53% | 97 | 105 | 3800*15 | 5% | 13% | -35% | -1% | |
1.0.9_linkedblockingqueue | get | 55099.7 | 0.55 | 74% | 89 | 94 | 3700*15 | 5% | 11% | -14% | -10% | |
1.0.9_disruptor | get | 56120.4 | 0.54 | 63% | 95 | 100 | 3600 | 5 | 13% | -25% | -14% |
- pipeline get指令(key长度=20字符,value长度=30字符,每次随机30个key,共10000个key)
配置 | 版本 | 场景 | 参数tps | mrt | proxy-cpu | inbps | outbps | redis-qps | redis-cpu | 同一集群和1.0.8版本tps提升比 | 同一集群和1.0.8版本对比proxy-cpu增长量 | 和单redis对应版本对比TPS提升比 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
单redis | 1.0.8 | pipelineGet | 6144.81 | 5.17 | 45% | 137 | 197 | 18.7w | 24.40% | |||
1.0.9_none_queue | pipelineGet | 6288.57 | 5.05 | 44% | 156 | 218 | 19.2w | 26.50% | 2% | -1% | ||
1.0.9_linkedblockingqueue | pipelineGet | 6005.12 | 5.3 | 46% | 143 | 213 | 183360 | 24% | -2% | 1% | ||
1.0.9_disruptor | pipelineGet | 6048.08 | 5.26 | 48% | 137 | 199 | 18.4w | 24.90% | -2% | 3% | ||
3主3从 | 1.0.8 | pipelineGet | 5444.99 | 5.84 | 57% | 138 | 194 | 55500 | 15% | -11% | ||
1.0.9_none_queue | pipelineGet | 5603.15 | 5.66 | 49% | 136 | 196 | 57600*3 | 13% | 3% | -8% | -11% | |
1.0.9_linkedblockingqueue | pipelineGet | 5453.32 | 5.84 | 41% | 132 | 185 | 55400*3 | 13.50% | 0% | -16% | -9% | |
1.0.9_disruptor | pipelineGet | 5569.13 | 5.71 | 47% | 141 | 202 | 5.5w*3 | 13% | 2% | -10% | -8% | |
15主15从 | 1.0.8 | pipelineGet | 3844 | 8.28 | 75% | 112 | 151 | 7700*15 | 5% | -37% | ||
1.0.9_none_queue | pipelineGet | 4082.48 | 7.8 | 45% | 121 | 171 | 7650*15 | 5.50% | 6% | -30% | -35% | |
1.0.9_linkedblockingqueue | pipelineGet | 3994.67 | 7.98 | 42% | 116 | 162 | 7700*15 | 6% | 4% | -33% | -33% | |
1.0.9_disruptor | pipelineGet | 4077.36 | 7.81 | 60% | 121 | 172 | 8500*15 | 5% | 6% | -15% | -33% |
- mget指令(key长度=20字符,value长度=30字符,每次随机30个key,共10000个key)
配置 | 版本 | 场景 | 参数tps | mrt | proxy-cpu | inbps | outbps | redis-qps | redis-cpu | 同一集群和1.0.8版本tps提升比 | 同一集群和1.0.8版本对比proxy-cpu增长量 | 和单redis对应版本对比TPS提升比 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
单redis | 1.0.8 | mget | 36182.2 | 0.85 | 57% | 588 | 589 | 37311 | 60% | |||
1.0.9_none_queue | mget | 36179.9 | 0.85 | 48% | 576 | 585 | 36857 | 68.50% | 0% | -9% | ||
1.0.9_linkedblockingqueue | mget | 37551.3 | 0.82 | 88% | 601 | 608 | 39836 | 77.50% | 4% | 31% | ||
1.0.9_disruptor | mget | 38355.6 | 0.8 | 77% | 607 | 610 | 38359 | 68% | 6% | 20% | ||
3主3从 | 1.0.8 | mget | 19292.7 | 1.62 | 78% | 312 | 385 | 20w*3 | 39% | |||
1.0.9_none_queue | mget | 20652.7 | 1.51 | 63% | 360 | 441 | 222600*3 | 49% | 7% | -15% | ||
1.0.9_linkedblockingqueue | mget | 23352.1 | 1.34 | 77% | 405 | 488 | 23.7w*3 | 48% | 21% | -1% | ||
1.0.9_disruptor | mget | 24291.2 | 1.28 | 65% | 406 | 489 | 25.2w*3 | 45% | 26% | -13% | ||
15主15从 | 1.0.8 | mget | 6904 | 4.6 | 96% | 145 | 189 | 1.4w*15 | 10% | |||
1.0.9_none_queue | mget | 9469 | 3.33 | 49% | 201 | 242 | 19456*15 | 12.50% | 37% | -47% | -54% | |
1.0.9_linkedblockingqueue | mget | 13984 | 2.25 | 56% | 286 | 345 | 28000*15 | 13% | 103% | -40% | -40% | |
1.0.9_disruptor | mget | 16206.1 | 1.93 | 63% | 292 | 353 | 33500*15 | 12% | 135% | -33% | -33% |