Hoher CPU verbrauch bei apache
Posted: 2007-02-18 21:41
Hallo,
ich habe einen Shop am Laufen auf nem neuen 1u1 3XL server, dual core, 4 gig ram.Debian. Zend Optimizer
allerdings ist der CPU verbrauch immens. Hatten vorher SUSE mit 2 gig und single core proz, da wars kleiner.
top - 21:31:58 up 37 days, 23:03, 3 users, load average: 17.52, 19.52, 16.11
Tasks: 101 total, 15 running, 77 sleeping, 9 stopped, 0 zombie
Cpu(s): 93.1% us, 6.7% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.2% si
Mem: 4050504k total, 2147536k used, 1902968k free, 12028k buffers
Swap: 1953784k total, 4424k used, 1949360k free, 1356852k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10375 www-data 16 0 103m 41m 4212 R 33.6 1.1 0:09.50 apache2
10384 www-data 16 0 71708 9856 4156 S 20.7 0.2 0:02.84 apache2
10419 www-data 17 0 100m 38m 4136 R 18.1 1.0 0:02.82 apache2
10417 www-data 16 0 94268 31m 4144 R 16.5 0.8 0:01.23 apache2
10321 www-data 16 0 96316 33m 4776 R 15.8 0.8 0:13.99 apache2
10388 www-data 15 0 102m 41m 4192 S 12.8 1.1 0:03.88 apache2
10403 www-data 15 0 71628 9776 4156 S 10.9 0.2 0:03.03 apache2
30685 mysql 15 0 828m 254m 6320 S 9.2 6.4 75:43.28 mysqld
10390 www-data 16 0 92536 29m 4144 R 8.9 0.7 0:03.74 apache2
10404 www-data 16 0 96440 33m 4356 R 8.9 0.8 0:04.53 apache2
10389 www-data 16 0 98572 35m 4204 R 8.6 0.9 0:03.88 apache2
10437 www-data 15 0 102m 41m 4164 S 8.6 1.0 0:01.38 apache2
10356 www-data 16 0 102m 41m 4840 R 7.2 1.1 0:10.29 apache2
10382 www-data 16 0 85884 23m 4148 R 5.9 0.6 0:04.34 apache2
10395 www-data 16 0 81864 19m 4184 R 3.6 0.5 0:05.30 apache2
10407 www-data 17 0 99.4m 38m 4148 R 3.6 1.0 0:02.71 apache2
10385 www-data 15 0 71628 9776 4156 S 1.3 0.2 0:03.72 apache2
10409 www-data 15 0 71608 9744 4148 S 0.7 0.2 0:03.41 apache2
10427 www-data 16 0 74196 11m 4144 R 0.7 0.3 0:01.52 apache2
config
Timeout 30
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive Off
KeepAlive Off
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers ......... number of server processes to start
# MinSpareServers ...... minimum number of server processes which are kept spare
# MaxSpareServers ...... maximum number of server processes which are kept spare
# MaxClients ........... maximum number of server processes allowed to start
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 3
MinSpareServers 5
MaxSpareServers 5
MaxClients 100
MaxRequestsPerChild 400
</IfModule>
php wird wohl als modul geladen
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
So 3000 visits am Tag.
irgendwelche Tipps, wo ich anfangen kann zu suchen?
Gruß
Harald
ich habe einen Shop am Laufen auf nem neuen 1u1 3XL server, dual core, 4 gig ram.Debian. Zend Optimizer
allerdings ist der CPU verbrauch immens. Hatten vorher SUSE mit 2 gig und single core proz, da wars kleiner.
top - 21:31:58 up 37 days, 23:03, 3 users, load average: 17.52, 19.52, 16.11
Tasks: 101 total, 15 running, 77 sleeping, 9 stopped, 0 zombie
Cpu(s): 93.1% us, 6.7% sy, 0.0% ni, 0.0% id, 0.0% wa, 0.0% hi, 0.2% si
Mem: 4050504k total, 2147536k used, 1902968k free, 12028k buffers
Swap: 1953784k total, 4424k used, 1949360k free, 1356852k cached
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10375 www-data 16 0 103m 41m 4212 R 33.6 1.1 0:09.50 apache2
10384 www-data 16 0 71708 9856 4156 S 20.7 0.2 0:02.84 apache2
10419 www-data 17 0 100m 38m 4136 R 18.1 1.0 0:02.82 apache2
10417 www-data 16 0 94268 31m 4144 R 16.5 0.8 0:01.23 apache2
10321 www-data 16 0 96316 33m 4776 R 15.8 0.8 0:13.99 apache2
10388 www-data 15 0 102m 41m 4192 S 12.8 1.1 0:03.88 apache2
10403 www-data 15 0 71628 9776 4156 S 10.9 0.2 0:03.03 apache2
30685 mysql 15 0 828m 254m 6320 S 9.2 6.4 75:43.28 mysqld
10390 www-data 16 0 92536 29m 4144 R 8.9 0.7 0:03.74 apache2
10404 www-data 16 0 96440 33m 4356 R 8.9 0.8 0:04.53 apache2
10389 www-data 16 0 98572 35m 4204 R 8.6 0.9 0:03.88 apache2
10437 www-data 15 0 102m 41m 4164 S 8.6 1.0 0:01.38 apache2
10356 www-data 16 0 102m 41m 4840 R 7.2 1.1 0:10.29 apache2
10382 www-data 16 0 85884 23m 4148 R 5.9 0.6 0:04.34 apache2
10395 www-data 16 0 81864 19m 4184 R 3.6 0.5 0:05.30 apache2
10407 www-data 17 0 99.4m 38m 4148 R 3.6 1.0 0:02.71 apache2
10385 www-data 15 0 71628 9776 4156 S 1.3 0.2 0:03.72 apache2
10409 www-data 15 0 71608 9744 4148 S 0.7 0.2 0:03.41 apache2
10427 www-data 16 0 74196 11m 4144 R 0.7 0.3 0:01.52 apache2
config
Timeout 30
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
KeepAlive Off
KeepAlive Off
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
MaxKeepAliveRequests 100
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
KeepAliveTimeout 15
##
## Server-Pool Size Regulation (MPM specific)
##
# prefork MPM
# StartServers ......... number of server processes to start
# MinSpareServers ...... minimum number of server processes which are kept spare
# MaxSpareServers ...... maximum number of server processes which are kept spare
# MaxClients ........... maximum number of server processes allowed to start
# MaxRequestsPerChild .. maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 3
MinSpareServers 5
MaxSpareServers 5
MaxClients 100
MaxRequestsPerChild 400
</IfModule>
php wird wohl als modul geladen
LoadModule php5_module /usr/lib/apache2/modules/libphp5.so
So 3000 visits am Tag.
irgendwelche Tipps, wo ich anfangen kann zu suchen?
Gruß
Harald