Public bug reported:

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.

** Affects: update-notifier (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1227000

Title:
  update-notifier is polling every 5 seconds

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1227000/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to