forked from MikhailMe/2017-highload-kv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
нагрузочное тестирование
276 lines (234 loc) · 8.07 KB
/
нагрузочное тестирование
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
До оптимизации
Все очень плохо.
4 потока комп не может :(
PUT без перезаписи с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 54.18ms 41.31ms 984.06ms 98.21%
Req/Sec 35.22 7.31 60.00 87.73%
Latency Distribution
50% 50.12ms
75% 53.79ms
90% 56.64ms
99% 126.44ms
12610 requests in 3.00m, 1.05MB read
Requests/sec: 70.02
Transfer/sec: 5.95KB
PUT без перезаписи с replicas=3/3:
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 50.09ms 13.52ms 274.72ms 96.70%
Req/Sec 37.36 7.95 60.00 76.00%
Latency Distribution
50% 48.63ms
75% 52.53ms
90% 55.76ms
99% 110.74ms
13416 requests in 3.00m, 1.11MB read
Requests/sec: 74.49
Transfer/sec: 6.33KB
На имеющихся данных GET без повторов с replicas=2/3:
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 43.79ms 7.25ms 204.04ms 97.07%
Req/Sec 45.77 7.30 60.00 89.18%
Latency Distribution
50% 43.85ms
75% 43.90ms
90% 44.06ms
99% 83.66ms
16469 requests in 3.00m, 14.37MB read
Non-2xx or 3xx responses: 3046
Requests/sec: 91.45
Transfer/sec: 81.72KB
На имеющихся данных GET без повторов с replicas=3/3:
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 43.87ms 6.67ms 205.68ms 97.80%
Req/Sec 45.64 7.29 60.00 89.61%
Latency Distribution
50% 43.86ms
75% 43.90ms
90% 43.97ms
99% 74.58ms
16431 requests in 3.00m, 14.37MB read
Non-2xx or 3xx responses: 3008
Requests/sec: 91.23
Transfer/sec: 81.70KB
PUT c перезаписью с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 51.27ms 16.33ms 398.76ms 97.52%
Req/Sec 36.24 7.50 60.00 83.30%
Latency Distribution
50% 49.78ms
75% 53.35ms
90% 55.78ms
99% 118.45ms
13000 requests in 3.00m, 1.08MB read
Requests/sec: 72.20
Transfer/sec: 6.13KB
PUT c перезаписью с replicas=3/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 50.37ms 10.54ms 390.69ms 94.64%
Req/Sec 36.25 7.40 60.00 83.75%
Latency Distribution
50% 49.77ms
75% 53.44ms
90% 55.63ms
99% 97.26ms
13038 requests in 3.00m, 1.08MB read
Requests/sec: 72.40
Transfer/sec: 6.15KB
GET c перезаписью с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 44.26ms 8.10ms 183.88ms 97.45%
Req/Sec 45.39 7.22 60.00 90.85%
Latency Distribution
50% 43.87ms
75% 43.93ms
90% 47.78ms
99% 89.50ms
16328 requests in 3.00m, 17.16MB read
Requests/sec: 90.68
Transfer/sec: 97.58KB
GET c перезаписью с replicas=3/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 44.87ms 7.42ms 210.38ms 97.90%
Req/Sec 44.70 6.69 60.00 94.46%
Latency Distribution
50% 43.88ms
75% 43.92ms
90% 44.02ms
99% 83.89ms
16081 requests in 3.00m, 16.90MB read
Requests/sec: 89.33
Transfer/sec: 96.14KB
После оптимизаций
PUT без перезаписи с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 49.41ms 18.72ms 358.55ms 96.02%
Req/Sec 39.34 8.55 60.00 57.90%
Latency Distribution
50% 45.35ms
75% 50.07ms
90% 54.81ms
99% 142.85ms
14059 requests in 3.00m, 1.17MB read
Requests/sec: 78.07
Transfer/sec: 6.63KB
PUT без перезаписи с replicas=3/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 48.00ms 9.78ms 182.78ms 94.68%
Req/Sec 38.92 7.89 60.00 60.74%
Latency Distribution
50% 46.08ms
75% 50.49ms
90% 54.29ms
99% 98.74ms
14009 requests in 3.00m, 1.16MB read
Requests/sec: 77.80
Transfer/sec: 6.61KB
На имеющихся данных GET без повторов с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 44.34ms 13.43ms 440.08ms 98.09%
Req/Sec 45.71 7.36 60.00 88.93%
Latency Distribution
50% 43.86ms
75% 43.92ms
90% 46.17ms
99% 83.96ms
16410 requests in 3.00m, 14.98MB read
Non-2xx or 3xx responses: 2347
Requests/sec: 91.16
Transfer/sec: 85.23KB
На имеющихся данных GET без повторов с replicas=3/3:
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 39.98ms 1.60ms 99.55ms 97.00%
Req/Sec 49.89 8.46 60.00 29.04%
Latency Distribution
50% 39.88ms
75% 39.94ms
90% 40.06ms
99% 43.84ms
17957 requests in 3.00m, 15.12MB read
Non-2xx or 3xx responses: 3894
Requests/sec: 99.71
Transfer/sec: 85.96KB
PUT c перезаписью с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 51.75ms 27.17ms 472.18ms 95.77%
Req/Sec 38.46 8.73 60.00 72.31%
Latency Distribution
50% 46.29ms
75% 50.82ms
90% 58.49ms
99% 180.32ms
13692 requests in 3.00m, 1.14MB read
Requests/sec: 76.05
Transfer/sec: 6.46KB
PUT c перезаписью с replicas=3/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 45.74ms 12.22ms 306.90ms 96.76%
Req/Sec 34.44 11.85 60.00 48.32%
Latency Distribution
50% 42.81ms
75% 44.19ms
90% 50.83ms
99% 103.07ms
12358 requests in 3.00m, 1.03MB read
Requests/sec: 68.64
Transfer/sec: 5.83KB
GET c перезаписью с replicas=2/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 40.18ms 2.85ms 151.92ms 96.12%
Req/Sec 49.71 7.98 60.00 37.64%
Latency Distribution
50% 39.89ms
75% 39.94ms
90% 40.06ms
99% 47.79ms
17882 requests in 3.00m, 18.79MB read
Requests/sec: 99.30
Transfer/sec: 106.87KB
GET c перезаписью с replicas=3/3
Running 3m test @ http://localhost:8080
2 threads and 4 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 39.88ms 1.20ms 95.05ms 98.06%
Req/Sec 50.00 9.04 60.00 18.65%
Latency Distribution
50% 39.89ms
75% 39.93ms
90% 40.03ms
99% 40.92ms
17993 requests in 3.00m, 18.91MB read
Requests/sec: 99.93
Transfer/sec: 107.54KB
Получилось улучшить только GET запросы с помощью добавления кэша (в 99% случаев задержка упала в 2 раза + Req/sec увеличилось).
Судя по профайлеру, вся проблема в ReplicationManager. Решение вышло очень плохим и нужно переделывать все, так-как там сложно что-то вот так поменять(