help-gnutls
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gnutls] Performance of gnutls_record_recv(session, &c, 1)?


From: Nikos Mavrogiannopoulos
Subject: Re: [Help-gnutls] Performance of gnutls_record_recv(session, &c, 1)?
Date: Wed, 05 Mar 2008 20:31:31 +0200
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

Martin Lambers wrote:
Hi all,

Dimitrios Apostolou reported a large performance difference between the
OpenSSL and GnuTLS versions of mpop, a POP3 client, when querying the
status of a large POP3 mail box (>70000 messages).

In this situation, mpop needs to read a large amount of data (size
listings and UIDs, but not the mails itself). This takes 1m15s with
GnuTLS and only about 15s with OpenSSL. The 1m15s are completely spent
at 100% CPU.

Mpop uses gnutls_record_recv(session, &c, 1) for reading the data, i.e.
it reads the characters one at a time. It does not do any buffering
because the TLS library needs to do buffering internally anyway.
The OpenSSL variant of mpop does the equivalent: SSL_read(ssl, &c, 1).

Can this performance difference be caused by different TLS session
parameters? If so, which parameters would that be? Should mpop perform additional buffering and read larger chunks of data
with gnutls_record_recv()?

Indeed gnutls_record_recv wasn't written for 1 byte reads. Currently it has quite an overhead for reading few bytes.

regards,
Nikos




reply via email to

[Prev in Thread] Current Thread [Next in Thread]