Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache HTTP performance
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 908

PostPosted: Wed Feb 12, 2025 6:00 pm    Post subject: Apache HTTP performance Reply with quote

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
Code:
LogLevel debug

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
Code:
MaxRequestWorkers

to 256 which is the same value as
Code:
ServerLimit


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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum