Ticket #2183 (closed enhancement: fixed)
Gajim spins up my hard drive in laptop mode
| Reported by: | osch0001@… | Owned by: | asterix |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | None | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Blocked By: | ||
| OS: | Blocking: |
Description
When using laptop mode with Linux kernel version 2.6.15, Gajim spins up my hard drive every time I receive or send a message. Not surprisingly, it appears that this is happening when it writes to the log.db file (see below). What is surprising is that Gajim is forcing a write rather than letting the kernel cache it for later writing.
For those that don't know, laptop mode is a setting in the Linux kernel the delays flushing of dirty blocks until next time the disk spins up for some other reason (e.g., a read), an application forces a sync, or until a predefined time limit is hit. See http://www.xs4all.nl/~bsamwel/laptop_mode/ for more information.
My Python is a bit rusty, so I haven't looked at exactly what Gajim is doing. However, I would love to see this fixed, as the constant spinning up and down caused by Gajim's syncs is hard on the drive.
dmesg output:
[17293612.468000] python(14059): dirtied inode 6262818 (logs.db-journal) on dm-5 [17293612.468000] python(14059): WRITE block 101406664 on dm-5 [17293612.468000] python(14059): dirtied inode 6264898 (logs.db) on dm-5 [17293612.468000] python(14059): WRITE block 100556184 on dm-5 [17293612.468000] python(14059): WRITE block 100556192 on dm-5 [17293612.468000] python(14059): dirtied inode 6262818 (?) on dm-5
