Bug 313421 - apache is waking up the cpu when idle
Summary: apache is waking up the cpu when idle
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: httpd
Version: rawhide
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Joe Orton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: wakeup
TreeView+ depends on / blocked
 
Reported: 2007-10-01 00:49 UTC by William Lovaton
Modified: 2007-11-30 22:12 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-10-02 10:26:21 UTC


Attachments (Terms of Use)

Description William Lovaton 2007-10-01 00:49:44 UTC
According to powertop httpd is waking up the cpu one time per second while doing
nothing:
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
this??

Comment 1 Joe Orton 2007-10-02 10:26:21 UTC
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 16:10:20 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.