32.5M dhcpd.conf with 108000 classes is parsed for 40 minutes. Is this ok?

michael kapelko kornerr at gmail.com
Tue May 19 03:20:18 UTC 2009


Thank you Glenn for your descriptive and helpful answer.
I now generate a smaller dhcpd.conf which is of 20M with about the
same 100000 classes. It's parsed for 27 minutes. So I guess I haven't
yet reached the correct config layout.
Here is how it looks like now:

ddns-update-style none;
min-lease-time 120;
default-lease-time 150;
max-lease-time 180;
local-address 10.102.101.13;
# Unreal classes for testing
class "192.168.25.163:66" {
    match if (suffix(option agent.circuit-id, 1) = 42) and
             (packet(24, 4) = C0:A8:19:A3);
}
class "192.168.241.190:66" {
    match if (suffix(option agent.circuit-id, 1) = 42) and
             (packet(24, 4) = C0:A8:F1:BE);
}
- - - many lines - - -
# Real classes
class "10.102.100.100:2" {
    match if (suffix(option agent.circuit-id, 1) = 2) and
             (packet(24, 4) = 0A:66:64:64);
}
class "10.102.100.100:48" {
    match if (suffix(option agent.circuit-id, 1) = 30) and
             (packet(24, 4) = 0A:66:64:64);
}
- - - many lines - - -
shared-network "clients" {
# Just because server is on a network not managed by DHCP (to prevent
broadcasts); we use this for DHCP to listen to an interface of
10.102.101.13
subnet 10.102.101.0 netmask 255.255.255.0 { }
# Real subnet
subnet 10.101.10.0 netmask 255.255.255.0 {
    option routers 10.101.10.1;
    option subnet-mask 255.255.255.0;
    option domain-name-servers 91.196.207.62, 91.196.206.2;
    pool {
        allow members of "10.101.116.123:1";
        range 10.101.10.107;
    }
}
subnet 10.102.100.0 netmask 255.255.255.0 {
	option routers 10.102.100.1;
	option subnet-mask 255.255.255.0;
	option domain-name-servers 91.196.207.62, 91.196.206.2;
	pool {
		allow members of "10.102.100.100:1";
		range 10.102.100.177;
	}
	pool {
		allow members of "10.102.100.100:4";
		range 10.102.100.193;
	}
	pool {
		allow members of "10.102.100.100:48";
		range 10.102.100.124;
		range 10.102.100.125;
	}
	pool {
		allow members of "10.102.100.9:2";
		range 10.102.100.56;
	}
	pool {
		allow members of "10.102.100.9:6";
		range 10.102.100.205;
	}
}
- - - many lines - - -
} # shared-network

The complete file is available here:
http://kornerr.alfamoon.com/download/dhcpd_subnets.conf.bz2 [807K]
What would be your suggestions to speed up parsing?
I've also read the topic you suggested (I hope this one as it was the
last one about speed I found) about parsing speed up:
https://lists.isc.org/mailman/htdig/dhcp-users/2007-October/004789.html
Although, it's about recompilation. I don't know yet if my config is
really correct yet, so I first want to write config correctly and only
then (if it still takes much time to parse) recompile dhcpd.

Thanks in advance.



More information about the dhcp-users mailing list