iPhone Mail clients generate high Solr I/O
Hi,
I'm running a mail server with Dovecot 2.3.20 and Apache Solr as FTS backend.
It seems that iPhone/iPad Mail clients are generating some IMAP searches, especially on header Message-ID, that are increasing our Solr I/O load, especially during the night.
Are these kind of queries normal? What are they?
You can find some logs below.
Dovecot logs:
Mar 13 21:06:14 dovecot: imap-login: Login: user=user@domain, method=PLAIN, rip=x.x.x.x, lip=z.z.z.z, mpid=11263, secured, session=<PQSppM32gePCBJGh> Mar 13 21:06:14 dovecot: imap(user@domain) session=<PQSppM32gePCBJGh>: ID sent: name=iPhone Mail, version=20D67, os=iOS, os-version=16.3.1 (20D67) Mar 13 21:06:14 dovecot: imap(user@domain) session=<PQSppM32gePCBJGh>: Disconnected: Logged out in=207 out=1128 deleted=0 expunged=0 autoexpunged=0 trashed=0 appended=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0
Solr logs:
2023-03-13 21:06:14.411 INFO (qtp1671846437-1652) [ x:dovecot]
o.a.s.c.S.Request [dovecot] webapp=/solr path=/select
params={q={!lucene+q.op%3DAND}hdr:DB8P189MB08692AE65580C36C3B7D6F53C1F59@domain6.tld+OR+hdr:<\!\%26\!AAAAAAAAAAAYAAAAAAAAAI\/Oo\%2BConZZMkCvmEY7yWqjCgAAAEAAAAP968Yud4n1LmhwJxWgTURQBAAAAAA%3D%3D@domain5.tld>+OR+hdr:
Thanks
-- Alessio Cecchi Postmaster @http://www.qboxmail.it https://www.linkedin.com/in/alessice
On 3/20/23 09:52, Alessio Cecchi wrote:
I'm running a mail server with Dovecot 2.3.20 and Apache Solr as FTS backend.
It seems that iPhone/iPad Mail clients are generating some IMAP searches, especially on header Message-ID, that are increasing our Solr I/O load, especially during the night.
Are these kind of queries normal? What are they?
I don't know whether they are normal or not. That requires knowledge about IMAP that I do not have. It does seem odd that a mail client would be doing header searches unless the user is actually doing a search. I would expect it to look messages up by the ID using other imap commands, not with a header search. But my knowledge about IMAP is not complete enough to say for sure.
You can find some logs below.
Those Solr logs show what SHOULD be low-impact queries on a system that's appropriately sized.
I suspect what's happening is that the Solr server doesn't have enough free memory (memory not allocated by ANY program) to effectively cache the index.
If there is enough free memory for the OS disk cache and the cache is reasonably warmed up, queries like the ones you showed should produce very little disk I/O, because the data that they need will be sitting in memory and an actual disk read is unnecessary.
Once the search completes, the record retrievals might result in a cache miss, but the amount of data that gets retrieved for a dovecot search result is quite small. The data is compressed, so a few CPU cycles are required to decompress it.
Memory-related performance issues with Solr come up frequently enough that I wrote a wiki article about it:
https://cwiki.apache.org/confluence/display/solr/solrperformanceproblems
Thanks, Shawn
participants (2)
-
Alessio Cecchi
-
Shawn Heisey