Performance... no more than 150 leases per second?

David W. Hankins dhankins at isc.org
Wed Jun 9 17:10:01 UTC 2010


On Mon, May 31, 2010 at 06:28:52PM +0200, Christian Hammers wrote:
> Looking at this function I suspect that the main issue is still the same
> for() loop as in 2003 (http://marc.info/?l=dhcp-server&m=104488701523671)
> 
> 	/* Insertion sort the lease onto the appropriate queue. */
> 	for (; lp ; lp = lp->next) {
> 		if (lp -> sort_time >= comp -> sort_time)
> 			break;
> 		prev = lp;
> 	}

It's actually most pessimal, because in the general case the lease is
appended to the list.  This always searches the whole list to perform
the append.

> Isn't it possible find an algorithm that scales better with large queues?

Yes, it's on our list.  We don't get many opportunities to make
changes like these, so when we do we want to be complete and there
are other scaling problems in how leases are organized in memory.

Since the lease_enqueue() function works over a given declared pool,
one workaround is to configure multiple pools to contain disparate
range statements rather than collecting them all in one pool.

-- 
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/20100609/61495f8e/attachment.bin>


More information about the dhcp-users mailing list