DHCP Failover and Performance

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Feb 22 09:13:42 UTC 2012


LONGREE Yves (SDV/PSE) wrote:

>I also observed that performance is going down as the leasefile grows

It shouldn't. The leasefile is write-only, it's a log-file database 
where any changes are appended to the end of the file. The server 
never reads the file once it's started up as it exclusively uses 
in-memory tables while running.
There is a periodic process (compiled in at 1 hour intervals) which 
writes out a fresh (ie compacted) lease file to avoid the file 
growing forever and filling the disk.

>I tried to put leasefile in ramdisk

Did you do anything with logging ? There's a lot of logging going on, 
and a big performance gain can be had by making logging async 
(typically by prepending the log file name with "-" in your syslog 
config. Without doing this, not only does the server need to write a 
lease record and flush it to disk, but it also writes one or more log 
entries which are also flushed to disk before any response is given 
to the client.


Something else to consider is the size of your address range(s). 
Regardless of how many addresses are/have been used, a record is 
created in memory for every address which is part of a range. Thus a 
range of (say) 10.0.0.10 10.255.255.254 would result in over 16 
million addresses being loaded into the internal tables - even if you 
only have half a dozen clients.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.


More information about the dhcp-users mailing list