This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Problems with the load average of my system

Discussion specific to symfony 1.1.x stable

Problems with the load average of my system

by niXEn » Fri Feb 11, 2011 8:08 pm

Hello,

I have a symfony application running on a Centos 5 on a server with the following characteristics:


model name : Intel(R) Xeon(R) CPU E5420 @ 2.50GHz
cpu MHz : 2500.256
cache size : 6144 KB
cpu cores : 4
RAM memory : 4 GB

when i run a benchmark test with ab:

Code: Select all
ab -n 1000 -c 10 -p parameters http://192.168.0.6/index.php
This is ApacheBench, Version 2.0.40-dev <$Revision: 1.146 $> apache-2.0
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.0.6 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software:        Apache/2.2.3
Server Hostname:        192.168.60.6
Server Port:            80

Document Path:          /index.php
Document Length:        4243 bytes

Concurrency Level:      10
Time taken for tests:   42.863707 seconds
Complete requests:      1000
Failed requests:        0
Write errors:           0
Total transferred:      4604000 bytes
Total POSTed:           203000
HTML transferred:       4243000 bytes
Requests per second:    23.33 [#/sec] (mean)
Time per request:       428.637 [ms] (mean)
Time per request:       42.864 [ms] (mean, across all concurrent requests)
Transfer rate:          104.89 [Kbytes/sec] received
                        4.62 kb/s sent
                        109.52 kb/s total

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   0.0      0       0
Processing:   168  427 158.2    407    1888
Waiting:      167  426 158.1    406    1887
Total:        168  427 158.2    407    1888

Percentage of the requests served within a certain time (ms)
  50%    407
  66%    457
  75%    500
  80%    526
  90%    622
  95%    698
  98%    814
  99%    868
 100%   1888 (longest request)


and the results of my top is the following:

Code: Select all
top - 12:27:01 up 10 days, 18:55,  4 users,  load average: 7.41, 2.86, 1.14
Tasks: 162 total,  16 running, 145 sleeping,   0 stopped,   1 zombie
Cpu(s): 33.1%us, 66.0%sy,  0.0%ni,  0.3%id,  0.2%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   3368040k total,   433736k used,  2934304k free,    21596k buffers
Swap:   104412k total,      136k used,   104276k free,   134208k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
11616 apache    15   0  186m  20m 9.8m S 27.7  0.6   0:19.94 httpd
11492 apache    16   0  190m  24m 9.9m S 27.4  0.7   0:20.84 httpd
12583 apache    16   0  186m  20m 9.8m S 26.4  0.6   0:10.03 httpd
11569 apache    15   0  186m  20m 9.8m R 23.8  0.6   0:20.55 httpd
11484 apache    16   0  191m  25m  10m R 23.4  0.8   0:21.78 httpd
12607 apache    15   0  186m  20m 9.8m S 23.4  0.6   0:09.30 httpd
12608 apache    16   0  186m  20m 9.8m R 23.1  0.6   0:08.72 httpd
11619 apache    16   0  186m  20m 9.8m R 22.8  0.6   0:19.69 httpd
12635 apache    15   0  186m  20m 9.8m S 22.8  0.6   0:08.88 httpd
12633 apache    15   0  186m  20m 9.8m S 21.8  0.6   0:09.09 httpd
12636 apache    16   0  186m  20m 9.8m S 21.8  0.6   0:08.34 httpd
11486 apache    16   0  188m  23m  10m R 21.5  0.7   0:21.58 httpd
11589 apache    16   0  186m  20m 9.8m S 21.5  0.6   0:19.74 httpd
11618 apache    16   0  186m  20m 9.8m S 21.5  0.6   0:19.31 httpd
11490 apache    16   0  191m  25m  10m S 20.1  0.8   0:21.88 httpd
12634 apache    15   0  186m  20m 9.8m R 18.8  0.6   0:08.95 httpd
11590 apache    15   0  186m  20m 9.8m S 18.5  0.6   0:19.81 httpd
  522 root      10  -5     0    0    0 S  0.3  0.0   0:55.12 kjournald
 6357 postgres  25   0 21092 2904 2496 R  0.3  0.1   0:52.14 postmaster
12760 root      15   0  2336 1052  796 R  0.3  0.0   0:00.05 top
    1 root      15   0  2072  616  532 S  0.0  0.0   0:01.66 init



As you can see the load average increase till 7, and the cpu cosumption always 100%, and only with 10 concurrent reqs, total: 1000 reqs on 42 seconds.

The APC Opcode cache is on, there is no querys involved here because is the initial login page, the symfony version is 1.1.9, xdebug off for the test.

The following is the results of the debug request on webgrind based on xdebug.
http://postimage.org/image/1lnfaoy84/

It's ok to say that symfony needs a huge hardware to properly work without high system load or there is something broke with my hardware/configuration/code?

Thanks in advance for your help.
niXEn
Junior Member
 
Posts: 13
Joined: Thu Jan 27, 2011 7:35 pm