friends-dispatcher is a little busy doing data updates on idle systems

Bug #1238083 reported by Colin Ian King
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
friends (Ubuntu)
Fix Released
Undecided
Ken VanDine

Bug Description

I've noticed that on an idle system friends-dispatcher is doing writes to a bunch of files and logs periodically.

install fatrace, cd to / and run it and you will see the activity.

This is what I observed over a 30 minute interval on the ubuntu-touch phone:

14:21:52.912959 friends-service(2226): WO /home/phablet/.local/share/resources/com.canonical.Friends.Streams.BQ9W4W
14:21:52.931757 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams
14:26:52.913722 friends-service(2226): WO /home/phablet/.local/share/resources/com.canonical.Friends.Streams.V39W4W
14:26:53.072627 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams
14:31:52.912653 friends-service(2226): O /home/phablet/.local/share/resources/com.canonical.Friends.Streams.LD9W4W
14:31:52.913020 friends-service(2226): W /home/phablet/.local/share/resources/com.canonical.Friends.Streams.LD9W4W
14:31:52.933649 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams.LD9W4W
14:31:54.668513 friends-dispatc(2517): CW /home/phablet/.config/libaccounts-glib/accounts.db
14:31:54.781733 friends-dispatc(2517): W /tmp/oe77uw
14:31:54.781855 friends-dispatc(2517): CW /tmp/oe77uw
14:31:54.946894 friends-dispatc(2517): W /home/phablet/.cache/friends/friends.log
14:31:54.952448 friends-dispatc(2517): W /home/phablet/.cache/friends/friends.log
14:31:54.953394 friends-dispatc(2517): W /home/phablet/.cache/friends/friends.log
14:32:24.846278 friends-dispatc(2517): W /home/phablet/.cache/friends/friends.log
14:32:24.847956 friends-dispatc(2517): CW /home/phablet/.cache/friends/friends.log
14:32:24.907710 friends-dispatc(2517): CW /home/phablet/.config/libaccounts-glib/accounts.db-shm
14:32:24.907710 friends-dispatc(2517): CW /home/phablet/.config/libaccounts-glib/accounts.db-wal
14:32:24.908015 friends-dispatc(2517): CW /home/phablet/.config/libaccounts-glib/accounts.db
14:36:52.913844 friends-service(2226): WO /home/phablet/.local/share/resources/com.canonical.Friends.Streams.HAAX4W
14:36:52.936030 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams
14:41:52.913325 friends-service(2226): O /home/phablet/.local/share/resources/com.canonical.Friends.Streams.6E9W4W
14:41:52.913660 friends-service(2226): W /home/phablet/.local/share/resources/com.canonical.Friends.Streams.6E9W4W
14:41:52.932856 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams.6E9W4W
14:46:52.920893 friends-service(2226): O /home/phablet/.local/share/resources/com.canonical.Friends.Streams.NQLT4W
14:46:52.921259 friends-service(2226): W /home/phablet/.local/share/resources/com.canonical.Friends.Streams.NQLT4W
14:46:52.937769 friends-service(2226): CW /home/phablet/.local/share/resources/com.canonical.Friends.Streams.NQLT4W
14:46:54.778651 friends-dispatc(2555): CW /home/phablet/.config/libaccounts-glib/accounts.db
14:46:54.890253 friends-dispatc(2555): W /tmp/vg79r1
14:46:54.890376 friends-dispatc(2555): CW /tmp/vg79r1
14:46:55.082148 friends-dispatc(2555): W /home/phablet/.cache/friends/friends.log
14:46:55.090266 friends-dispatc(2555): W /home/phablet/.cache/friends/friends.log
14:46:55.091456 friends-dispatc(2555): W /home/phablet/.cache/friends/friends.log
14:47:25.854884 friends-dispatc(2555): W /home/phablet/.cache/friends/friends.log
14:47:25.856074 friends-dispatc(2555): CW /home/phablet/.cache/friends/friends.log
14:47:25.927485 friends-dispatc(2555): CW /home/phablet/.config/libaccounts-glib/accounts.db-shm
14:47:25.927485 friends-dispatc(2555): CW /home/phablet/.config/libaccounts-glib/accounts.db-wal
14:47:25.927790 friends-dispatc(2555): CW /home/phablet/.config/libaccounts-glib/accounts.db

Periodic database updates and writes to the log are fine, but if we see lots of data and metadata writes spaced out over time with a few minute intervals between them then spinning media such as hard disks don't really get the opportunity to go into idle and spin down, hence consuming more power on laptops etc. Perhaps somebody can look into seeing of the number of writes can be reduced or batched better.

Related branches

description: updated
Revision history for this message
Robert Bruce Park (robru) wrote :

Colin, what number do you get when you run `gsettings get com.canonical.friends interval` ? The default is 15 but yours seems to be set to 5. Setting it to 15 will improve your battery life if you are concerned about it.

Revision history for this message
Colin Ian King (colin-king) wrote :

phablet@ubuntu-phablet:~$ gsettings get com.canonical.friends interval
15

Revision history for this message
Robert Bruce Park (robru) wrote :

Sorry for the delay. I found the cause of this and I've pushed a branch.

Changed in friends (Ubuntu):
status: New → Fix Committed
assignee: nobody → Robert Bruce Park (robru)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package friends - 0.2.0+14.04.20131103-0ubuntu1

---------------
friends (0.2.0+14.04.20131103-0ubuntu1) trusty; urgency=low

  [ Robert Bruce Park ]
  * Save battery life by decreasing default polling frequency. (LP:
    #1238083)
  * Fix & re-enable failing twitter test. (LP: #1223430)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 236
 -- Ubuntu daily release <email address hidden> Sun, 03 Nov 2013 00:41:35 +0000

Changed in friends (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Reopening as the fix was causing problems and is now reverted.

< psivaa> both gallery and friends app tests fail systemsettle after for friends server taking up processor resource
< ogra_> yup, as discovered in the meeting ... they either need to re-upload a rolled back version or a proper fix
         before we do a new image buuld
< ogra_> it is very intresting that it oly affects mako though

Changed in friends (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Robert Bruce Park (robru) wrote :

This systemsettle thing is some kind of fluke, because the change that got reverted does nothing other than *reduce* the frequency with which friends does things. The revert causes friends to activate itself and poll things online literally 3x more often.

Changed in friends (Ubuntu):
assignee: Robert Bruce Park (robru) → Ken VanDine (ken-vandine)
Changed in friends (Ubuntu):
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package friends - 0.2.0+14.04.20131108.1-0ubuntu1

---------------
friends (0.2.0+14.04.20131108.1-0ubuntu1) trusty; urgency=low

  [ Ken VanDine ]
  * Undo revert for the default polling frequency and ensure interval is
    set before using it in the timeout. (LP: #1238083, #1248143)

  [ Colin Watson ]
  * Declare all binary packages Multi-Arch: foreign, since they expose
    no architecture-dependent interfaces.

  [ Robert Bruce Park ]
  * More robust handling of Facebook msgids. (LP: #1248302). (LP:
    #1248302)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 242
 -- Ubuntu daily release <email address hidden> Fri, 08 Nov 2013 17:13:24 +0000

Changed in friends (Ubuntu):
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.