Monitoring running processes by IO

Bug #531773 reported by Konrad Klimaszewski
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
powernap
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

I think that PowerNap is a very useful utility. However the fact that it is able
to only check if an app is present in the process table is a bit limiting for me.
I'm using PowerNap to reduce the power consumption of my file/web server.
As it is rarely used (usually once per day) I wanted to suspend it when no one is
accessing the files or the web pages for 1/2h or so. Then the server
can be quickly brought up by sending an unicast package (usually ping
or http / nfs request). I'm using "ethtool -s eth1 wol u" to make it
work.

To get such setup running I modified PowerNap to monitor the IO
activity of processes. If there was none in the ABSENT_SECONDS period
PowerNap will be able to suspend the server. I think I managed not to
alter the way PowerNap works when the IO monitoring is not needed.
Also it would be now very easy to add CPU usage monitoring, but for my
purpose IO serves better. This is mainly because lighttpd seems to
wakeup every now and then even if there are no http requests ...

In attachment you'll find a patch against revision 140 from your
trunk. I've been running this for over a month now and it seems to
work as expected. If you'll find this functionality useful then I
would be very happy to see it in some future release :-).

Cheers,
Konrad

Related branches

Revision history for this message
Konrad Klimaszewski (graag) wrote :
description: updated
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Great feature and patch.

I'll get this merged!

Changed in powernap:
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Dustin Kirkland (kirkland)
Revision history for this message
Adam Sutton (adamsutton) wrote :

I have included my own IO monitor code in the new branch I've created. This was originally based on Konrad's patch, although I've subsequently re-written large portions of the powernapd code to hopefully make it more modular.

Having spoken to Dustin the aim is to get this into the Maverick release, assuming I can finish some of the other changes I'd like to include, get it fully tested and Dustin is happy to merge the changes.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Adam, can you please link that branch to this bug? Click "Link a related branch".

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Merge window is open for Maverick, and I'd really like to support this feature for Maverick. Adam, just let me know when you have a branch ready for merging.

Revision history for this message
Konrad Klimaszewski (graag) wrote :

Adam, I browsed through the code and it looks quite impressive. I'll give it a try when I'll have few minutes to spare (finishing my PhD thesis so not much sleep lately :-) ).

Revision history for this message
Adam Sutton (adamsutton) wrote :

I'm obviously still working on things and unfortunately not a lot has happened in the last week. However I've just tidied things up a bit on my machine and at least come up with a configuration which roughly speaking should replace what I currently run on my NAS box (which was my first cut at a rewrite).

I'll try and get that running and give it a few days to bed in and get some idea of how its performing. However there are still a few things I'm generally not happy about. Mainly related to the monitor configuration.

Revision history for this message
Adam Sutton (adamsutton) wrote :

The original patch was merged into my branch and subsequently built upon as part of my changes. These changes are now in trunk so this should probably be considered fixed in the next release. However there is ongoing discussion about the future development of powernap.

Changed in powernap:
status: Triaged → Fix Committed
Changed in powernap:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.