| qmail-todo using too much CPU |
|
| Written by Evren Yurtesen | |
| Wednesday, 20 February 2008 | |
|
It is rare however ext-todo patched or even unpatched qmail might start using too much CPU. This is because qmail-todo going into a loop and checking queue/todo directory way too many times. You can find the simple fix to this problem in this article. Qmail-todo checks the queue/lock/trigger named pipe to see if it should check the queue/todo directory for new messages. However sometimes it gets messed up and starts checking the queue/todo directory hundreds of times in a second which cause high CPU load and might cause disk problems as well. Many people assume that this is because the hardware disk io speed is not fast enough so this is causing the qmail-todo problem but in fact the problem is elsewhere (although a hardware upgrade would most likely solve the problem too) Below is a small patch which fixes this problem (it patches the qmail-todo.c) The patch adds a SLEEP_MIN parameter where one can setup minimum time between opening queue/todo directory. It sets it to 5 seconds. This is a very reasonable value. When qmail-todo opens the queue/todo directory, it processes all the messages, this means that messages would arrive max 5s delayed because of the patch. (if copy/paste doesnt help with the patch, you can perhaps do the changes manually, but please let me know) --- work/qmail-1.03/qmail-todo.c 2008-02-20 22:04:09.000000000 +0200 |
|
| Last Updated ( Saturday, 31 May 2008 ) |
| Next > |
|---|





