I think Akonadi synchronrizes folders with filesystem content needlessly on switching between different folders. In combination with bug 334206 it blocks out KMail for minutes then. Reproducible: Always Steps to Reproduce: 1. Have several large folders. 2. Switch between them until Akonadi blocks KMail and KMail doesn´t respond to clicks anymore. Actual Results: 1. KMail doesn´t respond to clicks anymore for minutes. 2. akonadi_maildir_resource is using 100% of one Sandybridge core for minutes. 3. strace reveals that akonadi_maildir_resource is stat()ing every single file in the folder it synchronrizes. [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R234.merkaba", {st_mode=S_IFREG|0644, st_size=4079, ...}) = 0 [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R322.merkaba", {st_mode=S_IFREG|0644, st_size=8056, ...}) = 0 [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R342.merkaba", {st_mode=S_IFREG|0644, st_size=2771, ...}) = 0 [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R608.merkaba", {st_mode=S_IFREG|0644, st_size=4492, ...}) = 0 [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R665.merkaba", {st_mode=S_IFREG|0644, st_size=13036, ...}) = 0 [pid 4137] stat("/home/martin/.local/share/local-mail/.Lichtvoll.directory/.Linux.directory/kernel-ml/new/1376733031.R738.merkaba", ^C{st_mode=S_IFREG|0644, st_size=6870, ...}) = 0 This doens´t happen all of the time tough. Sometimes I am able to click around folders without having this issue. I am able to reproduce this directly after restarting Akonadi. There synchronizing folders for *one* time actually makes sense as a folder may have been changed meanwhile by another process. An option to disable this if user knows that no one except Akonadi will be accessing this maildir would be nice tough. I think it doesn´t happen only after restart tough. Usually I have Akonadi running for days as I hibernate and resume my laptop. And I see this behaviour each day. IMHO there does not need any folder with filesystem contents synchronisation during runtime of Akonadi as maildir resource uses inotify to watch folders. Expected Results: There will be no synchronisation with filesystem contents during runtime of Akonadi as Akonadi maildir resource uses inotify to watch the folders for changes. ThinkPad T520 with Sandybridge Dual core and Dual SSD BTRFS RAID 1. There is *no* I/O bottleneck. Maildir resource just hogs a core for minutes. Akonadi is git n1d1969c65c10c9d3f054f6dafb0f5a2a97d48281
It also happens after downloading and filtering mails: Bug 334216 - synchronizes folder with filesystem after downloading and filtering mails needlessly
I do not see this anymore on KMail/Akonadi 16.04 during switching folders. Thus closed.
This is again happening. Maybe it never stopped with 16.04, but after the serious performance regression between Akonadi 19.08 and Akonadi 5.14.1 (20.04)¹ it is again much more noticable. [1] Bug 422336 - kmail: the access and reading of the received messages is often very slow