High CPU/disk usage - IMAP "sort"

Rogerio

Well-Known Member
Sep 26, 2016
78
15
8
Sao Paulo, Brazil
cPanel Access Level
Root Administrator
Hello,

sometimes my server reports high cpu/disk usage (iotop >70MB/s), due to IMAP "sort" command.

May 22 13:24:15 h1 dovecot: imap([email protected])<4792><EUwmWnyJVDfItvii>: Connection closed (SORT finished 179.870 secs ago) in=381, out=2176, bytes=381/2176
May 22 13:34:37 h1 dovecot: imap([email protected])<5093><fmGvYXyJK+LItvii>: Connection closed (SORT finished 684.862 secs ago) in=222, out=1456, bytes=222/1456
May 22 13:34:37 h1 dovecot: imap([email protected])<5165><k5VOY3yJzgvItvii>: Connection closed (SORT finished 654.617 secs ago) in=170, out=1169, bytes=170/1169
May 22 13:35:30 h1 dovecot: imap([email protected])<6085><LDCnanyJbULItvii>: Connection closed (SORT finished 586.347 secs ago) in=217, out=8360, bytes=217/8360
May 22 13:36:05 h1 dovecot: imap([email protected])<6539><jRoudHyJ+NrItvii>: Connection closed (SORT finished 459.003 secs ago) in=415, out=1868, bytes=415/1868

Any idea what is this and how to fix? Thanks.
 

Rogerio

Well-Known Member
Sep 26, 2016
78
15
8
Sao Paulo, Brazil
cPanel Access Level
Root Administrator
The account is big, more than 12 Gb and 17000 messages.

It's a 2 Tb SATA disk, no RAID.

Any way to optimize this "sort"? The problem does not always happen, but when it happens there are multiple instances of imap running on the user.
 

sparek-3

Well-Known Member
Aug 10, 2002
2,152
267
388
cPanel Access Level
Root Administrator
Probably not. Although I suppose someone might chime in with some advice.

The issue is related to the fact that you just have too many messages in the account and SATA disks just can't handle that much I/O.

SSD drives would probably help.

You MIGHT get some performance gains with another File System type - but honestly I wouldn't expect much of a change (and you'd have to reformat the drive to do that, so I don't think that would be an option for you).
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
SSD might help, but ultimately I'd defer to @sparek-3 's advice here - That's a lot of data in the account and it's unsurprising that high IO/load accompany it.

You might make some changes to the limits/max number of processes for the mail server at WHM>>Service Configuration>>Mailserver Configuration to see if limiting this further alleviates the load on the server, but this may draw out the sort process.


Thanks!
 
  • Like
Reactions: Rogerio