ubuntuone sync daemon is writing IDLE messages to the log every 2 minutes

Bug #906462 reported by Colin Ian King
24
This bug affects 3 people
Affects Status Importance Assigned to Milestone
The Ubuntu Power Consumption Project
Medium
Unassigned
Ubuntu One Client
Status tracked in Trunk
Stable-3-0
Medium
Natalia Bidart
Trunk
Medium
Natalia Bidart
ubuntuone-client (Ubuntu)
Medium
dobey
Precise
Medium
dobey

Bug Description

While trying to figure out why my laptop drive never gets fully to sleep when running on battery power I discovered that the ubuntuone sync daemon is appending to /home/$user/.cache/ubuntuone/log/syncdaemon.log IDLE messages EVERY two minutes.

This continued writing to the log file by the daemon stating that it is in an IDLE state actually makes the machine busy as it periodically has to flush this data out which means spinning an idle disk drive up to flush out the dirty pages. This wastes power.

For IDLE messages, can we NOT write these messages out to the log
1. It is pointless debug
2. It makes the machine busy for no apparent benefit
3. It consumes power unnecessarily

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: ubuntuone-client 2.0.0-0ubuntu2.2
ProcVersionSignature: Ubuntu 3.0.0-14.23-generic 3.0.9
Uname: Linux 3.0.0-14-generic x86_64
ApportVersion: 1.23-0ubuntu4
Architecture: amd64
Date: Mon Dec 19 18:29:38 2011
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: ubuntuone-client
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

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

Example of IDLE messages that appear EVERY two minutes in /home/$user/.cache/ubuntuone/one/syncdaemon.log

summary: - ubuntuone sync daeomon is writing IDLE messages to the log every 2
+ ubuntuone sync daemon is writing IDLE messages to the log every 2
minutes
Changed in ubuntuone-client (Ubuntu):
milestone: none → ubuntu-12.04-beta-1
Steve Langasek (vorlon)
Changed in ubuntuone-client (Ubuntu):
importance: Undecided → High
status: New → Triaged
tags: added: battery-power-consumption
Revision history for this message
Martin Pitt (pitti) wrote :

syncdaemon has a config option in syncdaemon.conf "mark_interval.default" which is set to 120, and ubuntuone/syncdaemon/main.py also has a hardcoded 120 second default.

ubuntuone-syncdaemon has a --mark_interval=MARK_INTERVAL method, which developers could use to get this effect without having to change system configuration files. This seems good enough for debugging, and it's not really necessary to do this for all users.

Ubuntu One devs, are you ok with disabling the MARK logging by default and only enable it on demand? It seems relatively pointless, the log will already tell you when its started, and apport will pick up crashes.

Changed in ubuntuone-client (Ubuntu Precise):
importance: High → Medium
Revision history for this message
Martin Pitt (pitti) wrote :

I'm happy to work on a patch/branch, but would like to confirm the general approach with upstream first.

Leo Arias (elopio)
tags: added: chicharra
Changed in ubuntuone-client:
assignee: nobody → Ubuntu One Foundations+ team (ubuntuone-foundations+)
Martin Pitt (pitti)
Changed in ubuntu-power-consumption:
status: New → Triaged
importance: Undecided → Medium
Changed in ubuntuone-client:
status: New → Confirmed
Revision history for this message
Facundo Batista (facundo) wrote :

The MARK interval is *VERY* useful for debugging; we had far more complaints of SyncDaemon misbehaviour (real ones and mistakingly seen by the users as such) where the MARK line is useful, than complaints about the line being logged.

Note that the MARK log line gives a lot of information: syncdaemon state, connection state (system and user indicated ones), and hash and request queues length.

I'm -1 to removing this line from the logs.

Question: why logging every two minutes prevents the machine from going to sleep? Maybe we could increase this time?

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

The fact that users aren't complaining about the line being logged doesn't mean it's not unwanted - users just don't know about it. We do get users complaining a lot about power consumption issues, and things like logs periodically being updated will keep the disk from going into an idle state.

So.. perhaps can we either flush out the log less frequently, or even only flush out when we really have an issue or on close? If the user is seeing problems can one inform them to enable more frequently logging for the debugging session?

Martin Pitt (pitti)
Changed in ubuntuone-client (Ubuntu):
milestone: ubuntu-12.04-beta-1 → ubuntu-12.04-beta-2
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

After a conversation with Roberto Alsina and Facundo Batista, we agreed that:

(05:32:54 PM) ralsina: we could make it much more rare
(05:32:59 PM) ralsina: like, every 15 minutes
(05:33:17 PM) ralsina: which is Colin's suggestion (although I don see any suggested periods)
(05:33:47 PM) ralsina: facundobatista: is it horrible if we get this info every 15 minutes instead of 2?
(05:39:37 PM) facundobatista: ralsina, why 15 minutes?
(05:39:52 PM) facundobatista: ralsina, why not 5? or 10? or 30?
(05:40:03 PM) ralsina: facundobatista: default time to suspend
(05:40:29 PM) ralsina: facundobatista: of course I should doublecheck, but I think the default is to suspend after 15 minutes idle on battery
(05:41:45 PM) facundobatista: ralsina, I'm ok with 15'

Colin, would you please confirm if having a MARK every 15 minutes will consider this bug solved?

Thanks!

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

Well, every 15 minutes is definitely better than every 2 minutes, so yep, lets go with that as a compromise. Thanks!

Changed in ubuntuone-client:
assignee: Ubuntu One Foundations+ team (ubuntuone-foundations+) → Natalia Bidart (nataliabidart)
importance: Undecided → Medium
status: Confirmed → In Progress
dobey (dobey)
Changed in ubuntuone-client (Ubuntu Precise):
assignee: nobody → Rodney Dawes (dobey)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntuone-client - 2.99.90-0ubuntu1

---------------
ubuntuone-client (2.99.90-0ubuntu1) precise; urgency=low

  * New upstream release.
    - Messaging menu opens GTK+ panel instead of Qt. (LP: #943439)
    - u1sdtool opens registration screen instead of login. (LP: #944230)
    - Sync daemon writes IDLE messages to log every 2 mins. (LP: #906462)
    - Should prefer the Qt SSO interface for authentication. (LP: #930716)
    - New shares do not appear in messaging indicator. (LP: #943473)
    - Dependency on indicator must not be obligatory. (LP: #939509)
  * debian/watch:
    - Update watch file for new release.
  * debian/control:
    - Update dependencies for listed bug fixes.
    - Bump standards version to 3.9.9.
 -- Rodney Dawes <email address hidden> Wed, 07 Mar 2012 14:44:38 -0500

Changed in ubuntuone-client (Ubuntu Precise):
status: Triaged → Fix Released
Revision history for this message
noname2 (noname2-deactivatedaccount) wrote :

you need to close the bug in ubuntu power consumption project too

Changed in ubuntu-power-consumption:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers