Reducing select() usage under load

Aaron Hopkins lists at die.net
Fri Jun 23 02:13:35 UTC 2006


On Fri, 12 May 2006, Aaron Hopkins wrote:

> According to the queryperf tool that comes with BIND, on a simple query
> against localhost on an old Linux box, this takes NSD's peak throughput from
> 39kpps to 48kpps, a 23% improvement.  These are obviously ideal conditions,
> but please feel free to test for yourself.

I had a chance to test this patch in different environment.  I had three
Linux 2.6 boxes with one 3.4ghz hyperthreaded P4 each on a gigabit network. 
Two machines acted as clients running BIND's queryperf tool, one was running
NSD 2.3.4.

With stock NSD 2.3.4 with no -N specified, I got 43000 qps total.  With -N 2
specified, I got 50000 qps total.

Adding my select()-reduction patch to stock NSD 2.3.4 with no -N specified,
I got 49000 qps total.  With -N 2 specified, I got 55000 qps total.

In this environment, it seems that reducing select()s offers a 10-14%
performance improvement.

                                     -- Aaron



More information about the nsd-users mailing list