DHCP Performance (was: Large leases file and long startup time)

David W. Hankins dhankins at isc.org
Fri Jul 2 22:51:54 UTC 2010


On Thu, Jul 01, 2010 at 04:17:57PM -0400, Jason Antman wrote:
> We've been running DHCPerf
> (http://www.nominum.com/services/measurement_tools.php) against a
> testing box, and we're seeing pretty poor performance - something on the
> order of only 1 request per second being handled within a 4 second window.

DHCPREQUEST performance is coupled directly to fsync() rate.  The
server, to provide RFC 2131 conformance, fsync()'s the lease database
prior to making any reply, and it does this for every lease in
synchrony.

If anything else is competing for fsync()'s on a given disk, it will
compete with dhcpd, slowing it down.  For example, linux syslog that
doesn't have the leading '-' on the filename will fsync() after every
sysylog line, and dhcpd will output two syslog lines for every one
lease granted (DHCPREQUEST/DHCPACK) - 3 fsync()'s per lease granted.

In 4.1.0, we pulled up a patch from Christof Chen that implements a
'delayed-fsync' queue.  Multiple leases are granted, but not replied.
One fsync() is called on a time or size of queue trigger (or simply if
all sockets read dry), and all the pending DHCPACK replies are
transmitted in bulk.  I had some issues getting this to work reliably
with failover in 4.1.0, so it is compiled out by default.  There have
been reports it does work reliably, but I haven't heard any
performance comparisons.

The next bottleneck is of course the in-memory database, which can
suffer if there are even a small number of large pools.  It seems to
fare better, but still not optimally, with large(r) numbers of
small(er) pools.

-- 
David W. Hankins	"If you don't do it right the first time,
Software Engineer		     you'll just have to do it again."
Internet Systems Consortium, Inc.		-- Jack T. Hankins
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20100702/0749b68c/attachment.bin>


More information about the dhcp-users mailing list