[Dnsmasq-discuss] bad performance with dhcperf

Simon Kelley simon at thekelleys.org.uk
Wed Jun 18 13:25:16 BST 2008


Stefan Krüger wrote:
> Hello list,
> 
> I did some testing (after fixing some compiler warnings) with dhcperf
> (ftp://ftp.nominum.com/pub/nominum/dhcperf/1.0.1.0/)
> 
> Dnsmasq 2.43test6 on Solaris10/sparc
> 
> # dhcperf --server solaris --discover (executed on FreeBSD 7)
> Wanted 3145728 bytes in output buffer; got 229376.
> Wanted 3145728 bytes in input buffer; got 229376.
> Beginning DHCPDISCOVER load test.
> Initial probe complete: High-water mark is 2 clients/second.
> Preparing for next test run.
> Beginning test run: 1 clients/second for 120 seconds.
> Stopping run after 24 seconds; 1/19 clients failed.
> 0 five-way handshakes per second.
> 
> Same test with ISC's dhcpd (4.1.0a1)
> 
> # dhcperf --server solaris --discover
> Wanted 3145728 bytes in output buffer; got 229376.
> Wanted 3145728 bytes in input buffer; got 229376.
> Beginning DHCPDISCOVER load test.
> Initial probe complete: High-water mark is 40 clients/second.
> Preparing for next test run.
> Beginning test run: 20 clients/second for 120 seconds.
> Succeeded: 0/2400 clients failed.
> Preparing for next test run.
> Beginning test run: 30 clients/second for 120 seconds.
> Succeeded: 0/3600 clients failed.
> Preparing for next test run.
> Beginning test run: 35 clients/second for 120 seconds.
> Succeeded: 0/4200 clients failed.
> Preparing for next test run.
> Beginning test run: 37 clients/second for 120 seconds.
> [...]
> 
> Now the other way around (dnsmasq 2.41 /dhcpd 3.0.5  on FreeBSD 7,
> dhcperf on Solaris)
> 
> # /usr/local/nom/bin/dhcperf --server freebsd --discover
> Wanted 3145728 bytes in output buffer; got 2097152.
> Wanted 3145728 bytes in input buffer; got 2097152.
> Beginning DHCPDISCOVER load test.
> Initial probe complete: High-water mark is 2 clients/second.
> Preparing for next test run.
> Beginning test run: 1 clients/second for 120 seconds.
> Stopping run after 5 seconds; 1/1 clients failed.
> 0 five-way handshakes per second.
> 
> Now ISC's dhcpd:
> 
> # /usr/local/nom/bin/dhcperf --server freebsd --discover
> Wanted 3145728 bytes in output buffer; got 2097152.
> Wanted 3145728 bytes in input buffer; got 2097152.
> Beginning DHCPDISCOVER load test.
> Initial probe complete: High-water mark is 26 clients/second.
> Preparing for next test run.
> Beginning test run: 13 clients/second for 120 seconds.
> Succeeded: 0/1560 clients failed.
> Preparing for next test run.
> Beginning test run: 19 clients/second for 120 seconds.
> Succeeded: 0/2280 clients failed.
> Preparing for next test run.
> Beginning test run: 22 clients/second for 120 seconds.
> Succeeded: 0/2640 clients failed.
> Preparing for next test run.
> [...]
> 
> Any ideas why dnsmasq performs so bad
Yes.
(or not at all)?
No. - could you send me some logs or packet captures?

The reason is (appears to) perform so badly is that dnsmasq doesn't
multi-task more than one query at a time. For most queries, most of the
time, that is not relevant - the UDP packet comes in, the answer gets
computed, and a UDP packet goes out. The exception is DHCPDISCOVER, when
the DHCP server has to check that an address is not in use by sending an
ICMP "ping" packet and waiting a couple of seconds to check there's no
reply. ISC DHCP will continue with other DHCP transactions during the
wait. Dnsmasq doesn't (though it does continue to serve DNS and TFTP).

This is a deliberate design choice - it's one reason that dnsmasq is
lightweight compared to ISC, and it fits fine with dnsmasq's normal
usage. For heavy load, the situation is not as bad as it sounds. dnsmasq
detects if it has a backlog of DHCP queries because of the "ping" waits,
and stops doing the ping check until the backlog goes away, so it won't
get swamped by heavy load. I guess that this behaviour probably confuses
dhcppref quite a lot.

It would be interesting to see what the results are with ping-checking
turned off (--no-ping)


Cheers,

Simon.



> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list