Dhcpleases: high CPU-usage

  • Hi

    We use a pfSense 2.0 RC-3 (newest august 21. i386 releng)  running on a ESXi-host to deliver internet through captive portal at work.
    Somewhere around the start of week 32 a strange CPU-usage issue appeared. It may or may not be related to a pfSense-upgrade, but it may also be that the usage is higher as people started to come in from vacation.

    The issue is that the process dhcpleases has very high CPU-usage for one hour, then everything is normal for one hour before it starts again.
    I have no idea what's causing this. We have around 150-250 dhcpleases on a usual day.
    I tried to increase the dhcp-lease time from the default two hours (7200) to 28800 (eight hours) but it did not have any effect on the issue.

    All help appreciated!

  • Does it cause any issue to you or you are just seeing this and asking if there is a problem with it?

  • @ermal:

    Does it cause any issue to you or you are just seeing this and asking if there is a problem with it?

    Since the issue suddenly started in the beginning of week 32 it seems more like a bug to me. It is an issue as the server right in this moment is burning over 85% CPU just on the dhcpleases process.

    Could it be related to the insane spamming of "read /etc/hosts-messages" in the System log (attached image)? I get several messages each second.
    If there is a problem with /etc/hosts that could maybe be related to dnsmasq updating the DHCP-names and IP-adresses in that file?

  • Ok, I have found the problem.

    Since dhcpleases was using so much CPU and there obviously was a lot of activity in the /etc/hosts file I decided to turn off "Register DHCP leases in DNS forwarder".

    After doing that the /etc/hosts file was reduced to 5 records, which I have manually added and all issues with CPU-usage dissappeared.

    I still don't know if there is a bug in later versions of pfSense, but it seems to be some issue with the dhcpleases and updating /etc/hosts.

  • I too just experienced this… Except the cpu stays at 100%.  Top shows dhcpd taking all the cpu.. I'm also running on esxi and using pfsense built 2.0-RC2 (i386)
    built on Thu Jun 2 04:01:18 EDT 2011.

    Edit:  I restarted the dhcpd service and it corrected the problem. We'll see if it happens again...

Log in to reply