[nsd-users] nsd utilize 100% cpu
Vadim
vvatlin at yandex.ru
Thu Dec 10 16:48:17 UTC 2009
Michael Tokarev wrote:
> Vadim wrote:
>> Hi there.
>>
>> Can anybody help me or explain what happen?
>>
>> I run nsd with 40ะบ domain zones.
>> And very often nsd utilize 100%cpu for a long time.
>> For example, when I run nsdc patch, command have already finished but
>> process nsd still running and use 100% cpu.
>
> Can you please specify at least version of nsd you're running?
>
Sorry. nsd-3.2.2-2.el5
>> When I do strace I see:
>> gettimeofday({1260459192, 450604}, NULL) = 0
>> pselect6(8, [7], [7], [], {4, 549396000}, {NULL, 8}) = 1 (out [7],
>> left {4, 549396000})
>> write(7, "\10\0\0\0\0\17\1\t\3\10\5\0\4nw-r\2ru\0", 21) = 21
>> gettimeofday({1260459192, 461029}, NULL) = 0
>> pselect6(8, [7], [7], [], {4, 538971000}, {NULL, 8}) = 1 (out [7],
>> left {4, 538971000})
>> write(7, "\10\0\0\0\0\26\1\20\3\17\f\0\vnw-normativ\2ru\0", 28) = 28
>> gettimeofday({1260459192, 471457}, NULL) = 0
>
> mchost? :)
>
> And what is the fd#7?
nsd 13142 nsd 7u unix 0xffff880011084900 5504109 socket
> Is it the database file?
no
> What does lsof say?
> How large the resulting db file is?
19M /var/lib/nsd/nsd.db
>
>
> Apparently nsd writes each domain label separately, without any attempt
> to batch writes. It's much better than writing by single char as some
> other programs are doing but worse still than batching writes in at least
> 512byte blocks like stdio is doing.
>
>> And even after 20 minutes after "nsd patch" have finished, nsd
>> process still use 100% cpu.
>
> How long it takes total?
I ran again nsdc patch and nsd utilized 100% cpu about 10 minutes
>
> /mjt
>
Thanks.
More information about the nsd-users
mailing list