Vieri l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 18 Dec 2005 Posts: 908
|
Posted: Wed Feb 12, 2025 6:00 pm Post subject: Apache HTTP performance |
|
|
Hi,
I've been running Apache HTTP on Gentoo for years without issues.
However, recently I'm seeing performance issues (very slow page loading on clients, etc.) that are temporarily fixed when issuing a service "reload" or "restart".
After a while (a few hours), the same symptoms appear (slow response).
I don't see anything wrong in the Gentoo system (top, free, etc.).
Code: | # ps aux | grep -c /usr/sbin/apache2
42 |
I check each apache process with (but I'm not sure what to make of this):
Code: | # lsof -p APACHE_PID | more |
I configured this so I can take a look at it next time I get performance issues (if I can actually connect...):
Code: | http://localhost/server-status |
I checked the logs in /var/log...
I didn't find much (I use ModSecurity and I get tons of blocked requests logged).
No Apache errors...
I'm using the prefork MPM. I suppose I can't easily switch between MPMs. I would need to recompile...
I'm wondering if I'm getting too many client connections lately. I guess I should see that in the Apache server-status page somehow.
I define an ErrorLog for each VirtualHost.
LogLevel is undefined.
I'm not sure
would help or make things even worse.
Any ideas?
[UPDATE]
When it happened again (performance slowdown) I got this:
Code: | Server uptime: 3 minutes 17 seconds
Server load: 0.48 0.81 1.08
Total accesses: 3854 - Total Traffic: 172.1 MB - Total Duration: 5403805
CPU Usage: u8.36 s3.57 cu.28 cs.32 - 6.36% CPU load
19.6 requests/sec - 0.9 MB/second - 45.7 kB/request - 1402.13 ms/request
150 requests currently being processed, 0 workers gracefully restarting, 0 idle workers |
So then I increased
to 256 which is the same value as
Now I have:
Code: | Server uptime: 5 minutes 14 seconds
Server load: 0.50 0.94 1.03
Total accesses: 9448 - Total Traffic: 313.8 MB - Total Duration: 9371951
CPU Usage: u13.23 s7.06 cu10.3 cs4.14 - 11.1% CPU load
30.1 requests/sec - 1.0 MB/second - 34.0 kB/request - 991.951 ms/request
151 requests currently being processed, 0 workers gracefully restarting, 5 idle workers |
and the system is performing OK again.
I also think it can handle 256, so I'll see how far that goes.
Moving to event MPM would be nice, but I'd need to rebuild as I originally emerged with prefork only. |
|