[Dovecot] FreeBSD 6.1-RELEASE/kqueue high CPU load

Taras Savchuk taras at elantech.ru
Mon Sep 18 17:35:14 EEST 2006


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
 26208 imap     0.475010 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     0.475014 RET   gettimeofday 0
 26208 imap     0.475027 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     0.475030 RET   gettimeofday 0
 26208 imap     0.475043 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     0.475046 RET   kevent 0
 26208 imap     0.475058 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     0.475062 RET   gettimeofday 0
 26208 imap     0.475076 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     0.475079 RET   gettimeofday 0
 26208 imap     0.475098 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     0.550005 RET   kevent 0
 26208 imap     0.550017 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     0.550020 RET   gettimeofday 0
 26208 imap     0.550033 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     0.550037 RET   gettimeofday 0
 26208 imap     0.550050 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     0.550054 RET   kevent 0
 26208 imap     0.550066 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     0.550070 RET   gettimeofday 0
 26208 imap     0.550083 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     0.550087 RET   gettimeofday 0
 26208 imap     0.550104 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     1.001030 RET   kevent 0
 26208 imap     1.001047 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     1.001051 RET   gettimeofday 0
 26208 imap     1.001065 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     1.001068 RET   gettimeofday 0
 26208 imap     1.001080 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     1.001083 RET   kevent 0
 26208 imap     1.001096 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     1.001100 RET   gettimeofday 0
 26208 imap     1.001113 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     1.001117 RET   gettimeofday 0
 26208 imap     1.001133 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     1.551061 RET   kevent 0
 26208 imap     1.551076 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     1.551079 RET   gettimeofday 0
 26208 imap     1.551093 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     1.551096 RET   gettimeofday 0
 26208 imap     1.551108 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     1.551112 RET   kevent 0
 26208 imap     1.551125 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     1.551129 RET   gettimeofday 0
 26208 imap     1.551142 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     1.551146 RET   gettimeofday 0
 26208 imap     1.551162 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     2.002105 RET   kevent 0
 26208 imap     2.002128 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     2.002132 RET   gettimeofday 0
 26208 imap     2.002148 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     2.002151 RET   gettimeofday 0
 26208 imap     2.002165 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     2.002168 RET   kevent 0
 26208 imap     2.002182 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     2.002186 RET   gettimeofday 0
 26208 imap     2.002204 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     2.002207 RET   gettimeofday 0
 26208 imap     2.002237 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     2.551119 RET   kevent 0
 26208 imap     2.551142 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     2.551146 RET   gettimeofday 0
 26208 imap     2.551160 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     2.551164 RET   gettimeofday 0
 26208 imap     2.551177 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     2.551180 RET   kevent 0
 26208 imap     2.551194 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     2.551198 RET   gettimeofday 0
 26208 imap     2.551216 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     2.551219 RET   gettimeofday 0
 26208 imap     2.551231 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     3.003152 RET   kevent 0
 26208 imap     3.003171 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     3.003175 RET   gettimeofday 0
 26208 imap     3.003189 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     3.003192 RET   gettimeofday 0
 26208 imap     3.003204 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     3.003208 RET   kevent 0
 26208 imap     3.003221 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     3.003225 RET   gettimeofday 0
 26208 imap     3.003240 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     3.003243 RET   gettimeofday 0
 26208 imap     3.003260 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     3.552168 RET   kevent 0
 26208 imap     3.552190 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     3.552193 RET   gettimeofday 0
 26208 imap     3.552207 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     3.552211 RET   gettimeofday 0
 26208 imap     3.552224 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     3.552227 RET   kevent 0
 26208 imap     3.552241 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     3.552244 RET   gettimeofday 0
 26208 imap     3.552282 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     3.552285 RET   gettimeofday 0
 26208 imap     3.552298 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     4.004222 RET   kevent 0
 26208 imap     4.004248 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     4.004252 RET   gettimeofday 0
 26208 imap     4.004267 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     4.004271 RET   gettimeofday 0
 26208 imap     4.004283 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     4.004287 RET   kevent 0
 26208 imap     4.004306 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     4.004310 RET   gettimeofday 0
 26208 imap     4.004322 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     4.004325 RET   gettimeofday 0
 26208 imap     4.004337 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     4.553216 RET   kevent 0
 26208 imap     4.553239 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     4.553243 RET   gettimeofday 0
 26208 imap     4.553258 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     4.553261 RET   gettimeofday 0
 26208 imap     4.553274 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     4.553278 RET   kevent 0
 26208 imap     4.553291 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     4.553295 RET   gettimeofday 0
 26208 imap     4.553315 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     4.553318 RET   gettimeofday 0
 26208 imap     4.553330 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     5.005249 RET   kevent 0
 26208 imap     5.005275 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     5.005278 RET   gettimeofday 0
 26208 imap     5.005293 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     5.005296 RET   gettimeofday 0
 26208 imap     5.005309 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     5.005313 RET   kevent 0
 26208 imap     5.005327 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     5.005330 RET   gettimeofday 0
 26208 imap     5.005371 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     5.005375 RET   gettimeofday 0
 26208 imap     5.005387 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     5.554266 RET   kevent 0
 26208 imap     5.554288 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     5.554292 RET   gettimeofday 0
 26208 imap     5.554307 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     5.554311 RET   gettimeofday 0
 26208 imap     5.554324 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     5.554327 RET   kevent 0
 26208 imap     5.554341 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     5.554345 RET   gettimeofday 0
 26208 imap     5.554363 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     5.554366 RET   gettimeofday 0
 26208 imap     5.554378 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     6.006322 RET   kevent 0
 26208 imap     6.006347 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     6.006350 RET   gettimeofday 0
 26208 imap     6.006366 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     6.006369 RET   gettimeofday 0
 26208 imap     6.006383 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     6.006387 RET   kevent 0
 26208 imap     6.006400 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     6.006404 RET   gettimeofday 0
 26208 imap     6.006423 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     6.006426 RET   gettimeofday 0
 26208 imap     6.006439 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     6.555345 RET   kevent 0
 26208 imap     6.555369 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     6.555372 RET   gettimeofday 0
 26208 imap     6.555387 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     6.555390 RET   gettimeofday 0
 26208 imap     6.555403 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     6.555407 RET   kevent 0
 26208 imap     6.555445 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     6.555448 RET   gettimeofday 0
 26208 imap     6.555462 CALL  gettimeofday(0xbfbfe9a0,0)
 26208 imap     6.555466 RET   gettimeofday 0
 26208 imap     6.555478 CALL  kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998)
 26208 imap     7.007380 RET   kevent 0
 26208 imap     7.007401 CALL  gettimeofday(0x80c2c60,0x80c2c68)
 26208 imap     7.007405 RET   gettimeofday 0

-- 
С уважением, Савчук Тарас
ООО "Элантек" : Аутсорсинг ИТ, WEB-разработка
+7 (495) 589 68 81
+7 (926) 575 22 11
http://www.elantech.ru
info at elantech.ru



More information about the dovecot mailing list