performance issues with 4096 subnets
Denis Laventure
Denis_Laventure at uqac.ca
Fri Aug 10 10:27:52 UTC 2012
First, don't use the DHCPD package that's included with redhat. Download the source package from isc (I use the latest 4.2.4-P1).
Before compiling, modify the file includes/dhcpd.h
Find this:
#if !defined (LEASE_HASH_SIZE)
# define LEASE_HASH_SIZE 100003
#endif
Replace 100003 by a higher number (I use 350003, should be a prime number from what I recall).
I also added this just after to get more informations in the logfile on deamon startup.
#if !defined (REPORT_HASH_PERFORMANCE)
# define REPORT_HASH_PERFORMANCE 1
#endif
That alone should help reduce the daemon startup time.
But you should also modify your /etc/syslog.conf. Use a - in front of the path of the file your logging to like so:
-/var/adm/messages
ex: *.info;mail.none;news.none;authpriv.none;cron.none; -/var/adm/messages
This tells syslog to change and write 20 lines at a time. It will increase performance and lower your drive activity dramatically. Also good to use with apache logs, etc. With syslog-ng set sync(0) to
sync(20).
I only do these two tricks and my dhcpd daemon take about 4-5 sec to start with 300000 leases (took 90 minutes also before that).
I hope this help,
Denis
-----Message d'origine-----
De : dhcp-users-bounces+denis_laventure=uqac.ca at lists.isc.org [mailto:dhcp-users-bounces+denis_laventure=uqac.ca at lists.isc.org] De la part de Campbell.ColinD at police.qld.gov.au
Envoyé : 9 août 2012 20:49
À : dhcp-users at lists.isc.org
Objet : RE: performance issues with 4096 subnets
Hi,
First post and there's an error :-(
(b) should have read 10.128.0.0/9.
Colin
--
Colin Campbell
Security Specialist
Public Safety Network Management Centre
p: (07) 3008 4851
f: (07) 3008 4799
e: campbell.colind at police.qld.gov.au
> -----Original Message-----
> From:
dhcp-users-bounces+campbell.colind=police.qld.gov.au at lists.isc.org
>
[mailto:dhcp-users-bounces+campbell.colind=police.qld.gov.au at lists.isc.o
rg]
> On Behalf Of Campbell.ColinD(CC)
> Sent: Friday, 10 August 2012 10:46 AM
> To: dhcp-users at lists.isc.org
> Subject: performance issues with 4096 subnets
>
> Hi,
>
> I'm seeking some guidance. I'm running RHEL5 with dhcpd-3.0.5
(probably
> a bad start :-).
>
> We have a requirement to subdivide:
>
> a) 10.0.0.0/9 into 32k subnets, each a /24 with 4 pools in each subnet
> b) 10.128.0.0 into 4k subnets, each a /21 with 1 pool in each subnet
>
> So far we've only attempted (b). The results are less than impressive.
>
> 1. A "configtest" takes approximately 90 minutes.
> 2. The daemon takes approximately 90 minutes to start.
>
> All the time seems to be taken allocating memory for all the
addresses.
> The process grows to about 2.5GBytes.
>
> Will moving to RHEL6 with dhcpd-4.1.1 fix this slow start problem?
>
> The server has dual hex-core CPUs and 40GB RAM.
>
> Colin
> --
> Colin Campbell
> Security Specialist
> Public Safety Network Management Centre
> p: (07) 3008 4851
> f: (07) 3008 4799
> e: campbell.colind at police.qld.gov.au
>
>
>
> **********************************************************************
> CONFIDENTIALITY: The information contained in this
> electronic mail message and any electronic files attached to it may be
> confidential information, and may also be the subject of legal
> professional privilege and/or public interest immunity. If you are
> not the intended recipient you are required to delete it. Any use,
> disclosure or copying of this message and any attachments is
> unauthorised. If you have received this electronic message in error,
> please inform the sender or contact securityscanner at police.qld.gov.au.
>
> This footnote also confirms that this email message has been checked
> for the presence of computer viruses.
> **********************************************************************
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
_______________________________________________
dhcp-users mailing list
dhcp-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/dhcp-users
More information about the dhcp-users
mailing list