[Bug 1227000] Re: update-notifier is polling every 5 seconds
Brian Murray
brian at ubuntu.com
Fri Mar 14 21:51:04 UTC 2014
I was looking at this today and noticed that the things we are actually
monitoring (if somebody is using an UPSTART_SESSION, which I understand
most desktop environments to be doing) are all package related. Given
that package operations are less frequent than crashes or things we were
monitoring previous to the conversion to upstart session jobs, I'd say
we could increase the poll interval significantly.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1227000
Title:
update-notifier is polling every 5 seconds
Status in The Ubuntu Power Consumption Project:
New
Status in “update-notifier” package in Ubuntu:
New
Bug description:
In order to reduce system wakeups to improve laptop battery life I've
noticed that update-notifier is polling every 5 seconds, strace'ing
the process shows:
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4373) = 0 (Timeout)
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4995) = 0 (Timeout)
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4994) = 0 (Timeout)
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4999) = 0 (Timeout)
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=5, events=POLLIN}, {fd=6, events=POLLIN}, {fd=3, events=POLLIN}], 3, 4995) = 0 (Timeout)
recvfrom(6, 0x8b16e4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
It appears that file_monitor_periodic_check() is being called every 5
seconds and it checks to see if variables such as un->crashreport is
NULL or un->dpkg_was_run is true.
From a casual look at the code, these are set by monitor_cb() which is
called when files are modified, so does this make the 5 second poll
unnecessary? Can we remove the 5 second polling and just do the
file_monitor_periodic_checks when monitor_cb detects something to act
upon?
As it stands, polling every 5 seconds unnecessarily keeps the CPU out
of deep sleep C states and consumes a small amount of power. This is
a low priority issue, but it would be a nice to have fix to make the
code a little more power optimal.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-consumption/+bug/1227000/+subscriptions
More information about the foundations-bugs
mailing list