Bug 443095 - Moving mails to a different folder is very slow
Summary: Moving mails to a different folder is very slow
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Maildir Resource (show other bugs)
Version: 5.18.1
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 21:29 UTC by Martin Steigerwald
Modified: 2021-09-28 21:29 UTC (History)
0 users

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 Martin Steigerwald 2021-09-28 21:29:35 UTC
SUMMARY

I moved 13647 from one folder to another.

It took a lot of time. I'd say at least 5 minutes, but I'd say it was longer than that.

During that time KMail stalled on Akonadi and thus did not display any mail. It was basically unusable during that time.


STEPS TO REPRODUCE
1. Move 10000 mails from one folder to another
2. Wait
3. Wait
4. Wait
5. …

OBSERVED RESULT

Moving those mails took a lot of time.

In the end I monitored how many mails it adds to the destination maildir folder each 10 seconds and got this:

% while true; do find -type f | wc -l ; sleep 10 ; done
12426
12645
12936
13216
13445
13609
13647
13647
13647
13647

So it did about 200-300 mails every 10 seconds. Or 20-30 mails a second. This makes about 454 seconds or 7 minutes for and 34 seconds for moving all of the mails, in case it started moving mails immediately and it would reach 300 mails a second consistently. I did not measure the exact total time, but I believe it was more like 10 minutes or more.


EXPECTED RESULT

Those mails are basically moved within a few seconds.

This is a ThinkPad T14 AMD Gen 1 with AMD Ryzen 7 PRO 4750U 8 core processor with hyperthreading, 32 GB RAM and 2 TB Samsung 980 Pro SSD. This hardware really gives no reason to be slow with such a kind of operation.

During the move operation consequently neither the CPU, not even a single core, nor the SSD was fully utilized.



SOFTWARE/OS VERSIONS

Linux/KDE Plasma: 5.21.5 on Devuan Ceres (aka Debian Sid without Systemd, I use runit instead)

KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.86
Qt Version: 5.15.2

Linux Kernel 5.14.7, self compiled.

I am using PostgreSQL backend.