Closed simongui closed 8 years ago
Thanks for reporting this. Interesting. I'm going to dig a little.
I'm seeing different results than you are. In my testing both Redis and Redcon are pretty close as far as latency is concerned.
I used go run example/clone.go
for Redcon.
My go version
is go1.7 darwin/amd64
.
redis-benchmark -h 127.0.0.1 -p 6379 -t set -n 10000000 -P 1 -c 768
====== SET ======
10000000 requests completed in 91.12 seconds
768 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 1 milliseconds
0.00% <= 2 milliseconds
0.06% <= 3 milliseconds
18.77% <= 4 milliseconds
26.38% <= 5 milliseconds
35.45% <= 6 milliseconds
89.16% <= 7 milliseconds
97.15% <= 8 milliseconds
98.57% <= 9 milliseconds
99.41% <= 10 milliseconds
99.87% <= 11 milliseconds
99.93% <= 12 milliseconds
99.95% <= 13 milliseconds
99.96% <= 14 milliseconds
99.97% <= 15 milliseconds
99.97% <= 16 milliseconds
99.98% <= 17 milliseconds
99.98% <= 18 milliseconds
99.98% <= 19 milliseconds
99.98% <= 20 milliseconds
99.98% <= 21 milliseconds
99.99% <= 22 milliseconds
99.99% <= 23 milliseconds
99.99% <= 24 milliseconds
99.99% <= 25 milliseconds
99.99% <= 26 milliseconds
99.99% <= 27 milliseconds
99.99% <= 28 milliseconds
99.99% <= 29 milliseconds
99.99% <= 30 milliseconds
99.99% <= 31 milliseconds
99.99% <= 32 milliseconds
99.99% <= 33 milliseconds
99.99% <= 34 milliseconds
99.99% <= 35 milliseconds
99.99% <= 36 milliseconds
99.99% <= 37 milliseconds
99.99% <= 38 milliseconds
99.99% <= 39 milliseconds
99.99% <= 40 milliseconds
99.99% <= 41 milliseconds
99.99% <= 42 milliseconds
99.99% <= 43 milliseconds
99.99% <= 44 milliseconds
99.99% <= 45 milliseconds
99.99% <= 46 milliseconds
100.00% <= 47 milliseconds
100.00% <= 48 milliseconds
100.00% <= 49 milliseconds
100.00% <= 49 milliseconds
109739.37 requests per second
redis-benchmark -h 127.0.0.1 -p 6379 -t set -n 10000000 -P 256 -c 768
====== SET ======
10000000 requests completed in 10.47 seconds
768 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 5 milliseconds
0.01% <= 15 milliseconds
0.01% <= 16 milliseconds
0.01% <= 17 milliseconds
0.02% <= 18 milliseconds
0.02% <= 19 milliseconds
0.03% <= 20 milliseconds
0.03% <= 21 milliseconds
0.04% <= 22 milliseconds
0.09% <= 23 milliseconds
0.10% <= 24 milliseconds
0.11% <= 25 milliseconds
0.12% <= 26 milliseconds
0.13% <= 27 milliseconds
0.14% <= 28 milliseconds
0.19% <= 29 milliseconds
0.25% <= 30 milliseconds
0.30% <= 31 milliseconds
0.36% <= 32 milliseconds
0.41% <= 33 milliseconds
0.46% <= 34 milliseconds
0.46% <= 35 milliseconds
0.47% <= 36 milliseconds
0.49% <= 37 milliseconds
0.50% <= 38 milliseconds
0.52% <= 39 milliseconds
0.52% <= 40 milliseconds
0.53% <= 41 milliseconds
0.54% <= 42 milliseconds
0.54% <= 43 milliseconds
0.55% <= 44 milliseconds
0.55% <= 45 milliseconds
0.56% <= 46 milliseconds
0.56% <= 47 milliseconds
0.56% <= 48 milliseconds
0.57% <= 49 milliseconds
0.57% <= 50 milliseconds
0.58% <= 51 milliseconds
0.58% <= 52 milliseconds
0.59% <= 53 milliseconds
0.59% <= 73 milliseconds
0.60% <= 75 milliseconds
0.60% <= 80 milliseconds
0.60% <= 81 milliseconds
0.61% <= 82 milliseconds
0.61% <= 85 milliseconds
0.62% <= 86 milliseconds
0.62% <= 87 milliseconds
0.63% <= 88 milliseconds
0.64% <= 89 milliseconds
0.66% <= 90 milliseconds
0.67% <= 91 milliseconds
0.68% <= 92 milliseconds
0.70% <= 93 milliseconds
0.73% <= 94 milliseconds
0.76% <= 95 milliseconds
0.78% <= 96 milliseconds
0.82% <= 97 milliseconds
0.86% <= 98 milliseconds
0.89% <= 99 milliseconds
0.94% <= 100 milliseconds
0.95% <= 101 milliseconds
0.96% <= 102 milliseconds
0.97% <= 103 milliseconds
0.98% <= 104 milliseconds
0.99% <= 105 milliseconds
0.99% <= 108 milliseconds
0.99% <= 113 milliseconds
0.99% <= 114 milliseconds
1.00% <= 115 milliseconds
1.00% <= 117 milliseconds
1.00% <= 118 milliseconds
1.01% <= 119 milliseconds
1.01% <= 120 milliseconds
1.01% <= 121 milliseconds
1.02% <= 122 milliseconds
1.03% <= 123 milliseconds
1.09% <= 124 milliseconds
1.14% <= 125 milliseconds
1.19% <= 126 milliseconds
1.24% <= 127 milliseconds
1.30% <= 128 milliseconds
1.35% <= 129 milliseconds
1.41% <= 130 milliseconds
1.46% <= 131 milliseconds
1.52% <= 132 milliseconds
1.57% <= 133 milliseconds
1.63% <= 134 milliseconds
1.68% <= 135 milliseconds
1.73% <= 136 milliseconds
1.79% <= 137 milliseconds
1.85% <= 138 milliseconds
1.91% <= 139 milliseconds
1.97% <= 140 milliseconds
2.04% <= 141 milliseconds
2.10% <= 142 milliseconds
2.18% <= 143 milliseconds
2.23% <= 144 milliseconds
2.29% <= 145 milliseconds
2.36% <= 146 milliseconds
2.41% <= 147 milliseconds
2.43% <= 148 milliseconds
2.46% <= 149 milliseconds
2.47% <= 150 milliseconds
2.47% <= 151 milliseconds
2.48% <= 152 milliseconds
2.49% <= 153 milliseconds
2.50% <= 154 milliseconds
2.50% <= 172 milliseconds
2.54% <= 173 milliseconds
2.59% <= 174 milliseconds
2.74% <= 175 milliseconds
2.99% <= 176 milliseconds
3.28% <= 177 milliseconds
3.68% <= 178 milliseconds
4.39% <= 179 milliseconds
5.37% <= 180 milliseconds
6.69% <= 181 milliseconds
8.23% <= 182 milliseconds
9.96% <= 183 milliseconds
11.96% <= 184 milliseconds
14.21% <= 185 milliseconds
16.74% <= 186 milliseconds
19.37% <= 187 milliseconds
22.19% <= 188 milliseconds
25.27% <= 189 milliseconds
28.63% <= 190 milliseconds
32.37% <= 191 milliseconds
36.21% <= 192 milliseconds
40.23% <= 193 milliseconds
44.50% <= 194 milliseconds
48.81% <= 195 milliseconds
52.96% <= 196 milliseconds
57.15% <= 197 milliseconds
61.15% <= 198 milliseconds
65.06% <= 199 milliseconds
68.79% <= 200 milliseconds
72.35% <= 201 milliseconds
75.67% <= 202 milliseconds
78.65% <= 203 milliseconds
81.13% <= 204 milliseconds
83.28% <= 205 milliseconds
85.18% <= 206 milliseconds
86.81% <= 207 milliseconds
88.10% <= 208 milliseconds
89.21% <= 209 milliseconds
90.27% <= 210 milliseconds
91.25% <= 211 milliseconds
92.00% <= 212 milliseconds
92.69% <= 213 milliseconds
93.36% <= 214 milliseconds
93.97% <= 215 milliseconds
94.57% <= 216 milliseconds
95.13% <= 217 milliseconds
95.65% <= 218 milliseconds
96.13% <= 219 milliseconds
96.56% <= 220 milliseconds
96.95% <= 221 milliseconds
97.27% <= 222 milliseconds
97.55% <= 223 milliseconds
97.81% <= 224 milliseconds
98.03% <= 225 milliseconds
98.21% <= 226 milliseconds
98.38% <= 227 milliseconds
98.54% <= 228 milliseconds
98.70% <= 229 milliseconds
98.82% <= 230 milliseconds
98.95% <= 231 milliseconds
99.06% <= 232 milliseconds
99.16% <= 233 milliseconds
99.26% <= 234 milliseconds
99.36% <= 235 milliseconds
99.46% <= 236 milliseconds
99.56% <= 237 milliseconds
99.65% <= 238 milliseconds
99.74% <= 239 milliseconds
99.78% <= 240 milliseconds
99.83% <= 241 milliseconds
99.88% <= 242 milliseconds
99.93% <= 243 milliseconds
99.98% <= 244 milliseconds
100.00% <= 244 milliseconds
955018.62 requests per second
redis-benchmark -h 127.0.0.1 -p 6380 -t set -n 10000000 -P 1 -c 768
====== SET ======
10000000 requests completed in 109.67 seconds
768 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 2 milliseconds
0.00% <= 3 milliseconds
1.52% <= 4 milliseconds
5.26% <= 5 milliseconds
9.26% <= 6 milliseconds
21.51% <= 7 milliseconds
66.51% <= 8 milliseconds
83.52% <= 9 milliseconds
89.89% <= 10 milliseconds
96.50% <= 11 milliseconds
99.21% <= 12 milliseconds
99.79% <= 13 milliseconds
99.94% <= 14 milliseconds
99.99% <= 15 milliseconds
100.00% <= 16 milliseconds
100.00% <= 17 milliseconds
100.00% <= 18 milliseconds
100.00% <= 19 milliseconds
100.00% <= 20 milliseconds
100.00% <= 21 milliseconds
100.00% <= 21 milliseconds
91180.98 requests per second
redis-benchmark -h 127.0.0.1 -p 6380 -t set -n 10000000 -P 256 -c 768
====== SET ======
10000000 requests completed in 4.56 seconds
768 parallel clients
3 bytes payload
keep alive: 1
0.26% <= 1 milliseconds
0.61% <= 2 milliseconds
0.93% <= 3 milliseconds
1.22% <= 4 milliseconds
1.49% <= 5 milliseconds
1.77% <= 6 milliseconds
2.05% <= 7 milliseconds
2.40% <= 8 milliseconds
2.74% <= 9 milliseconds
3.07% <= 10 milliseconds
3.40% <= 11 milliseconds
3.70% <= 12 milliseconds
3.98% <= 13 milliseconds
4.24% <= 14 milliseconds
4.54% <= 15 milliseconds
4.85% <= 16 milliseconds
5.11% <= 17 milliseconds
5.36% <= 18 milliseconds
5.58% <= 19 milliseconds
5.83% <= 20 milliseconds
6.09% <= 21 milliseconds
6.36% <= 22 milliseconds
6.62% <= 23 milliseconds
6.86% <= 24 milliseconds
7.13% <= 25 milliseconds
7.43% <= 26 milliseconds
7.69% <= 27 milliseconds
8.00% <= 28 milliseconds
8.32% <= 29 milliseconds
9.02% <= 30 milliseconds
9.42% <= 31 milliseconds
9.78% <= 32 milliseconds
10.17% <= 33 milliseconds
10.55% <= 34 milliseconds
10.88% <= 35 milliseconds
11.24% <= 36 milliseconds
11.63% <= 37 milliseconds
12.03% <= 38 milliseconds
12.45% <= 39 milliseconds
12.83% <= 40 milliseconds
13.27% <= 41 milliseconds
13.73% <= 42 milliseconds
14.11% <= 43 milliseconds
14.58% <= 44 milliseconds
14.98% <= 45 milliseconds
15.44% <= 46 milliseconds
15.90% <= 47 milliseconds
16.43% <= 48 milliseconds
16.96% <= 49 milliseconds
17.48% <= 50 milliseconds
18.01% <= 51 milliseconds
18.61% <= 52 milliseconds
19.16% <= 53 milliseconds
19.83% <= 54 milliseconds
20.45% <= 55 milliseconds
21.09% <= 56 milliseconds
21.68% <= 57 milliseconds
22.36% <= 58 milliseconds
23.08% <= 59 milliseconds
23.73% <= 60 milliseconds
24.47% <= 61 milliseconds
25.25% <= 62 milliseconds
26.05% <= 63 milliseconds
26.90% <= 64 milliseconds
27.71% <= 65 milliseconds
28.52% <= 66 milliseconds
29.43% <= 67 milliseconds
30.42% <= 68 milliseconds
31.45% <= 69 milliseconds
32.46% <= 70 milliseconds
33.48% <= 71 milliseconds
34.57% <= 72 milliseconds
35.71% <= 73 milliseconds
36.85% <= 74 milliseconds
38.11% <= 75 milliseconds
39.27% <= 76 milliseconds
40.50% <= 77 milliseconds
41.68% <= 78 milliseconds
43.00% <= 79 milliseconds
44.35% <= 80 milliseconds
45.70% <= 81 milliseconds
47.10% <= 82 milliseconds
48.51% <= 83 milliseconds
49.77% <= 84 milliseconds
51.14% <= 85 milliseconds
52.56% <= 86 milliseconds
54.00% <= 87 milliseconds
55.59% <= 88 milliseconds
57.03% <= 89 milliseconds
58.52% <= 90 milliseconds
59.93% <= 91 milliseconds
61.37% <= 92 milliseconds
62.77% <= 93 milliseconds
64.25% <= 94 milliseconds
65.86% <= 95 milliseconds
67.33% <= 96 milliseconds
68.85% <= 97 milliseconds
70.35% <= 98 milliseconds
71.76% <= 99 milliseconds
73.06% <= 100 milliseconds
74.40% <= 101 milliseconds
75.85% <= 102 milliseconds
77.23% <= 103 milliseconds
78.49% <= 104 milliseconds
79.68% <= 105 milliseconds
80.91% <= 106 milliseconds
82.08% <= 107 milliseconds
83.22% <= 108 milliseconds
84.38% <= 109 milliseconds
85.43% <= 110 milliseconds
86.46% <= 111 milliseconds
87.41% <= 112 milliseconds
88.30% <= 113 milliseconds
89.21% <= 114 milliseconds
89.97% <= 115 milliseconds
90.81% <= 116 milliseconds
91.59% <= 117 milliseconds
92.27% <= 118 milliseconds
92.88% <= 119 milliseconds
93.48% <= 120 milliseconds
94.04% <= 121 milliseconds
94.58% <= 122 milliseconds
95.09% <= 123 milliseconds
95.51% <= 124 milliseconds
95.91% <= 125 milliseconds
96.31% <= 126 milliseconds
96.62% <= 127 milliseconds
96.95% <= 128 milliseconds
97.23% <= 129 milliseconds
97.49% <= 130 milliseconds
97.71% <= 131 milliseconds
97.99% <= 132 milliseconds
98.21% <= 133 milliseconds
98.41% <= 134 milliseconds
98.56% <= 135 milliseconds
98.70% <= 136 milliseconds
98.86% <= 137 milliseconds
98.95% <= 138 milliseconds
99.06% <= 139 milliseconds
99.17% <= 140 milliseconds
99.27% <= 141 milliseconds
99.34% <= 142 milliseconds
99.43% <= 143 milliseconds
99.49% <= 144 milliseconds
99.55% <= 145 milliseconds
99.58% <= 146 milliseconds
99.62% <= 147 milliseconds
99.67% <= 148 milliseconds
99.69% <= 149 milliseconds
99.72% <= 150 milliseconds
99.75% <= 151 milliseconds
99.77% <= 152 milliseconds
99.81% <= 153 milliseconds
99.82% <= 154 milliseconds
99.84% <= 155 milliseconds
99.85% <= 156 milliseconds
99.85% <= 157 milliseconds
99.86% <= 158 milliseconds
99.87% <= 159 milliseconds
99.88% <= 160 milliseconds
99.91% <= 161 milliseconds
99.92% <= 162 milliseconds
99.93% <= 163 milliseconds
99.94% <= 164 milliseconds
99.95% <= 165 milliseconds
99.95% <= 166 milliseconds
99.96% <= 167 milliseconds
99.96% <= 168 milliseconds
99.97% <= 170 milliseconds
99.98% <= 171 milliseconds
99.98% <= 176 milliseconds
99.98% <= 177 milliseconds
99.99% <= 178 milliseconds
99.99% <= 182 milliseconds
99.99% <= 183 milliseconds
99.99% <= 189 milliseconds
100.00% <= 190 milliseconds
100.00% <= 190 milliseconds
2193463.50 requests per second
I'm benchmarking between two 20 core servers on 10GbE. That's a localhost test. Do you have 2 machines you can benchmark with over a real network?
I have a couple machines I can test with. I'll keep you posted. Is there anything specific that I should configure for?
I'm just testing on 2 20 core dual 10GbE bonded to 20GbE servers. I'll keep testing as well to make sure it's not an anomaly.
In this benchmark the latency is close at the 99.6%
range but then closer to MAX it starts to really spike.
redis-benchmark -h server -p 6379 -t set -n 10000000 -P 128 -c 128
====== SET ======
10000000 requests completed in 8.06 seconds
128 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 1 milliseconds
0.02% <= 2 milliseconds
0.02% <= 3 milliseconds
0.02% <= 4 milliseconds
0.03% <= 5 milliseconds
0.03% <= 6 milliseconds
0.05% <= 7 milliseconds
0.21% <= 8 milliseconds
0.31% <= 9 milliseconds
2.86% <= 10 milliseconds
22.38% <= 11 milliseconds
44.57% <= 12 milliseconds
76.49% <= 13 milliseconds
92.29% <= 14 milliseconds
97.15% <= 15 milliseconds
99.83% <= 16 milliseconds
99.84% <= 31 milliseconds
99.86% <= 32 milliseconds
99.88% <= 33 milliseconds
99.91% <= 34 milliseconds
99.93% <= 35 milliseconds
99.96% <= 36 milliseconds
99.99% <= 37 milliseconds
100.00% <= 37 milliseconds
1240694.75 requests per second
redis-benchmark -h server -p 6380 -t set -n 10000000 -P 128 -c 128
====== SET ======
10000000 requests completed in 4.12 seconds
128 parallel clients
3 bytes payload
keep alive: 1
0.04% <= 1 milliseconds
64.78% <= 2 milliseconds
78.01% <= 3 milliseconds
97.67% <= 4 milliseconds
99.45% <= 5 milliseconds
99.59% <= 6 milliseconds
99.65% <= 7 milliseconds
99.66% <= 8 milliseconds
99.66% <= 9 milliseconds
99.66% <= 11 milliseconds
99.67% <= 13 milliseconds
99.67% <= 19 milliseconds
99.67% <= 867 milliseconds
99.67% <= 868 milliseconds
99.68% <= 869 milliseconds
99.70% <= 870 milliseconds
99.73% <= 871 milliseconds
99.75% <= 872 milliseconds
99.77% <= 873 milliseconds
99.81% <= 874 milliseconds
99.83% <= 875 milliseconds
99.87% <= 876 milliseconds
99.90% <= 877 milliseconds
99.93% <= 878 milliseconds
99.95% <= 879 milliseconds
99.95% <= 880 milliseconds
99.96% <= 881 milliseconds
99.96% <= 882 milliseconds
99.96% <= 883 milliseconds
99.97% <= 884 milliseconds
99.98% <= 885 milliseconds
99.98% <= 886 milliseconds
99.99% <= 887 milliseconds
99.99% <= 888 milliseconds
99.99% <= 889 milliseconds
99.99% <= 890 milliseconds
100.00% <= 891 milliseconds
100.00% <= 900 milliseconds
100.00% <= 900 milliseconds
2424830.25 requests per second
At home I only have a one linux box and my macbook, and I couldn't find my thunderbolt/ethernet adapter. 👎 So fuck it. I ended up spinning up two servers on Digital Ocean. Both 2GB instances with private networking. I compiled Redis on both servers so that they both have the latest redis-server and redis-benchmark commands.
On Server1 I launched Redis with src/redis-server --protected-mode no
and Redcon with go run examples\clone.go
.
On Server 2 I ran the redis-benchmark utility.
redis-benchmark -h 10.134.22.215 -p 6379 -t set -n 10000000 -P 128 -c 128
====== SET ======
10000000 requests completed in 16.08 seconds
128 parallel clients
3 bytes payload
keep alive: 1
0.00% <= 2 milliseconds
0.00% <= 3 milliseconds
0.01% <= 6 milliseconds
0.03% <= 7 milliseconds
0.04% <= 11 milliseconds
0.05% <= 12 milliseconds
0.08% <= 13 milliseconds
0.12% <= 14 milliseconds
0.13% <= 15 milliseconds
0.14% <= 16 milliseconds
0.19% <= 17 milliseconds
0.31% <= 18 milliseconds
0.60% <= 19 milliseconds
1.56% <= 20 milliseconds
4.38% <= 21 milliseconds
11.69% <= 22 milliseconds
26.43% <= 23 milliseconds
47.82% <= 24 milliseconds
67.76% <= 25 milliseconds
79.92% <= 26 milliseconds
86.80% <= 27 milliseconds
90.36% <= 28 milliseconds
92.59% <= 29 milliseconds
94.24% <= 30 milliseconds
95.64% <= 31 milliseconds
96.75% <= 32 milliseconds
97.61% <= 33 milliseconds
98.08% <= 34 milliseconds
98.40% <= 35 milliseconds
98.67% <= 36 milliseconds
98.88% <= 37 milliseconds
99.06% <= 38 milliseconds
99.20% <= 39 milliseconds
99.30% <= 40 milliseconds
99.38% <= 41 milliseconds
99.45% <= 42 milliseconds
99.50% <= 43 milliseconds
99.55% <= 44 milliseconds
99.61% <= 45 milliseconds
99.69% <= 46 milliseconds
99.77% <= 47 milliseconds
99.83% <= 48 milliseconds
99.87% <= 49 milliseconds
99.90% <= 50 milliseconds
99.92% <= 51 milliseconds
99.92% <= 52 milliseconds
99.93% <= 53 milliseconds
99.96% <= 54 milliseconds
99.98% <= 55 milliseconds
99.99% <= 56 milliseconds
100.00% <= 56 milliseconds
622045.25 requests per second
redis-benchmark -h 10.134.22.215 -p 6380 -t set -n 10000000 -P 128 -c 128
====== SET ======
10000000 requests completed in 8.20 seconds
128 parallel clients
3 bytes payload
keep alive: 1
0.47% <= 1 milliseconds
1.89% <= 2 milliseconds
3.99% <= 3 milliseconds
6.42% <= 4 milliseconds
9.19% <= 5 milliseconds
12.33% <= 6 milliseconds
16.56% <= 7 milliseconds
21.64% <= 8 milliseconds
27.29% <= 9 milliseconds
33.50% <= 10 milliseconds
40.06% <= 11 milliseconds
46.80% <= 12 milliseconds
53.39% <= 13 milliseconds
59.58% <= 14 milliseconds
65.37% <= 15 milliseconds
70.32% <= 16 milliseconds
74.92% <= 17 milliseconds
79.12% <= 18 milliseconds
82.85% <= 19 milliseconds
86.44% <= 20 milliseconds
89.49% <= 21 milliseconds
91.76% <= 22 milliseconds
93.33% <= 23 milliseconds
94.43% <= 24 milliseconds
95.22% <= 25 milliseconds
95.91% <= 26 milliseconds
96.48% <= 27 milliseconds
96.98% <= 28 milliseconds
97.45% <= 29 milliseconds
97.83% <= 30 milliseconds
98.16% <= 31 milliseconds
98.42% <= 32 milliseconds
98.65% <= 33 milliseconds
98.84% <= 34 milliseconds
98.98% <= 35 milliseconds
99.09% <= 36 milliseconds
99.18% <= 37 milliseconds
99.28% <= 38 milliseconds
99.36% <= 39 milliseconds
99.42% <= 40 milliseconds
99.48% <= 41 milliseconds
99.53% <= 42 milliseconds
99.59% <= 43 milliseconds
99.64% <= 44 milliseconds
99.67% <= 45 milliseconds
99.72% <= 46 milliseconds
99.74% <= 47 milliseconds
99.77% <= 48 milliseconds
99.78% <= 49 milliseconds
99.80% <= 50 milliseconds
99.80% <= 51 milliseconds
99.82% <= 52 milliseconds
99.83% <= 53 milliseconds
99.84% <= 54 milliseconds
99.85% <= 55 milliseconds
99.86% <= 56 milliseconds
99.87% <= 57 milliseconds
99.88% <= 58 milliseconds
99.89% <= 59 milliseconds
99.89% <= 60 milliseconds
99.90% <= 61 milliseconds
99.90% <= 63 milliseconds
99.91% <= 64 milliseconds
99.91% <= 65 milliseconds
99.91% <= 66 milliseconds
99.92% <= 67 milliseconds
99.92% <= 68 milliseconds
99.92% <= 69 milliseconds
99.93% <= 70 milliseconds
99.94% <= 71 milliseconds
99.94% <= 72 milliseconds
99.94% <= 73 milliseconds
99.95% <= 74 milliseconds
99.95% <= 75 milliseconds
99.95% <= 76 milliseconds
99.96% <= 77 milliseconds
99.96% <= 79 milliseconds
99.96% <= 80 milliseconds
99.96% <= 81 milliseconds
99.97% <= 82 milliseconds
99.97% <= 83 milliseconds
99.97% <= 84 milliseconds
99.97% <= 86 milliseconds
99.98% <= 87 milliseconds
99.98% <= 88 milliseconds
99.98% <= 89 milliseconds
99.98% <= 91 milliseconds
99.98% <= 92 milliseconds
99.98% <= 93 milliseconds
99.99% <= 95 milliseconds
99.99% <= 97 milliseconds
99.99% <= 98 milliseconds
99.99% <= 100 milliseconds
99.99% <= 104 milliseconds
99.99% <= 107 milliseconds
100.00% <= 109 milliseconds
100.00% <= 118 milliseconds
100.00% <= 149 milliseconds
100.00% <= 149 milliseconds
1219363.50 requests per second
Now when I run the Redcon clone as a single-theaded, the results are more in-line with Redis.
GOMAXPROCS=1 go run example/clone.go
redis-benchmark -h 10.134.22.215 -p 6380 -t set -n 10000000 -P 128 -c 128
====== SET ======
10000000 requests completed in 14.53 seconds
128 parallel clients
3 bytes payload
keep alive: 1
0.02% <= 1 milliseconds
0.10% <= 2 milliseconds
0.17% <= 3 milliseconds
0.25% <= 4 milliseconds
0.33% <= 5 milliseconds
0.41% <= 6 milliseconds
0.52% <= 7 milliseconds
0.61% <= 8 milliseconds
0.72% <= 9 milliseconds
0.82% <= 10 milliseconds
1.04% <= 11 milliseconds
1.80% <= 12 milliseconds
3.13% <= 13 milliseconds
5.38% <= 14 milliseconds
8.55% <= 15 milliseconds
12.33% <= 16 milliseconds
16.46% <= 17 milliseconds
20.89% <= 18 milliseconds
25.57% <= 19 milliseconds
30.40% <= 20 milliseconds
35.39% <= 21 milliseconds
40.54% <= 22 milliseconds
45.89% <= 23 milliseconds
51.22% <= 24 milliseconds
56.69% <= 25 milliseconds
62.00% <= 26 milliseconds
67.21% <= 27 milliseconds
72.26% <= 28 milliseconds
77.12% <= 29 milliseconds
81.87% <= 30 milliseconds
86.44% <= 31 milliseconds
90.42% <= 32 milliseconds
93.72% <= 33 milliseconds
96.10% <= 34 milliseconds
97.55% <= 35 milliseconds
98.41% <= 36 milliseconds
98.91% <= 37 milliseconds
99.21% <= 38 milliseconds
99.42% <= 39 milliseconds
99.57% <= 40 milliseconds
99.68% <= 41 milliseconds
99.77% <= 42 milliseconds
99.84% <= 43 milliseconds
99.90% <= 44 milliseconds
99.93% <= 45 milliseconds
99.97% <= 46 milliseconds
99.98% <= 47 milliseconds
99.99% <= 48 milliseconds
100.00% <= 50 milliseconds
100.00% <= 54 milliseconds
100.00% <= 55 milliseconds
100.00% <= 55 milliseconds
687994.50 requests per second
Interesting results! I wonder where the contention is that is causing the tail latency to spike so much.
Yeah I think something else in my codebase may be interfering. I'm benchmarking with your clone code and it's working more closely to Redis. Sorry for wasting some of your time. I'll dig into what's going on. I don't see anything consuming much CPU usage but there must be something interfering.
Yeah. I'm curious too.
Maybe there's some network setting in /etc/sysctl.conf
(or elsewhere) that is conflicting with the something in the Go net
package?
Another thought is around the 20-core processor server. Perhaps try with GOMAXPROCS=1
?
Our messages crossed paths. I'm glad to hear that it may something that's fixable. It's totally not a waste of time. I'm more than happy to help investigate these types of things.
Thanks for using the project and let me know if there's anything I can help with.
I found the problem. Add this to clone.go
type keyvaluepair struct {
bucket []byte
key []byte
value []byte
}
var writes chan keyvaluepair
Then at the top of main()
add the following. Compile and benchmark.
writes = make(chan keyvaluepair, 10000000)
I'm not sure why this is causing issues because the channel isn't being used.
It's happening on my side too. It's definitely something to do with the huge channel. I changed the size from 10,000,000 to 100,000 and it sped it up quite a bit.
That channel sucks up 2GB of ram. 10,000,000 elements * 216 byte struct.
Yeah. I was going to synchronize writes using a channel, but since sometimes Redcon can reach 2 million+ requests/second I thought I would give it a channel of 10 million to give it some room to not block.
Perhaps a sync.RWMutex would be better. You could possibly have mu.Lock() that wraps Redcon commands that write and mu.RLock() wrap commands that read. That's the pattern that I use and it seems pretty good.
Throughput of Redcon seems really good but latency is really high in comparison to Redis with shallow or deep pipelines. Even if you make the Redis commands NOOP.
I created a SET command that only wrote a response to benchmark the I/O performance of redcon versus Redis. Keep in mind Redis is doing key mutations while my benchmark is not.
Redis
Redcon