Re: KeepAlive setting under heavy load

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 17, 2011 at 10:09, Pratte, Gil <Gil.Pratte@xxxxxxxxxxx> wrote:

I have read conflicting reports regarding the KeepAlive setting. Under load the website has hundreds to thousands of users logged in at any given time. I am in the process of tuning it for performance under load.

My question is: Should I set KeepAlive to On or Off for a website under heavy load?


This depends on what you are trying to achieve and what resources your server is utilizing. Bear in mind, KeepAlive allows multiple requests to be sent over one TCP connection. It's useful if you have a lot of static content (ex. HTML pages with images). Turn it off if you are using more (or all) dynamic content or server-side scripting that does not require static content to be served from this Apache's instance. 

Your main concern when the KeepAlive is ON should be with KeepAliveTimeout which determines how long Apache waits on the next request. I would set this value low (between 1-3 seconds). If too high, child processes get tied up waiting on the client when they could be used for serving out content to new clients connecting or already connected.

Keep in mind this is very arguable and everyone will have a different opinion. The best thing is to test, test again, and test more. Do load testing and see what gives you the best results.

Cheers,

Craig

[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux