General discussion on installation and configuration of SOGo

Text archives Help

Re: [SOGo] Performance tuning

Chronological Thread 
  • From: "Markus Winkler" ( ) < >
  • To:
  • Subject: Re: [SOGo] Performance tuning
  • Date: Sat, 2 Mar 2019 12:35:40 +0100
  • Autocrypt: addr= ; prefer-encrypt=mutual; keydata= xsDiBDx7bAURBACPoFyLhATX9d52bH7Wi1/AjhAvouJnee/XOB7W2Q5+qwtLGMZAC6vhyChv FlwbhW3KKZkzM7tlrYZdlr89iGBue8LorC1lKVOAVKKBJFsfsUTMPFrGimgRRM0Wvvq279l0 PWrikIcG1tjulpoTbN8WMqoiSzmsS8Q7O1ZtT+Yg1wCgyt9lgbR4SC0xal9iK528G5G29A0D /1iG39h00VqHzwz5t2kVSwHJP5I9BvXMiIVGZnKECQqSXNnXDpzVa1VZWNI09fu9Yd8+spQK CFpigV3IVWwL4eGgkDq1zN+tr2bALJzfaxRPXVUOEugj4EQh7g3yUlL5B3MfA1qsVZVY7UAk xy5gmx//Hw0yNAEwPzW7vUqP55E3A/9WVEThiIXA+9QYrmxiSgjJEuqRpK7h4NA/2850GBWA iX89/0pRGnf0ojlv2hgaWDP8sgnEVpQi+O0/CRHtnAUAkbwfwEY+bW+ObvQQTR2bg4bmlUWW /tW8+hj7d7uc59/8mmbECz9O1tWqkoXeU7dTYwJd7dzYCxmXHqWzwmz4D80yTWFya3VzIFdp bmtsZXIgPG1hcmt1cy53aW5rbGVyQGhyei50dS1jaGVtbml0ei5kZT7CWgQTEQIAGgULBwoD BAMVAwIDFgIBAheABQJD7ztAAhkBAAoJEHpmgeQlmsauin0AnjHC7kzfK7wxrtCE5nEWOz1M HdsvAJ49bsaYGx6lj0LysHljPv3MPQCJ687BTQQ8e2yTEAgA6fwNOXbglqE9rsz3EORvtMYY 8HvdAmK1wWOoFgrlL3zlbxjeSc4bVkDH30DIZzDD2gsXA7TfQV2NPHqeBgzVxp7YdIRwZLsY BJQuyQVPtFU7rFWxRvfXnzcxr2tKcFAkf9NjpOvkhw2YZz1BGyAdUB05VS7fmXxnv4MR6DkX dkr+LDsR4WIkBi83+avrfck6neeQOnHvT2wwKEPVJ7xASPOxbaWjcM57AK1oGvo4v4Nof89o itccuFvJKyCFq8QSNeFoRoIYseX2dtLQqUZQUgyei0CYg68ojU7aLe4Ry89SClH4lVxkInAz bXSw+qzBxjUAyZYKkZhmlm2twSmjAwADBgf/Zo8ta/FAW7sdouPEY+nFmTP434XUeVDrKwai S+YGFMw6ZoU9i9dmORYJFOGbzTbH293tdwGn75y0uTTpuBapafVzLRRtklO7AnGTD0jl2UmT /TnM9/3xusiXr0zTLVHw1HBSYVRi7dwlLwyMU5JhPv60k/6t5JsSVvdtzDqj66rhgFi3U6SI FajAkx/cEM7g4zS+hT8CplzRm342hkcoMcHBY6B8xbclW6KzyFAg4WZaXKBgDMquxjuYKV0H BN6JbKGvOZrVOVNVw+YaqBW/4do4pRKx6IFoCJ+IRuF3V92mQy4E2OUDH8tcAtvWNaYltqml QE4RBJD8PmrcpR9SZMJGBBgRAgAGBQI8e2yTAAoJEHpmgeQlmsau5XgAn1IE1Lt3CIwdUkSE GmUGXOJQEJk8AJ0T0P6jVy7rTp+RoN+nsnOMYF9pDg==
  • Dmarc-filter: OpenDMARC Filter v1.2.0 C746F1DE5113
  • Openpgp: preference=signencrypt

Hi Lorenz,

On 01.03.19 22:42, Lorenz Pressler
( )
yes, this made indeed a difference; it's about ~20-30% faster.
response time taken from the debug log is now ~500-1200ms.

as expected, I would say. ;-) Thank you for testing and your feedback.

I am not sure why though or I am misunderstanding what this is doing.

If this parameter is not set, the default setting is effective, which means IMAP pooling is disabled. In this case SOGo has to log in _and_ especially out for every access to/from the IMAP server and so permanently establishes new sessions to Dovecot. A typical log extract would look like this (while clicking in the web interface):

--- snip ---
2019-03-02 10:49:32 imap-login: Info: Login: user=< >, method=PLAIN, rip=, lip=, mpid=15163, secured, session=<Uw69cBmDGMl/AAAB>
2019-03-02 10:49:32
imap( ):
Info: Logged out in=222 out=1607

2019-03-02 10:49:37 imap-login: Info: Login: user=< >, method=PLAIN, rip=, lip=, mpid=15167, secured, session=<3WMIcRmDIsl/AAAB>
2019-03-02 10:49:37
imap( ):
Info: Logged out in=331 out=2116

2019-03-02 10:49:39 imap-login: Info: Login: user=< >, method=PLAIN, rip=, lip=, mpid=15169, secured, session=<xSkqcRmDKMl/AAAB>
2019-03-02 10:49:39
imap( ):
Info: Logged out in=331 out=2116

2019-03-02 10:49:42 imap-login: Info: Login: user=< >, method=PLAIN, rip=, lip=, mpid=15171, secured, session=<3ctbcRmDLMl/AAAB>
2019-03-02 10:49:43
imap( ):
Info: Logged out in=307 out=4075
--- snip ---

In contrast to that, if you set 'NGImap4DisableIMAP4Pooling = NO;' then the pooling is activated, SOGo keeps the current connection open and so _no_ new logins are necessary every time you access a folder or e-mail. In the Dovecot log you'll only see one login and that's it. The down side is, that there will be more simultaneous open connections to Dovecot.

I'm also new to SOGo and hope that my understanding of this mechanism is correct. I don't know exactly if and when timeouts on SOGo and Dovecot regarding the IMAP connection are taking effect (at least there is some information in the RFC's and the Dovecot Wiki). According to the Dovecot log it seems that SOGo logs out after about 5 minutes of inactivity in the web frontend (but I didn't check this exactly).

Well, this test was mainly for isolation and confirmation of one possible reason for the performance bottleneck - the slow IMAP login/access. And with changing this parameter we can indeed mitigate this problem. But for me it's unclear, why the login resp. access to Dovecot takes so long compared to the same procedure using Thunderbird or OpenSSL/fetching as IMAP clients. Perhaps there are some SOGo experts which have any idea how to narrow down this further and have tuning tips?

By way of comparison: in the sogo.log of my server (Debian, 2 GB RAM with software components like on your system and with 'NGImap4DisableIMAP4Pooling = NO;') I can see IMAP access times on an average of 0,1 s, if an initial IMAP login was necessary before then this takes approx. 0,4 s.

And BTW: it doesn't suprise me that your access to address book and calendar is working well, as they are stored exclusively in the MariaDB and this access is something completely different.

Best regards,

Archive powered by MHonArc 2.6.18.

Top of page