Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Dhcpleases: high CPU-usage

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    5 Posts 3 Posters 4.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      marsboer
      last edited by

      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!

      CPU.png
      CPU.png_thumb
      cpu-monthly.jpg
      cpu-monthly.jpg_thumb
      cpu-weekly.jpg
      cpu-weekly.jpg_thumb
      cpu-hourly.jpg
      cpu-hourly.jpg_thumb

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

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

        1 Reply Last reply Reply Quote 0
        • M
          marsboer
          last edited by

          @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?

          System-log.png_thumb
          System-log.png

          1 Reply Last reply Reply Quote 0
          • M
            marsboer
            last edited by

            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.

            1 Reply Last reply Reply Quote 0
            • P
              phospher
              last edited by

              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...

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.