[prev in list] [next in list] [prev in thread] [next in thread]
List: dhcp-server
Subject: DHCPD 3.0 Big Performance Problem
From: Dinh_Ba.Truc () alcatel ! fr
Date: 2003-02-10 14:20:15
[Download RAW message or body]
*** From dhcp-server -- To unsubscribe, see the end of this message. ***
This performance problem only occurs on LARGE client range.
After testing with DHCP Client Generator, i a couple of messy codes that
eat alot of CPU, they are in lease_enqueue() functions in file mdb.c.
Here is the messy code:
lease_enqueue()
{
.....
/* Insertion sort the lease onto the appropriate queue. */
prev = (struct lease *)0;
for (lp = *lq; lp; lp = lp -> next) {
if (lp -> sort_time >= comp -> sort_time)
break;
prev = lp;
}
....
}
As you can see, it check the lease queue sequentialy, with a short client
range it doesnt affect much but with a large range, 65535 for example, it
takes a lot lot of CPU.
in my test, the main problem was on the free lease queue. Normally, DHCPD
runs through the whole queue and stops at the last one.It is totally waste
of CPU.
i thinks we should fix this problem by add some specific code for each type
of queue, check for the end of the queue before check it sequentialy, or
use a better sorting algorithm,....
looking forward for the answers
-----------------------------------------------------------------------
List Archives : http://www.isc.org/ml-archives/dhcp-server/
Unsubscribe : http://www.isc.org/dhcp-lists.html
-or- : mailto:dhcp-server-request@isc.org?Subject=unsubscribe
-----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic