Bug 313421

Summary: apache is waking up the cpu when idle
Product: [Fedora] Fedora Reporter: William Lovaton <walovaton>
Component: httpdAssignee: Joe Orton <jorton>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-10-02 06:26:21 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 204948    

Description William Lovaton 2007-09-30 20:49:44 EDT
According to powertop httpd is waking up the cpu one time per second while doing
7,6% (  1,0)             httpd : schedule_timeout (process_timeout)

Doing an strace on the httpd root process I got this:
[root@localhost ~]# strace -ttt -p 12021
Process 12021 attached - interrupt to quit
1191198615.761495 select(0, NULL, NULL, NULL, {0, 687000}) = 0 (Timeout)
1191198616.449068 waitpid(-1, 0xbf981958, WNOHANG|WSTOPPED) = 0
1191198616.449309 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
1191198617.449049 waitpid(-1, 0xbf981958, WNOHANG|WSTOPPED) = 0
1191198617.449274 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
1191198618.449057 waitpid(-1, 0xbf981958, WNOHANG|WSTOPPED) = 0
1191198618.449284 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
1191198619.449008 waitpid(-1, 0xbf981958, WNOHANG|WSTOPPED) = 0
1191198619.449312 select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
1191198620.449053 waitpid(-1, 0xbf981958, WNOHANG|WSTOPPED) = 0

I don't really understand that log, what is it doing? is there any way to solve
Comment 1 Joe Orton 2007-10-02 06:26:21 EDT
It's not really possible to change this within the current architecture; the
parent wakes up once per second to be able to dynamically respond to changes in
load (e.g. all the children have become busy and more are needed).
Comment 2 William Lovaton 2007-10-04 12:10:20 EDT
Joe, that's fair enough, however, I'd like to know your thoughts about this,
possibly stupid, idea:  Increase the time to wakeup when there is no load in the
server for some time, probably a few seconds after MinSpareServers have been
reached and there is no increase in the load.

The main goal behind this for me is to reduce the wake ups during nights where
my web application is almost unused, during the day it's a very loaded
application so the current behavior is not really a problem.  It's just that it
would be nice to save a few more watts during nights.

Thanks for your help.