Quassel very I/O intensive, fsync()ing to disk after each log entry

Bug #355552 reported by Zorael
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
quassel (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: quassel

Quassel writes to the hard drive *very* often, seemingly after each log entry. It is very obvious when it's displaying the MOTD upon connecting, which takes several seconds as it waits for the hard drive to commit the log to disk after each single line.

Attaching copy/pasted log file. Note the timestamps; roughly 10 seconds just to *display* the MOTD. Admittedly, to make it more obvious I had a file being copied in the background, so the numbers are exaggerated to show the worst possible case.

This is a netbook - Advent 4211 (rebranded MSI Wind) - which as such has limited (and noisy) hdd performance, making the write activity very obvious. The machine is running the Jaunty beta, and the logfile (~/.config/quassel-irc.org/quassel-storage.sqllite) is on an ext4 partition (with noatime, to boot).

             $ apt-cache policy quassel
             quassel:
               Installed: 0.4.1-0ubuntu3
               Candidate: 0.4.1-0ubuntu3
               Version table:
              *** 0.4.1-0ubuntu3 0
                     500 http://archive.ubuntu.com jaunty/main Packages
                     100 /var/lib/dpkg/status

Largely irrelevant, but for posterity:
             $ uname -a
             Linux lethe 2.6.29-02062901-generic #02062901 SMP Fri Apr 3 14:17:44 UTC 2009 i686 GNU/Linux
... from http://kernel.ubuntu.com/~kernel-ppa/mainline.

Revision history for this message
Zorael (zorael) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 355552] Re: Quassel very I/O intensive, fsync()ing to disk after each log entry

Quassel uses sqlite for data storage, so I suspect this is more likely an
sqlite issue, but we'll look into it.

Revision history for this message
Scott Kitterman (kitterman) wrote :
Revision history for this message
Scott Kitterman (kitterman) wrote :

Fixed already in 0.5. It's to late for Jaunty, but the fix will be in Karmic.

Changed in quassel (Ubuntu):
importance: Undecided → Medium
status: New → Fix Committed
Revision history for this message
Zorael (zorael) wrote :

This can be temporarily worked around using the same method as the one used to work around Firefox fsyncing excessively; by creating a wrapper that replaces the fsync() function with a noop dummy. See http://ubuntuforums.org/showthread.php?t=1103926.

    fsync.c:
            int fsync (int fd)
            {
                return 0;
            }

    $ gcc -fPIC -g -c -Wall fsync.c
    $ gcc -shared -Wl,-soname,fsync.so -o fsync.so fsync.o -lc
    $ mkdir ~/.misc
    $ mv fsync.* ~/.misc

    (+x) /usr/local/bin/quassel (or /usr/local/bin/quassel-nofsync, or whatnot):
            #!/bin/bash
            export LD_PRELOAD=$HOME/.misc/fsync.so
            /usr/bin/quassel "$@" &

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fix released to karmic.

Changed in quassel (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.