[Dovecot] Dovecot I/O scheduling (all versions)
I have experienced this on all versions of Dovecot that Ive used (1.0 - 1.1b6) using IMAP (its difficult to test if its also there with POP3).
What I see is that if there is a peak in disk usage at the time of a specific request that requests stalls. The saturation of disk I/O is momentary but when its done (maybe after one or two seconds) Dovecot still waits for its I/O operation instead of continuing as soon as resources are available.
Now, I would expect Dovecot to only wait until there are resources available and not stall for at long time (sometimes it stalls for like 10 seconds, and sometimes completely).
This could be OS specific (Im using ZFS and Solaris 10 on Sparc) but it may also be due to the way dovecot is programmed. Theres always plenty of RAM and CPU available so thats not whats causing troubles.
Is anyone else familiar with this issue?
Regards, Mikkel
On Sunday, November 4 at 01:02 PM, quoth mikkel@euro123.dk:
What I see is that if there is a peak in disk usage at the time of a specific request that requests stalls. The saturation of disk I/O is momentary but when it’s done (maybe after one or two seconds) Dovecot still waits for its I/O operation instead of continuing as soon as resources are available.
Unfortunately, that's probably an OS thing. It's a pain (though technically possible) for user programs like Dovecot to worry about I/O scheduling, so generally they do not: that is something that the OS handles. Dovecot, like virtually all user programs, simply asks the OS for the contents of the files it wants. When that happens, the state of the requesting program (Dovecot) changes from "running" to "blocked" while the OS services the request. Once the request is serviced, it is the OS's responsibility to return the requesting program to "runnable" status and begin scheduling it on the CPU again. There's very little that Dovecot (or any program) can do to improve the situation if the OS refuses to service I/O requests in a timely fashion.
~Kyle
You can not establish sound security, on borrowed money. You can not keep out of trouble, by spending more than you earn. -- Abraham Lincoln
participants (2)
-
Kyle Wheeler
-
mikkel@euro123.dk