Bug 300572

Summary: marking emails as read causes GBs of disk i/o
Product: [Frameworks and Libraries] Akonadi Reporter: S. Burmeister <sven.burmeister>
Component: Nepomuk Feeder AgentsAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: cfeck, faure, mollekopf, vkrause
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 4.9.3

Description S. Burmeister 2012-05-24 20:05:38 UTC
4.8.3

MArking ~2000 emails (plain text only, a few MB total size) as read causes the akonadi_nepomuk_feeder to write ~5GB data to the hard disk.

Reproducible: Always

Steps to Reproduce:
1. HAve a local folder with a few thousand unread emails, e.g. a mailinglist folder, i.e. small text emails.
2. RMB > mark all emails as read from within kmail
3. use iotop to watch the disk i/o
Actual Results:  
GBs of data are written to the disk just to mark emails worth a few MB as read.

Efficiency is something different. Apart from that it blocks the disk and hence the computer.

Expected Results:  
Get the "mark as read" done within seconds at most.

If one watches the process list at the beginning of the "mark as read" action one can see that there are other processes using far too much resources for something as simple as marking messages as read and changing their status in some DB.

kmail uses 20%
mysqld 20%
akonadi_agent_launcher 20%
as well as the mentioned akonadi_nepomuk_feeder, and akonadi_mailfilter_agent
Comment 1 Christian Mollekopf 2012-10-19 12:24:44 UTC
Could it be that you have a rather large .config/akonadi/agent_config_akonadi_nepomuk_feeder_changes.dat ?
Since that file is rewritten after every notification it could indeed lead to a lot of io strain.
A fix is being worked on.

In the meantime I'd suggest to remove the file to work around the issues.
Comment 2 David Faure 2012-10-19 16:12:53 UTC
https://git.reviewboard.kde.org/r/106950/
Comment 3 David Faure 2012-10-22 15:18:32 UTC
Patch applied as 7c7bcd91632bc34eb4ebfc54229f44fa6ec489f3

The fix will be in kdepimlibs 4.9.3.