Bug 128621 - Too many writes prevent disk from sleeping
Summary: Too many writes prevent disk from sleeping
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: maildir (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-04 15:41 UTC by Neuer_User
Modified: 2015-04-12 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neuer_User 2006-06-04 15:41:58 UTC
Version:            (using KDE KDE 3.5.3)
Installed from:    Debian testing/unstable Packages
OS:                Linux

Kontact seems to issue SYNC commands to the filesystem, thus inhibiting the use of laptop-mode.

Laptop-mode set the hdd into standby mode and wakes it once per defined time period (e.g. 10 min) to commit changes to the file system. In order to have this working correctly, the kernel supports delayed writes to the file system. HOWEVER, direct sync commands are always honored!

Now, when I try to use laptop-mode, the disk spins up appr. once every minute or two. Using lm-profiler (a tool to identify programs that access the hd), I found that kontact regularly issues WRITE commands (which are synced commands), in contrast to other progs that only dirty inodes (so that the pflushd can flush the accessed inodes once every 10 min.).

Kontact also dirties inodes, but once in a while issues these WRITEs.

As Kontact consists of many sub-programs, I also tried using kmail and korganizer as single programs. It seems that kmail is one component that issues WRITE commands.

One example:
Jun  4 15:27:19 LaptopMB kernel: kmail(15692): dirtied inode 2147410 (name:@mail.virtual.com:995.lockA3WaGb.tmp) on dm-0
Jun  4 15:27:19 LaptopMB kernel: kmail(15692): dirtied inode 2147412 (name:@mail.virtual.com:99535x7mc.new) on dm-0
Jun  4 15:27:19 LaptopMB kernel: kmail(15692): WRITE block 34881008 on dm-0

I don´t know why these synced writes are done (or if there is a special reason for it), but it keeps me from using laptop-mode in a sensible way (as the disk spins up ever minute or so). So I would be very glad, if the behaviour could be changed so that inodes are only dirtied and not synced.

Thanks a lot,

Michael
Comment 1 Will Stephenson 2006-10-30 08:27:44 UTC
I doubt one can read maildir mail, marking it as read, without touching the files on disk.  But this is a kmail issue anyway.
Comment 2 Björn Ruberg 2009-12-26 20:25:50 UTC
Touching the files is probably needed - but you can discuss when a fsync has to be executed. But you cannot say that kmail writes back mail states reliable, see bug #34190
Comment 3 Laurent Montel 2015-04-12 09:57:31 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.