[gnutls-help] gnutls + courier-imap => very slow

Lenz Weber mail at lenzw.de
Fri Jan 10 03:20:38 CET 2014

I'm currently investigating some serious performance problems when using
courier-0.66.1ubuntu4 in combination with
gnutls-3.0.11+really2.12.14-5ubuntu3.5, which would be the usual
combination if one were to compile courier using the --with-gnutls
config flag in the lastest Ubuntu LTS version 12.04.

I'm already in contact with the courier-mta mailing list and if you want
to read the complete history, you can do this here:

using GnuTLS slows courier down. A lot. I did some benchmarking and
while downloading a 10MB attachment through courier-OpenSSL takes 1.6
seconds, with GnuTLS, it takes about 60 seconds. Listing large
directories will just time out because it takes too long.

Funny thing is: the couriertls process takes <1% CPU usage while on
GnuTLS. If I attach strace to that process, CPU usage goes up to 40% and
the test download finishes after ~4 seconds. Still not as fast as
OpenSSL, but something I could work with.

I'm suspecting that this might be some kind of timing problem, maybe
even in the GnuTLS library, so maybe someone here has an idea of how to
address the problem?

Lenz Weber

More information about the Gnutls-help mailing list