update-notifier is polling every 5 seconds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
The Ubuntu Power Consumption Project |
Fix Released
|
Undecided
|
Unassigned | ||
update-notifier (Ubuntu) |
Fix Released
|
Medium
|
Brian Murray |
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_
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_
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.
Related branches
- Dennis Kaarsemaker: Pending requested
- Diff: 0 lines
affects: | update-notifier (Ubuntu) → ubuntu-power-consumption |
Changed in update-notifier (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Brian Murray (brian-murray) |
Changed in ubuntu-power-consumption: | |
status: | New → Fix Released |
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.