[Dovecot] FreeBSD 6.1-RELEASE/kqueue high CPU load
LI Xin
delphij at delphij.net
Mon Sep 18 18:33:25 EEST 2006
Taras Savchuk wrote:
> LI Xin пишет:
>> Taras Savchuk wrote:
>>
>>> LI Xin пишет:
>>>
>>>> Paul Lathrop wrote:
>>>>
>>>>
>>>>> Taras Savchuk wrote:
>>>>>
>>>>>> Hi to ALL!
>>>>>>
>>>>>> I have dovecot-1.0r7 installed on FreeBSD 6.1, using kqueue and
>>>>>> Maildir (<20 mailboxes, < 0,5 Gb size). Periodically CPU load of imap
>>>>>> processes increasing up to 60-80%.
>>>>>> Is it normall behavior or not? May be somebody had such kind of
>>>>>> problems?
>>>>>>
>>>>>>
>>>>> I have also experienced this behavior, which is quite bothersome
>>>>> because
>>>>> I sold my supervisor on Dovecot by talking about performance and low
>>>>> resource requirements...
>>>>>
>>>> What if you get some output from ktrace/kdump? Additionally, try to
>>>> force the process to save a coredump and investigate its .core with gdb
>>>> would help tracking down the issue...
>>>>
>>>> Note that because when using kqueue the process should get a
>>>> "kqread" if
>>>> it is waiting for kqueue event. If the process is stuck in "RUN" state
>>>> then a coredump would be more helpful.
>>>>
>>>> Cheers,
>>>>
>>> I cought imap while eating much CPU (~80%) and run ktrace -t + -p <bad
>>> process pid>.
>>> It's kdump -E output, many gettimeofday() calls, is it normal? :
>>>
>>> mail2# kdump -E -f ktrace.out | less
>>> 26208 imap 0.000000 RET kevent 0
>>> 26208 imap 0.000042 CALL gettimeofday(0x80c2c60,0x80c2c68)
>>> 26208 imap 0.000046 RET gettimeofday 0
>>> 26208 imap 0.000061 CALL gettimeofday(0xbfbfe9a0,0)
>>> 26208 imap 0.000064 RET gettimeofday 0
>>> 26208 imap 0.000078 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
>>> 26208 imap 0.000082 RET kevent 0
>>> 26208 imap 0.000100 CALL gettimeofday(0x80c2c60,0x80c2c68)
>>> 26208 imap 0.000103 RET gettimeofday 0
>>> 26208 imap 0.000116 CALL gettimeofday(0xbfbfe9a0,0)
>>> 26208 imap 0.000119 RET gettimeofday 0
>>> 26208 imap 0.000131 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
>>> 26208 imap 0.474998 RET kevent 0
>>>
>> [snip]
>>
>> This looks quite normal... I am not really sure about what is
>> happening. Is the CPU consumed by in-kernel operation? (systat -vm or
>> top's output would be helpful)
>>
>> Cheers,
>>
> 0,5 second for kevent call is normal?
>
>> 26208 imap 0.000131 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
>> 26208 imap 0.474998 RET kevent 0
It seems that the call is from lib/ioloop-kqueue.c's
io_loop_handler_run(), but I did not really follow the logic there.
Personally I think io_loop_get_wait_time() can be improved in some
(tricky?) way so we get better performance on FreeBSD without getting
the penalty of its expensive gettimeofday() call.
Cheers,
--
Xin LI <delphij at delphij.net> http://www.delphij.net/
FreeBSD - The Power to Serve!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://dovecot.org/pipermail/dovecot/attachments/20060918/f984e7b7/attachment.pgp
More information about the dovecot
mailing list