Привет, я хочу немного настроить свой новый сервер, я тестировал с помощью mpm_prefork и mpm_event и не заметил больших различий..Может быть, я неправильно настроил?
Сервер:
Ampere® Altra® Q80-30ЦП 80 ядер / 80 потоков @ 3 Генерация ГГц:
Altra RAM 128 ГБ ECC DDR4 RAMDrives
2 твердотельных накопителя NVMe емкостью 960 ГБ > Центр обработки данных
Я пробовал с помощью mpm_prefork.conf:
StartServers 80
MinSpareServers 80
MaxSpareServers 160
MaxRequestWorkers 2048
MaxConnectionsPerChild 10000
И результаты:
Server Software: Apache/2.4.62
Server Hostname: domain.ro
Server Port: 443
SSL/TLS Protocol: TLSv1.3,TLS_AES_256_GCM_SHA384,256,256
Server Temp Key: X25519 253 bits
TLS Server Name: domain.ro
Document Path: /?test
Document Length: 191593 bytes
Concurrency Level: 100
Time taken for tests: 129.353 seconds
Complete requests: 10000
Failed requests: 820
(Connect: 0, Receive: 0, Length: 820, Exceptions: 0)
Non-2xx responses: 18
Total transferred: 1920480412 bytes
HTML transferred: 1912529124 bytes
Requests per second: **77.31** [#/sec] (mean)
Time per request: 1293.531 [ms] (mean)
Time per request: 12.935 [ms] (mean, across all concurrent requests)
Transfer rate: 14498.83 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 6 42.0 3 1222
Processing: 3 1273 193.8 1252 2190
Waiting: 3 1260 192.1 1240 2182
Total: 5 1279 197.5 1258 2519
Percentage of the requests served within a certain time (ms)
50% 1258
66% 1346
75% 1401
80% 1437
90% 1532
95% 1619
98% 1729
99% 1805
100% 2519 (longest request)
Затем я установил mpm_event.conf:
StartServers 20
MinSpareThreads 25
MaxSpareThreads 90
ThreadLimit 128
MaxRequestWorkers 1500
ServerLimit 2000
И www.conf
pm.max_children = 2000
; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: (min_spare_servers + max_spare_servers) / 2
pm.start_servers = 200
; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 5
; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 300
; The number of rate to spawn child processes at once.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
; Default Value: 32
;pm.max_spawn_rate = 32
; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
;pm.process_idle_timeout = 10s;
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = 500
РЕЗУЛЬТАТ:
Server Software: Apache/2.4.62
Server Hostname: domain.ro
Server Port: 443
SSL/TLS Protocol: TLSv1.3,TLS_AES_256_GCM_SHA384,256,256
Server Temp Key: X25519 253 bits
TLS Server Name: domain.ro
Document Path: /?test8
Document Length: 191594 bytes
Concurrency Level: 100
Time taken for tests: 129.584 seconds
Complete requests: 10000
Failed requests: 790
(Connect: 0, Receive: 0, Length: 790, Exceptions: 0)
Non-2xx responses: 15
Total transferred: 1921088225 bytes
HTML transferred: 1913105980 bytes
Requests per second: **77.17** [#/sec] (mean)
Time per request: 1295.843 [ms] (mean)
Time per request: 12.958 [ms] (mean, across all concurrent requests)
Transfer rate: 14477.54 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 6 49.6 3 1039
Processing: 5 1278 187.6 1259 2005
Waiting: 5 1266 186.0 1248 1993
Total: 8 1284 195.2 1263 2663
Percentage of the requests served within a certain time (ms)
50% 1263
66% 1344
75% 1400
80% 1434
90% 1535
95% 1620
98% 1721
99% 1797
100% 2663 (longest request)
Подробнее здесь: https://stackoverflow.com/questions/792 ... pm-prefork
Настройка производительности Apache для высокого трафика с помощью MPM Event или MPM Prefork? ⇐ Php
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Прерывистая сбой обработки трафика VPN при пересылке реального веб -трафика
Anonymous » » в форуме Python - 0 Ответы
- 6 Просмотры
-
Последнее сообщение Anonymous
-