LI Xin пишет:
Taras Savchuk wrote: [snip]
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,
~20000 calls to gettimeofday() per second. Is it normall?
No! What's more, gettimeofday() is much more expensive on FreeBSD than its Linux counterpart, as it provides higher resolution time which is not useful for many applications.
My guess is that your imap instance is stuck in a state where either kevent() is called with a zero ts structure (which is effectively a poll) every time, or some other weird thing happend.
mail2# cat k.dov.l.txt | grep CALL | grep gettimeofday | wc -l 1195552 mail2# head -n 1 k.dov.l.txt 20910 imap 0.000000 CALL gettimeofday(0x80c2c60,0x80c2c68) mail2# tail -n 1 k.dov.l.txt 20910 imap 51.826065 RET gettimeofday 0
Are these gettimeofday() calls called one by one? Or is there any other calls between gettimeofday's?
Cheers,
It's a statistics for the same ktrace file (52 seconds):
mail2# cat k.dov.l.txt | wc -l 3991592 mail2# cat k.dov.l.txt | grep kevent | grep CALL | wc -l 797033 mail2# cat k.dov.l.txt | grep kevent | grep RET | wc -l 797033 mail2# cat k.dov.l.txt | grep gettimeofday | grep CALL | wc -l 1195552 mail2# cat k.dov.l.txt | grep gettimeofday | grep RET | wc -l 1195556 mail2#
and it's tipical chunk:
20910 imap 51.825657 RET kevent 1 20910 imap 51.825712 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825715 RET gettimeofday 0 20910 imap 51.825734 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825737 RET gettimeofday 0 20910 imap 51.825755 CALL kevent(0x5,0,0,0xbfbfe940,0x1,0xbfbfe938) 20910 imap 51.825759 RET kevent 1 20910 imap 51.825778 CALL gettimeofday(0xbfbfe9a0,0) 20910 imap 51.825782 RET gettimeofday 0 20910 imap 51.825801 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998) 20910 imap 51.825804 RET kevent 1 20910 imap 51.825823 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825826 RET gettimeofday 0 20910 imap 51.825844 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825847 RET gettimeofday 0 20910 imap 51.825864 CALL kevent(0x5,0,0,0xbfbfe940,0x1,0xbfbfe938) 20910 imap 51.825869 RET kevent 1 20910 imap 51.825888 CALL gettimeofday(0xbfbfe9a0,0) 20910 imap 51.825892 RET gettimeofday 0 20910 imap 51.825910 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998) 20910 imap 51.825914 RET kevent 1 20910 imap 51.825932 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825936 RET gettimeofday 0 20910 imap 51.825953 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.825957 RET gettimeofday 0 20910 imap 51.825974 CALL kevent(0x5,0,0,0xbfbfe940,0x1,0xbfbfe938) 20910 imap 51.825978 RET kevent 1 20910 imap 51.825997 CALL gettimeofday(0xbfbfe9a0,0) 20910 imap 51.826000 RET gettimeofday 0 20910 imap 51.826019 CALL kevent(0x4,0,0,0x80d1000,0x5,0xbfbfe998) 20910 imap 51.826022 RET kevent 1 20910 imap 51.826041 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.826044 RET gettimeofday 0 20910 imap 51.826062 CALL gettimeofday(0x80c2c60,0x80c2c68) 20910 imap 51.826065 RET gettimeofday 0
-- С уважением, Савчук Тарас ООО "Элантек" : Аутсорсинг ИТ, WEB-разработка +7 (495) 589 68 81 +7 (926) 575 22 11 http://www.elantech.ru info@elantech.ru