0

I run a web server at my work that is experiencing high latency at intermittent times during peak times. The high latency always happens in the first request (requesting the page), according to Firebug. After the first response comes back, everything else loads quickly. I'm experiencing this while on the same network as the web server. During peak times we have about 1200 concurrent connections.

I've been doing a ton of research on MaxClients directive and have used the 'rule of thumb' to identify what value to use (400). Each httpd process averages to around 25mb. We have a 2gig connection for our organization that this web server serves from. Also, the web server is a VM with 4 dedicated cores and 12GB of RAM running RHEL 5.6 and apache.

With 400 MaxClients during peak times, I experience constant timeouts accessing the web server. When I set it to a high number like 1000, it seems to alleviate the timeouts, but I still get intermittent high latency initial responses. Can anyone shed some light as to what I could do to remedy this issue?

Timeout 10
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15

<IfModule prefork.c>
StartServers       20
MinSpareServers    5
MaxSpareServers   20
ServerLimit      400
MaxClients       400
MaxRequestsPerChild  4000
</IfModule>

1 Answer 1

2

It could be any number of things, but I'd take a look at swap rates and disk I/O, and see if either you're needing to swap in pages, or read a pile of stuff from disk to service the initial request, and then serve everything out of RAM on subsequent requests.

2
  • Swap is low, so it doesn't look like the box is thrashing. CPU usage never goes above 20% either. Disk I/O is something I haven't looked at yet. Do you recommend anything for that?
    – Mike
    Mar 4, 2012 at 19:29
  • 1
    "Swap is low" doesn't mean it's not thrashing. sar, iotop, vmstat, are all tools that can help you investigate disk I/O rates (and swap rates, for that matter).
    – womble
    Mar 4, 2012 at 19:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .