Memory leak in dhcpd?
tunekawa at designet.co.jp
Thu Aug 8 07:17:41 UTC 2013
We are currently running a DHCP server on a Debian GNU/Linux 5.0 machine.
The server is running to lease IPv4 and IPV6 addresses.
We are running dhcp-4.2.4-P2, and after running our server for a short period of time,
we noticed that the dhcpd process for IPV6 was steadily increasing its memory usage.
We are believe that this is due to a memory leak.
After running a ps command and evaluating a number of VSZ values, we confirmed that memory usage is increasing.
<ps query VSZ Values>
Our first suspicion was that memory size was increaseing in relation to the number of IP addresses leased;
however, after some research we found out that the number of leased address only totaled a count of 87.
This is a small number considering ISP's lease IP addresses in the thousands.
We used the following options to compile our dchpd binary:
We had to change the hash size of the lease table from 100003 to 200009 to compensate
for the fact that an increase of IPv4 addresses increases the startup time of the process.
The value LEASE_HASH_SIZE was changed in the src/includes/dhcpd.h file.
Could this change be a possible cause for the memory leak?
We are in need of a solution as quickly as possible as we have ISP's
that are using this setup to lease addresses to their customers.
If you know of any methods to find a solution, similar examples to our situation or any feedback
that would help us would be greatly appreciated.
More information about the dhcp-users