After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 444418 - unnecessary calls to fsync
unnecessary calls to fsync
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.10.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
Depends on:
Blocks: 543389
 
 
Reported: 2007-06-05 17:32 UTC by Joachim Breitner
Modified: 2009-02-18 17:41 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Joachim Breitner 2007-06-05 17:32:18 UTC
Hi,

I’m using evolution on my notebook, using only IMAP folders. My hard drive is configured to spin down and laptop-mode is enabled, causing file write not necessary spin up the drive.

But I noticed that working with evolution causes a lot of single short accesses to the hard drive. Here is what I found, using strace -e open,close,fsync:

[pid  4676] close(15)                   = 0
[pid  4676] open("/home/jojo/.evolution/mail/config/.#folder-tree-expand-state.xml", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 15
[pid  4676] fsync(15)                   = 0
[pid  4676] close(15)                   = 0
[pid  4676] close(15)                   = 0
[pid  4676] open("/home/jojo/.evolution/mail/config/.#et-expanded-imap:__mail_40joachim-breitner.de@mail.nomeata.de_INBOX_Mailinglists_Blogs_planet_20Karlsruhe", O_WRONLY|O_CREAT|O_TRUNC, 0600) = 15
[pid  4676] fsync(15)                   = 0
[pid  4676] close(15)                   = 0

I can understand that evolution would fsync _important_ files, such as local mail folders. But these files are very non-critical and do not warrant an immediate write to the hardware, at least not more immediate as the user wants other data written to the hard drive.

Please, if possible, reduce the usage of fsync for non-critical files, to help users reduce power consumption and harddrive wear.
Comment 1 Joachim Breitner 2007-06-05 18:01:56 UTC
Note that others seemed to have this problem as well:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2004-01/3160.html
Comment 2 Milan Crha 2009-02-18 11:20:24 UTC
Thanks for the bug report. There has been committed a fix from bug #568332 recently, which reduces usage of the fsync within sqlite to a minimum, but is always called at least once per file, on its close.

I see your request is quite similar, but not the same. Or do you think it's enough for you too?
Comment 3 Joachim Breitner 2009-02-18 16:46:06 UTC
I didn’t do a thorough analysis, but I assume the bug can be closed. I’ll re-open it if I find something unexpected. What release will the fix be in?
Comment 4 Milan Crha 2009-02-18 17:41:16 UTC
It's in Evolution-Data-Server since 2.24.4 (2009-01-30)/2.25.90 (2009-02-02).
I'm closing this as requested. Feel free to reopen.