Load times for Large Subnets

Larry Apolonio isc-dhcp at rh73.com
Tue Oct 9 21:10:28 UTC 2007


David W. Hankins wrote:

>On Tue, Oct 09, 2007 at 10:51:12AM -0700, Larry Apolonio wrote:
>  
>
>>Basically I up'd that number by an order of magnitude + some (I think it 
>>was 20000003) and my load times dropped from 20 minutes to 6 seconds.
>>    
>>
>
>Are you sure you also aren't comparing across-feature-trains?  E.g.,
>3.0.x vs 3.1.x?
>
>If not I wonder if we still have some lease hash collision problems,
>and you'd be doing me a favor if you could rebuild with
>REPORT_HASH_PERFORMANCE defined and the default hash table size (that
>only works in 3.1 or 4.0).
>
>Going from 3:1 to 1:48 buckets shouldn't net such wide results.
>
>  
>
>>This section was in dhcp-3.1.0 and dhcp-4.0.0.a3 but it was not in the 
>>RHEL SRPMS dhcp-3.0.5.
>>    
>>
>
>3.0.x uses 'DEFAULT_HASH_SIZE' for everything, 9973.  You could up it,
>but you'd up it for -all hash tables-.
>
>  
>
>>There certainly was a huge cost in memory, I think it took nearly a GB 
>>of RAM, but dhcperf showed similar results in 4 way handshakes. 
>>    
>>
>
>That hash size is used for several tables, and consumes a pointer
>for each bucket.
>
>So it's a rather multiplicative increase in memory footprint.
>
>  
>
>>Does anyone know if there are any other problems that will arise when I 
>>increased this number?  What other tweaks are there that I can do to 
>>improve transaction performance.  Would be nice to be able to do 100,000 
>>four way handshakes per hour.
>>    
>>
>
>If you're going to run on tmpfs, and you're going to be editing
>sources anyway, comment out the fsync() call.  It's an extra system
>call at that point.  Not doing anyone any good.
>
>  
>
I'll rebuild with

REPORT_HASH_PERFORMANCE

but let me run through what I did in detail

Plain Vanilla Build
Downloaded source
tar zxvf dhcp-3.1.0.tar.gz
./configure
make all
make install
umount /var/lib/dhcpd
mount -t tmpfs tmpfs /var/state/dhcp
./makeleases-ng 200000 43200 > /var/state/dhcp/dhcpd.leases
(This little utility I wrote generates 200000 entries with 43200 lease time)

Tested DHCPD
# dhcpd -T
Internet Systems Consortium DHCP Server V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Started dhcpd
# time service dhcpd start
Starting dhcpd:                                            [  OK  ]

real    15m10.460s
user    15m9.328s
sys     0m0.811s

And it took 15 minutes

I stopped the dhcpd service

edited dhcpd.h

Clean and recompile
make distclean
./configure
make all
make install

Make new leases
./makeleases-ng 200000 43200 > /var/state/dhcp/dhcpd.leases

Tested stuff out
# dhcpd -T
Internet Systems Consortium DHCP Server V3.1.0
Copyright 2004-2007 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

And restarted
# time service dhcpd start
Starting dhcpd:                                            [  OK  ]

real    0m7.535s
user    0m6.431s
sys     0m1.087s

This time 7 seconds

I'll compile with

REPORT_HASH_PERFORMANCE

next


Larry Apolonio




More information about the dhcp-users mailing list