[c-nsp] high performance open source DHCP solution?

Phil Mayers p.mayers at imperial.ac.uk
Wed Jul 20 04:31:09 EDT 2011


On 07/20/2011 07:20 AM, Lincoln Dale wrote:

> which makes me think that the ISC code is likely doing a fsync() and
> thats why you're seeing this magic 200 number.

Correct. The server writes the lease to the file and issues an fsync 
before answering.

>
> a simple way to make it go faster would be to try it out on a SSD.

Or a disk array with battery-backed write cache.

> but likely there are options for tuning said dhcp server code such
> that it delays or batches fsync, or can operate with an in-memory
> index instead.

Sadly not. There has been discussion about this in the past, and there's 
reluctance to consider solutions that don't involve writing leases to 
non-volatile storage before the reply is made; in fairness, the RFC is 
very explicit in this regard.

You can cheat and put the lease file on a ramdisk of course, then sync 
it to permanent storage yourself using e.g. a cron job once a minute. 
Obviously if you have an outage you'll lose any leases granted in the 
last minute, which could be a serious problem if you have short lease times.


More information about the cisco-nsp mailing list