tuning for maximum dhcp performance

John Wobus jw354 at cornell.edu
Fri May 9 18:40:26 UTC 2008

> On Thu, May 08, 2008 at 09:18:25PM -0500, Frank Bulk - iNAME wrote:
>> This may be a dumb question, but why not calculate an optimal hash 
>> size at
>> the first start, update it and store it in the dhcpd.leases file 
>> while the
>> dhcpd process runs, and then read it from the dhcpd.leases file and 
>> use it
>> every time the process starts up?

On May 9, 2008, at 12:20 PM, David W. Hankins wrote:
> we should totally do that;
> ...
> no need to store it in dhcpd.leases.  we can count the number of
> leases in config after loading dhcpd.conf but before processing
> dhcpd.leases (just keep a list of all the requested dynamic ranges),
> allocate a hash table of a specific size, and "instantiate" the raw
> config into the optimally-sized table, then process the lease db
> normally.

Hm, such as incorporating a list of suitable primes included in the 
source to
be used with various ranges of lease counts?  Sounds useful.

Short of that, how about a config option, one to declare the size of 
the hash
table, and/or one to give a rough estimate of the number of leases 
there are going
to be?  But if the coding to implement such options requires as much 
relocating of code/function
as allocating for the hash table after the leases are counted, then 
this idea would hardly
be worth the trouble.  Might as well just count leases.


More information about the dhcp-users mailing list