nginx все воркеры на 1 ядро?
dim1
nginx-forum на forum.nginx.org
Вс Мар 13 12:40:38 UTC 2016
Debian GNU/Linux 7
Linux version 2.6.32-5-amd64 (Debian 2.6.32-48squeeze6)
посмотрел atop
CPU | sys 6% | user 10% | irq 19% | idle 763% | wait
1% | avgf 1.61GHz | avgscal 47% |
cpu | sys 5% | user 8% | irq 20% | idle 67% | cpu000 w
1% | avgf 1.61GHz | avgscal 47% |
cpu | sys 1% | user 1% | irq 0% | idle 98% | cpu004 w
0% | avgf 1.60GHz | avgscal 47% |
cpu | sys 0% | user 0% | irq 0% | idle 100% | cpu006 w
0% | avgf 1.62GHz | avgscal 47% |
cpu | sys 0% | user 0% | irq 0% | idle 100% | cpu003 w
0% | avgf 1.60GHz | avgscal 47% |
....
27891 www www 1 13.70s 12.56s 0K 4K 0K 50736K -- - S
0 4% nginx
27889 www www 1 13.70s 12.56s 0K 0K 0K 51268K -- - S
0 4% nginx
27890 www www 1 13.61s 12.18s 0K 16K 28K 50152K -- - S
0 4% nginx
27888 www www 1 13.20s 12.54s 0K 12K 0K 49892K -- - S
0 4% nginx
Везде стоит CPUNR=0
Т.е., если не ошибаюсь, судя по этим данным - все 4 воркера nginx работает
на 1 ядре процессора из 4x2?!
Поставил 8 воркеров и в nginx добавил worker_cpu_afffinity:
CPU | sys 4% | user 6% | irq 9% | idle 779% | wait
2% | avgf 1.61GHz | avgscal 47% |
cpu | sys 1% | user 2% | irq 9% | idle 87% | cpu000 w
2% | avgf 1.62GHz | avgscal 47% |
cpu | sys 1% | user 2% | irq 0% | idle 97% | cpu004 w
0% | avgf 1.60GHz | avgscal 47% |
cpu | sys 0% | user 1% | irq 0% | idle 99% | cpu006 w
0% | avgf 1.61GHz | avgscal 47% |
cpu | sys 1% | user 1% | irq 0% | idle 99% | cpu005 w
0% | avgf 1.61GHz | avgscal 47% |
...
9066 www www 1 7.68s 9.40s 0K 4K 1068K 31460K -- - R
4 3% nginx
9062 www www 1 4.70s 4.59s 0K 0K 420K 16760K -- - S
0 2% nginx
9063 www www 1 2.20s 2.31s 0K 0K 244K 7356K -- - S
1 1% nginx
9069 www www 1 1.86s 1.63s 0K 8K 96K 5620K -- - S
6 1% nginx
9065 www www 1 1.68s 1.68s 0K 8K 192K 5216K -- - S
3 1% nginx
9064 www www 1 1.17s 1.36s 0K 16K 148K 4016K -- - S
2 0% nginx
9067 www www 1 1.15s 1.16s 0K 0K 212K 3756K -- - S
5 0% nginx
9070 www www 1 0.98s 1.04s 0K 0K 24K 3272K -- - S
7 0% nginx
Картинка лучше, но явно не равномерно.
Posted at Nginx Forum: https://forum.nginx.org/read.php?21,265285,265285#msg-265285
Подробная информация о списке рассылки nginx-ru