On 2021-11-22 12:02:28, Oswald Buddenhagen wrote: > On Sun, Nov 21, 2021 at 12:59:28PM -0500, Antoine Beaupré wrote: >>https://anarc.at/blog/2021-11-21-mbsync-vs-offlineimap/ >> >>Let me know what you think.
[...] >>I'm particularly curious to hear about >>performance on slow links, it seems like mbsync is significantly >>impacted compared to SMD. > > first make sure that the server uses compression, either via the > COMPRESS imap extension (you can watch the traffic with -Dn; use a cheap > action like -l) or via TLS (dunno how to test that - openssl s_client > might tell). so, totally unscientific first test of this, over IMAP: anarcat@curie:~(main)$ time mbsync -a C: 1/2 B: 205/206 F: +0/0 *2/2 #0/0 N: +0/0 *0/0 #0/0imap(register): Error: net_connect_unix(/run/dovecot/stats-writer) failed: Permission denied C: 2/2 B: 206/206 F: +0/0 *2/2 #0/0 N: +0/0 *0/0 #0/0imap(register)<1997190><B/MCF8W4m2GGeR4AFjQyWQ>: Info: Logged out in=80 out=145116 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0 2.88user 1.32system 1:23.26elapsed 5%CPU (0avgtext+0avgdata 29420maxresident)k 0inputs+105232outputs (0major+15157minor)pagefaults 0swaps over SSH: 2.36user 0.71system 0:32.78elapsed 9%CPU (0avgtext+0avgdata 26032maxresident)k 0inputs+4464outputs (0major+16225minor)pagefaults 0swaps ie. the IMAP connection, out of the box, is almost 3 times slower! so SSH kind of helps here. Also, the IMAP server doesn't seem to support COMPRESS. that would be somewhere in here right? * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN] Dovecot (Debian) ready. Logging in... Authenticating with SASL mechanism PLAIN... >>> 1 AUTHENTICATE PLAIN <authdata> 1 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY STATUS=SIZE SAVEDATE LITERAL+ NOTIFY SPECIAL-USE] Logged in >>> 2 NAMESPACE [...] It seems like, in Dovecot, you need to enable the `zlib` plugin for that: https://doc.dovecot.org/configuration_manual/imap_compress/ With that change, IMAP gets a similar performance than SSH: 2.34user 0.84system 0:31.35elapsed 10%CPU (0avgtext+0avgdata 29612maxresident)k 0inputs+104232outputs (0major+21281minor)pagefaults 0swaps ... but not significantly better. Seems like my way forward is really just fixing my uplink. :) (Note that there's also a setting to enable compression at the TLS level, but I would avoid that: compression and encryption don't mix so well. And in fact, I wonder if that's the reason why COMPRESS is disabled by default in Dovecot...) Interestingly, the Dovecot compression setting also affects SSH: if I disable compression on SSH and enable it in Dovecot, I still hit the 30s landmark. If I disable it in both, SSH devolves back to IMAP-level performance: 2.36user 0.75system 1:22.69elapsed 3%CPU (0avgtext+0avgdata 26052maxresident)k 0inputs+0outputs (0major+15984minor)pagefaults 0swaps So yes, compression helps, but it wasn't the culprit in my case: this is really just a slow pipe, which only `rsync` (and `smd`, or possibly interimap/QRESYNC) can do something about. a. -- I believe that love is a better teacher than a sense of duty. - Albert Einstein _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel