[Bugs] #1656 UNSP: logging is slow
Sugar Labs Bugs
bugtracker-noreply at sugarlabs.org
Thu Jan 14 19:33:10 EST 2010
#1656: logging is slow
------------------------------------------+---------------------------------
Reporter: quozl | Owner: tomeu
Type: defect | Status: new
Priority: Unspecified by Maintainer | Milestone: Unspecified by Release Team
Component: sugar | Version: 0.84.x
Severity: Unspecified | Keywords:
Distribution: Unspecified | Status_field: Unconfirmed
------------------------------------------+---------------------------------
Logging to .sugar/default/logs is quite slow; activities that emit more
log lines are slower.
The effect is more easily observed on hardware that has a slow path to log
storage, such as the XO-1 and XO-1.5. The effect is absent when logs are
written to a temporary filesystem.
The effect is most apparent as a variability in the starting time of an
activity, such as Terminal or Write. Terminal takes between 2 and 3
seconds to start on XO-1.5 hardware, but roughly one out of four starts
takes up to 8 seconds.
The cause of the slowness is the blocking writes to the log, and these are
caused by the explicit use of O_SYNC when the log file is opened.
[http://dev.laptop.org/ticket/9924 dev.laptop.org ticket 9924] is where
the problem was first reported. A patch that removes O_SYNC is attached
to that ticket. Only that patch is proposed.
Reasons to continue using O_SYNC are:
* increase the chances of useful logs being available for post-event
diagnosis, especially when a child may force a power fail or reset.
Reasons to avoid using O_SYNC are:
* activity startup time and responsiveness.
Monitoring logs with tail(1) or cat(1) while developing or testing is
unaffected.
Reducing log output during normal operation of an activity would also
reduce the effect of this symptom.
--
Ticket URL: <http://bugs.sugarlabs.org/ticket/1656>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system
More information about the Bugs
mailing list