different centos version + different nginx version make different performance
Xiaokai Wang
xiaokai.wang at live.com
Wed Nov 4 03:50:45 UTC 2015
hi steve,
Thanks your reply, it's so nice to me! Sorry to return you back lately.
Yes, it' hard for a totally fair scenario, maybe we can concentrate on main factor?
The environment nginx is used as a proxy, and as we all know it's hardly consumed memory.
The nginx is main task, the others can be leaved out and qps is 10000/s, all requests are light.
The load average is different, because from centos 5.4 to centos 7.1 the load average computed algorithm is changed, the new version reflect how many core fully used.
Confused me is that us% is less than sy%, is that strange? %cpu double the old %cpu.
nginx-1.8.0 has a much longer time, anybody use that on other version system? the statistics?
nobody use nginx-1.8.0 on centos 7.1?
I am much fresh on these problems, Please give me your advice, thanks.
-----Regards,Xiaokai
Subject: Re: different centos version + different nginx version make different performance
To: nginx at nginx.org
From: steve at greengecko.co.nz
Date: Tue, 3 Nov 2015 14:29:08 +1300
Hi,
On 11/02/2015 08:48 PM, Xiaokai Wang
wrote:
hi
all,
Sorry to bother you again, I find pictures cannt show
clearly, so copy statistics below. thanks again.
I find a performace decreasing when I update centos5.4
to centos7.1 and the same time nginx-1.2.7 to nginx-1.8.0.
Exacted statistics as below:
Tasks: 177 total, 3 running,
173 sleeping, 0 stopped, 1 zombie
Cpu0 : 3.7%us, 3.3%sy,
0.0%ni, 92.4%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu1 : 4.7%us, 3.7%sy,
0.0%ni, 91.0%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu2 : 3.6%us, 3.0%sy,
0.0%ni, 92.7%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu3 : 4.0%us, 3.0%sy,
0.0%ni, 92.7%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu4 : 3.7%us, 3.0%sy,
0.0%ni, 93.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu5 : 3.3%us, 2.6%sy,
0.0%ni, 93.4%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu6 : 3.3%us, 3.3%sy,
0.0%ni, 93.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu7 : 4.0%us, 2.7%sy,
0.0%ni, 92.7%id, 0.0%wa, 0.0%hi, 0.7%si, 0.0%st
Cpu8 : 4.0%us, 2.7%sy,
0.0%ni, 93.0%id, 0.0%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu9 : 4.0%us, 3.7%sy,
0.0%ni, 91.3%id, 0.7%wa, 0.0%hi, 0.3%si, 0.0%st
Cpu10 : 2.7%us, 2.0%sy,
0.0%ni, 82.4%id, 0.0%wa, 0.7%hi, 12.3%si, 0.0%st
Cpu11 : 2.3%us, 2.3%sy,
0.0%ni, 64.7%id, 0.0%wa, 1.0%hi, 29.7%si, 0.0%st
Mem: 12273740k total, 9946612k
used, 2327128k free, 5475768k buffers
Swap: 8385920k total, 0k
used, 8385920k free, 2030764k cached
PID USER PR NI VIRT
RES SHR S %CPU %MEM TIME+ COMMAND
26770 nobody 15 0 91076
32m 1196 S 9.0 0.3 997:15.34 proxy-nginx
26769 nobody 15 0 91936
33m 1196 S 7.7 0.3 1043:52 proxy-nginx
26778 nobody 15 0 91560
33m 1196 R 7.7 0.3 921:28.59 proxy-nginx
26772 nobody 15 0 92164
33m 1196 S 7.3 0.3 920:47.31 proxy-nginx
26773 nobody 15 0 91808
33m 1200 S 7.3 0.3 930:41.83 proxy-nginx
26776 nobody 15 0 92332
33m 1196 S 7.3 0.3 934:57.61 proxy-nginx
26777 nobody 15 0 92504
33m 1196 S 7.3 0.3 926:08.37 proxy-nginx
26771 nobody 16 0 92176
33m 1196 S 7.0 0.3 955:29.21 proxy-nginx
26775 nobody 15 0 91688
33m 1200 R 7.0 0.3 939:46.60 proxy-nginx
26774 nobody 15 0 92044
33m 1196 S 6.3 0.3 842:52.49 proxy-nginx
26780 nobody 15 0 90772
32m 1200 S 6.0 0.3 696:50.17 proxy-nginx
26779 nobody 15 0 90380
31m 1196 S 5.7 0.3 832:16.64 proxy-nginx
centos5.4 + nginx-1.2.7
Tasks: 276 total, 6 running,
268 sleeping, 2 stopped, 0 zombie
%Cpu0 : 8.2 us, 8.9 sy, 0.0
ni, 73.4 id, 0.3 wa, 0.0 hi, 9.2 si, 0.0 st
%Cpu1 : 7.9 us, 7.6 sy, 0.0
ni, 75.2 id, 0.0 wa, 0.0 hi, 9.3 si, 0.0 st
%Cpu2 : 6.7 us, 8.1 sy, 0.0
ni, 77.4 id, 0.0 wa, 0.0 hi, 7.8 si, 0.0 st
%Cpu3 : 7.4 us, 8.0 sy, 0.0
ni, 79.6 id, 0.0 wa, 0.0 hi, 5.0 si, 0.0 st
%Cpu4 : 6.4 us, 7.1 sy, 0.0
ni, 78.8 id, 0.0 wa, 0.0 hi, 7.8 si, 0.0 st
%Cpu5 : 7.0 us, 7.3 sy, 0.0
ni, 78.4 id, 0.0 wa, 0.0 hi, 7.3 si, 0.0 st
%Cpu6 : 27.3 us, 8.7 sy, 0.0
ni, 59.3 id, 0.0 wa, 0.0 hi, 4.7 si, 0.0 st
%Cpu7 : 8.3 us, 8.0 sy, 0.0
ni, 75.1 id, 0.0 wa, 0.0 hi, 8.7 si, 0.0 st
%Cpu8 : 6.9 us, 8.6 sy, 0.0
ni, 78.7 id, 0.0 wa, 0.0 hi, 5.8 si, 0.0 st
%Cpu9 : 15.4 us, 8.6 sy, 0.0
ni, 69.2 id, 0.0 wa, 0.0 hi, 6.8 si, 0.0 st
%Cpu10 : 23.9 us, 8.8 sy, 0.0
ni, 64.0 id, 0.0 wa, 0.0 hi, 3.4 si, 0.0 st
%Cpu11 : 40.5 us, 9.1 sy, 0.0
ni, 41.2 id, 0.0 wa, 0.0 hi, 9.1 si, 0.0 st
KiB Mem : 12126740 total,
159380 free, 607028 used, 11360332 buff/cache
KiB Swap: 8388604 total,
8388604 free, 0 used. 10895304 avail Mem
PID USER PR NI VIRT
RES SHR S %CPU %MEM TIME+ COMMAND
6876 root 20 0 4604
864 496 R 85.4 0.0 0:52.28 gzip
12806 nobody 20 0 61508
35056 1272 R 18.3 0.3 282:22.99 nginx
12810 nobody 20 0 61044
34596 1272 S 17.6 0.3 292:06.85 nginx
12799 nobody 20 0 60768
34240 1272 R 16.9 0.3 275:36.83 nginx
12801 nobody 20 0 60764
34204 1272 S 15.6 0.3 277:38.95 nginx
12802 nobody 20 0 61468
34964 1272 S 15.3 0.3 226:20.06 nginx
12800 nobody 20 0 60716
34268 1272 R 14.6 0.3 276:13.54 nginx
12805 nobody 20 0 61424
34976 1272 S 14.6 0.3 241:46.36 nginx
12807 nobody 20 0 61128
34680 1272 S 14.6 0.3 245:35.70 nginx
12808 nobody 20 0 60640
34096 1272 R 14.6 0.3 255:17.38 nginx
12809 nobody 20 0 60716
34268 1272 S 14.6 0.3 244:02.67 nginx
12803 nobody 20 0 61396
34908 1272 S 14.3 0.3 284:18.39 nginx
12804 nobody 20 0 60568
34120 1272 S 14.0 0.3 282:03.64 nginx
centos7.1 + nginx-1.8.0
From the statistics, we can see that updated
environment cpu-load average is almostly doubled previous
environment.
Of course the sysctl.conf and nginx-conf are not
changed after updating environment. It confused me and I
dont know why.
Anybody meet the problem? Please give me a help,
thanks.
-----
Regards,
Xiaokai
It's not really a fair check is it? New server is running 50% more
processes, and most importantly is using 600MB instead of 10GB
memory. I'd start off looking at where the memory is used on the old
server.
I'd just report CPU usage stats, rather than per cpu. nginx doesn't
really use much cpu at all, but server-side programming languages (
PHP especially from experience ) do.
It would probably be worth installing a monitoring package such as
munin or cacti to get a better picture of what's going on.
hth,
Steve
--
Steve Holdoway BSc(Hons) MIITP
http://www.greengecko.co.nz
Linkedin: http://www.linkedin.com/in/steveholdoway
Skype: sholdowa
_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151104/58f5d88b/attachment.html>
More information about the nginx
mailing list