Для тестов использовались latest
версии darthsim/imgproxy
и mtsrus/image-optimize
.
В качестве тестового изображения использовалась Lenna. в качестве источника использовался локально поднятый Nginx.
Для создания нагрузки и снятия метрик использовалась утилита ab:
ab -n 1000 -c 4 $url
Server Software: imgproxy
Server Hostname: 127.0.0.1
Server Port: 8082
Document Path: /unsigned/rs:fit:512/q:50/plain/http://host.docker.internal/lenna.png@avif
Document Length: 11214 bytes
Concurrency Level: 4
Time taken for tests: 359.914 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 11503000 bytes
HTML transferred: 11214000 bytes
Requests per second: 2.78 [#/sec] (mean)
Time per request: 1439.655 [ms] (mean)
Time per request: 359.914 [ms] (mean, across all concurrent requests)
Transfer rate: 31.21 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.2 0 3
Processing: 957 1436 194.5 1374 2131
Waiting: 957 1435 194.4 1373 2131
Total: 958 1436 194.5 1375 2131
Percentage of the requests served within a certain time (ms)
50% 1375
66% 1435
75% 1467
80% 1494
90% 1805
95% 1932
98% 1995
99% 2020
100% 2131 (longest request)
Server Software:
Server Hostname: localhost
Server Port: 3000
Document Path: /optimize?size=512&format=avif&quality=50&src=http://host.docker.internal/lenna.png
Document Length: 11306 bytes
Concurrency Level: 4
Time taken for tests: 374.901 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 11497000 bytes
HTML transferred: 11306000 bytes
Requests per second: 2.67 [#/sec] (mean)
Time per request: 1499.605 [ms] (mean)
Time per request: 374.901 [ms] (mean, across all concurrent requests)
Transfer rate: 29.95 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 1
Processing: 1221 1494 214.3 1424 2461
Waiting: 1221 1493 214.4 1423 2461
Total: 1222 1494 214.4 1424 2461
Percentage of the requests served within a certain time (ms)
50% 1424
66% 1452
75% 1479
80% 1510
90% 1715
95% 2120
98% 2261
99% 2332
100% 2461 (longest request)
Server Software: imgproxy
Server Hostname: 127.0.0.1
Server Port: 8082
Document Path: /unsigned/rs:fit:512/q:80/plain/http://host.docker.internal/lenna.png@webp
Document Length: 30572 bytes
Concurrency Level: 4
Time taken for tests: 28.408 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 30861000 bytes
HTML transferred: 30572000 bytes
Requests per second: 35.20 [#/sec] (mean)
Time per request: 113.631 [ms] (mean)
Time per request: 28.408 [ms] (mean, across all concurrent requests)
Transfer rate: 1060.90 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 71 113 64.3 106 1115
Waiting: 71 111 55.9 105 1095
Total: 71 113 64.3 106 1116
Percentage of the requests served within a certain time (ms)
50% 106
66% 112
75% 117
80% 120
90% 131
95% 142
98% 155
99% 172
100% 1116 (longest request)
Server Software:
Server Hostname: localhost
Server Port: 3000
Document Path: /optimize?size=512&format=webp&quality=80&src=http://host.docker.internal/lenna.png
Document Length: 30360 bytes
Concurrency Level: 4
Time taken for tests: 35.958 seconds
Complete requests: 1000
Failed requests: 0
Total transferred: 30551000 bytes
HTML transferred: 30360000 bytes
Requests per second: 27.81 [#/sec] (mean)
Time per request: 143.833 [ms] (mean)
Time per request: 35.958 [ms] (mean, across all concurrent requests)
Transfer rate: 829.71 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 1
Processing: 93 143 22.4 140 303
Waiting: 92 142 22.1 139 302
Total: 93 143 22.4 140 304
Percentage of the requests served within a certain time (ms)
50% 140
66% 148
75% 154
80% 158
90% 171
95% 181
98% 203
99% 224
100% 304 (longest request)