all, i have some observations since i worked for a popular months ago. we deployed apache as front end in produciton system, and launched an ads system(pretty large scale, say One billion pv per day), just to find out that:
- under the load of up to 150 Hits/second per box, system all running well in cpu/mem/network-IO, except we see 90+ apache processed in state of "Closing Connection", while only 15 processes in "Reading and Writing" status. - i thought it somehow caused by inappropriate setting of Timeout in apache.conf or sysctl(we set KeepAlive to off), but things remained after adjusting them to 2 seconds. - i finally noticed the time of lingering close while tracking source code and wondering if i shoud consider more tests to have lingering close disabled now. because i really don't hope 70% apache processes are wasting power unecessarily. here is some thoughts to be fed back: - is lingering_close definitely necessary when KeepAlive is off? - if yes, shall we set default SECONDS_TO_LINGER and MAX_SECS_TO_LINGER value a bit smaller? - any chance i missed the point and blamed lingering_close wrongly? - any good advice to alleviate my concern? our env: apache-2.2.11, RHEL5 64bit, Dual QuadCore Xeon, 8+G ram, supposing network speed is good enough. thanks in advance.