From a37a8e3b2ace4f13b8832436c9e16089e0ce64f8 Mon Sep 17 00:00:00 2001 From: eXtremeSHOK Date: Wed, 14 Feb 2018 13:27:30 +0200 Subject: [PATCH 1/2] Fix for large Mailboxes to avoid timeouts ** I agree to the code of conduct and the contributory guidelines ** Tested with 80+GB single inbox via imap ``` --nofoldersizes --skipsize --fast ``` file and folder sizes are only used for statistics, which are completely useless. Before the actual data is transfered the message and folder sizes need to be calculated on a 200 000+ message inbox, this will almost never complete. ``` --buffersize 8192000 ``` sets the io buffer to 8mb, the default buffer is 4kbyte, this is speeds up syncs. ``` --skipheader 'X-*' ``` X headers vary wildly from system to system and do not ensure message uniqueness, they are not needed. ``` --split1 3000 --split2 3000 ``` split the requests in several parts on the server, 3000 is the number of messages handled per request. ``` --fastio1 --fastio2 ``` use fastio --- data/Dockerfiles/dovecot/imapsync_cron.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data/Dockerfiles/dovecot/imapsync_cron.pl b/data/Dockerfiles/dovecot/imapsync_cron.pl index 8afc3b20..c441d7f9 100755 --- a/data/Dockerfiles/dovecot/imapsync_cron.pl +++ b/data/Dockerfiles/dovecot/imapsync_cron.pl @@ -74,6 +74,14 @@ while ($row = $sth->fetchrow_arrayref()) { "--timeout1", "10", "--tmpdir", "/tmp", "--subscribeall", + "--nofoldersizes", + "--skipsize", + "--buffersize 8192000", + "--skipheader 'X-*", + "--split1 3000", + "--split2 3000", + "--fastio1", + "--fastio2", ($exclude eq "" ? () : ("--exclude", $exclude)), ($subfolder2 eq "" ? () : ('--subfolder2', $subfolder2)), ($maxage eq "0" ? () : ('--maxage', $maxage)), From 8eb05d1450445658a1870f6ff0bc66c82f559e4a Mon Sep 17 00:00:00 2001 From: eXtremeSHOK Date: Wed, 14 Feb 2018 14:02:56 +0200 Subject: [PATCH 2/2] Fix for large Mailboxes to avoid timeouts 2 Missing ' (sorry my editor keeps correcting the '" to " ) --- data/Dockerfiles/dovecot/imapsync_cron.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/Dockerfiles/dovecot/imapsync_cron.pl b/data/Dockerfiles/dovecot/imapsync_cron.pl index c441d7f9..47f9bbf7 100755 --- a/data/Dockerfiles/dovecot/imapsync_cron.pl +++ b/data/Dockerfiles/dovecot/imapsync_cron.pl @@ -77,7 +77,7 @@ while ($row = $sth->fetchrow_arrayref()) { "--nofoldersizes", "--skipsize", "--buffersize 8192000", - "--skipheader 'X-*", + "--skipheader 'X-*'", "--split1 3000", "--split2 3000", "--fastio1",