32.5M dhcpd.conf with 108000 classes is parsed for 40 minutes. Is this ok?
John Hascall
john at iastate.edu
Fri May 15 12:57:17 UTC 2009
> Hi.
> I have generated dhcpd.conf from DB with real classes (~38000) and
> faked ones (~70000, to test for user count growth) resulting in a
> config with ~108000 classes.
> It looks like this:
>
> class "10.102.100.100:1" {
> match if
> (binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, > 1)) = "1") and
> (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
> }
> pool {
> range 10.102.100.177;
> option routers 10.102.100.1;
> option subnet-mask 255.255.255.0;
> allow members of "10.102.100.100:1";
> }
> I wonder if it's normal for such a config to be parsed for such a long
> time on [Core2Duo 1.8GHz / CentOS 5 Final / DHCP Server V3.0.5-RedHat]
You seem to have discovered something that ISC's dhcpd is horrible at.
Your config file took well over an hour to parse (dhcpd -t) on my somewhat
less capable machine. The cpu was pegged at 100% the whole time, while
memory use just kept increasing.
My more normal looking config file is about 1/3 the size of that mess
and it parses in a few seconds.
Is there some other way to do this, perhaps with subclasses?
John
More information about the dhcp-users
mailing list