[nsd-users] nsd utilize 100% cpu
Dan Durrer
dan at vitalwerks.com
Thu Dec 10 16:21:38 UTC 2009
We were also playing around with NSD. Loading about 80,000 domains.
Using an older machine. Dual Xenon, 2GB ram. One thread would be at
100% cpu for hours, sometimes it would never get out of that state.
Memory usage wasn't very high.
Dan Durrer
No-IP.com
Quoting Michael Tokarev <mjt at tls.msk.ru>:
> 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?
>
>> 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? Is it the database file? What does lsof say?
> How large the resulting db file is?
>
> 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?
>
> /mjt
> _______________________________________________
> nsd-users mailing list
> nsd-users at NLnetLabs.nl
> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
More information about the nsd-users
mailing list