[Dnsmasq-discuss] Re : Re : Feature request for dhcp-hostfiles to behave like addn-hosts

Simon Kelley simon at thekelleys.org.uk
Fri Dec 17 14:45:15 GMT 2010


Vincent Cadet wrote:
> richardvoigt at gmail.com wrote:
> 
> 
>> I haven't used sqlite, but I would imagine it loses many of its
>> advantages in  the lease script process-model -- dnsmasq spawns a new
>> process for every  lease.
> 
> I've just read SQLite is thread-safe and may be accessed by multiple threads and 
> processes (though they strongly discourage that: «threads are evil»). They use a 
> reader/writer lock mechanism. So it looks like it can be done. I have no idea 
> about the impact upon performance though.
> 

The problem isn't concurrency - calls to the lease-change script are
serialised. The problem is that each change causes a new process, so
that would have to open the SQlite database, make the change, and close
it. It's not obvious that doing that would be cheaper than the current,
very simple, arrangement.

If one were to implement a more sophisticated database management
arrangement _within_ dnsmasq, SQLite could work well. I'd like to see at
least one case where the current system is inadequate before doing that.


Cheers,

Simon.



More information about the Dnsmasq-discuss mailing list