Submitted by webinger on Fri, 05/07/2010 - 06:43
I am migrating from my old debian etch server to a new hardware with debian lenny. You have any ideas why the consumption of ressources doubled for php5-cgi processes? The php config files are exactly the same.
Lenny 64 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
31669 webinger 20 0 82500 18m 5416 S 0 0.9 0:00.28 php5-cgi
Etch 64 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
18453 webinger 16 0 64208 9524 5944 S 0.0 0.5 0:34.21 php5-cgi
Status:
Closed (fixed)
Comments
Submitted by webinger on Fri, 05/07/2010 - 07:05 Comment #1
Submitted by kenlyle on Mon, 05/10/2010 - 22:01 Comment #2
Do you mean the .5% to .9%?
That seems pretty trivial, if I am reading it correctly.
Submitted by webinger on Tue, 05/11/2010 - 06:17 Comment #3
If you compare the actual physical memory used - RES. 18m vs 9524
And you not only have one process for one domain you have one process for every client. But accuarcy of the test above was not so good. So I did an extra one
I have 2 unused domains. One on Lenny. One on Etch. Apache reloaded before tests. The php inis are the same. Extensions are the same. No functions or classes disabled.
Test 1. Install Wordpress. 1. Load index.php., 2. Load wp-admin
Lenny PHP Version 5.2.6-1+lenny8 libapache2-mod-fcgid 1:2.2-1
process domain.com/wordpress/
2585 user1 20 0 114m 21m 5760 S 0 1.1 0:00.12 php5-cgi
stays at 21m
process domain.com/wordpress/wp-admin/
2585 user1 20 0 124m 31m 5904 S 0 1.5 0:01.23 php5-cgi
stays at 31m
Etch PHP Version 5.2.0-8+etch16 / libapache2-mod-fcgid 1.10-2
14634 user2 16 0 59036 9556 5732 S 0.0 0.5 0:06.05 php5-cgi
it needs 21M RES on pageload. But then it idles at 9556KB
14634 user2 16 0 59036 9556 5732 S 0.0 0.5 0:13.98 php5-cgi
process domain.com/wordpress/wp-admin/
it shortly jumps to 29M on pageload and goes back to 9556
Test 2 fresh installation of Drupal 6.16
1. process administer backend (uses 2 fcgis)
Lenny
8443 user1 20 0 112m 18m 6004 S 0 0.9 0:02.94 php5-cgi
9897 user1 20 0 110m 17m 5628 S 0 0.9 0:00.07 php5-cgi
Etch
15608 user2 16 0 59728 9260 5772 S 0.0 0.4 0:04.08 php5-cgi
16056 user2 16 0 58552 8700 5380 S 0.0 0.4 0:00.20 php5-cgi
2. process index.php (logged out)
lenny
12710 user1 20 0 110m 17m 5624 S 0 0.9 0:00.39 php5-cgi
stays at maximum ram used
etch
16404 user2 16 0 58716 9072 5608 S 0.0 0.4 0:07.55 php5-cgi
jumps to 17 and idles at 9072
quick apache benchmarks
The speed can not be compared!
The Lenny machine is a new vserver
4.000 MHz CPU-Power (don't know how they calc that)
2.048MB RAM / 4.096MB Flexi-SSD-RAM
Etch machine is about 3 years old.
AMD Athlon 64 3700+ (2200 MHz)
2 GB DDR RAM
lenny tests etch
ab -c 10 -n 400 http://user1.de/drupal/index.php
Top
16740 user1 16 0 67664 17m 5360 R 57.7 0.9 0:01.43 php5-cgi
16738 user1 17 0 67036 16m 5240 R 0.0 0.8 0:00.10 php5-cgi
16739 user1 17 0 65992 15m 5192 R 0.0 0.8 0:00.10 php5-cgi
16737 user1 15 0 59340 9368 5360 S 28.8 0.5 0:02.15 php5-cgi
16736 user1 15 0 59336 9328 5360 S 9.6 0.5 0:01.45 php5-cgi
16404 green-co 16 0 58716 9076 5612 S 0.0 0.4 0:08.58 php5-cgi
Result:
Concurrency Level: 10
Time taken for tests: 40.824 seconds
Complete requests: 400
Failed requests: 0
Write errors: 0
Total transferred: 2432400 bytes
HTML transferred: 2254400 bytes
Requests per second: 9.80 [#/sec] (mean)
Time per request: 1020.610 [ms] (mean)
Time per request: 102.061 [ms] (mean, across all concurrent requests)
Transfer rate: 58.19 [Kbytes/sec] received
etch tests lenny
ab -c 10 -n 400 http://user2.net/drupal/index.php
Top
15350 user2 20 0 110m 17m 5628 S 24 0.9 0:03.00 php5-cgi
15353 user2 20 0 110m 17m 5628 S 24 0.9 0:03.02 php5-cgi
15355 user2 20 0 111m 18m 5628 R 24 0.9 0:02.88 php5-cgi
15348 user2 20 0 111m 18m 5628 R 24 0.9 0:02.93 php5-cgi
15354 user2 20 0 112m 18m 5628 R 24 0.9 0:02.96 php5-cgi
15356 user2 20 0 110m 17m 5628 R 24 0.9 0:02.90 php5-cgi
15349 user2 20 0 110m 17m 5628 R 24 0.9 0:02.99 php5-cgi
15352 user2 20 0 110m 17m 5628 R 24 0.9 0:02.92 php5-cgi
12710 user2 20 0 110m 17m 5628 R 23 0.9 0:04.21 php5-cgi
15351 user2 20 0 112m 18m 5628 R 23 0.9 0:02.88 php5-cgi
Result
Concurrency Level: 10
Time taken for tests: 14.744928 seconds
Complete requests: 400
Failed requests: 0
Write errors: 0
Total transferred: 2476800 bytes
HTML transferred: 2254400 bytes
Requests per second: 27.13 [#/sec] (mean)
Time per request: 368.623 [ms] (mean)
Time per request: 36.862 [ms] (mean, across all concurrent requests)
Transfer rate: 163.99 [Kbytes/sec] received
Interesting: Lenny starts 10 processes Etch not. Lennys Fcgi preserves the maximum RAM used. So it is okay that way I think.
Submitted by webinger on Tue, 05/11/2010 - 06:16 Comment #4