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

    SG6100 SWAP full and high CPU - tweak suggestions?

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 5 Posters 67 Views 5 Watching
    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.
    • A Offline
      alnico
      last edited by

      I am using a SG6100-Max with a lot of services enabled. I've noticed that my CPU usage is quite high from 40% to 100%. My 1GB swap space was always 100% full, so I increased it to 4GB. Traffic is homelab setup.

      Is there something I can do to address the issue/tweak it further?

      These are the settings:
      Netgate 6100-Max
      8 GB RAM (onboard so can't upgrade)
      128GB HD

      Packages:
      5c694d6b-068a-489a-ac7d-55be7b274e27-image.png

      Top snapshot:
      2798395e-2b06-42ae-a4ac-bd28f08e363f-image.png

      CPU Memory and Swap:
      c6fe992b-a2d0-42c6-a77a-86bac1b98797-image.png

      Can I tweak it any further such as increasing the swap space?

      patient0P GertjanG dennypageD S 4 Replies Last reply Reply Quote 0
      • patient0P Online
        patient0 @alnico
        last edited by

        @alnico what pfSense+ version are you running?

        I do think it's just too many CPU/RAM intensive services running on it.

        The ones I know that can be CPU or/and RAM hogs you run are pfBlockerNT, suricata and ntopng. Not sure about crowdsec, haproxy and zeek (is that only the agent?).

        You run bandwithd and darkstat, both of which are for bandwidth monitoring. Why not choose one of them?

        How much sense it makes to run crowdsec and suricata I don't know.

        I'd start with stopping ntopng and see how the memory and CPU workload are. If it significantly improves I'd move ntopng to a separate server/vm in your homelab.

        1 Reply Last reply Reply Quote 0
        • GertjanG Offline
          Gertjan @alnico
          last edited by

          @alnico said in SG6100 SWAP full and high CPU - tweak suggestions?:

          My 1GB swap space was always 100% full, so I increased it to 4GB

          You should add more RAM, which is impossible.
          So only one option left : lower the RAM usage.
          Suricata/darkstat/ntopng will use all avaible memory. remove them all, and memory issues will be gone for good.
          Up to you to find some middle ground here.

          Btw : Suricata/darkstat/ntopng are processes that have to be baby-sit them : every day (Im' serious), you see what these have found, check their memory usage and disk usage (log files !!). if you don't have to time to check up with their stats, disable them, as it is useless to collect data that you waste-bin moments later.

          See it like this : when not swapping : every memory access is one cpu cycle.
          With swapping every memory access is (hundreds) thousand of cycles .... Swapping is very (!) expensive for the CPU.

          No "help me" PM's please. Use the forum, the community will thank you.
          Edit : and where are the logs ??

          1 Reply Last reply Reply Quote 0
          • dennypageD Offline
            dennypage @alnico
            last edited by

            @alnico said in SG6100 SWAP full and high CPU - tweak suggestions?:

            Is there something I can do to address the issue/tweak it further?

            The amount of CPU for ntopng is quite egregious. I would suggest you reconfigure (or disable) ntopng. You likely have it tracking more data than it should be. Recommendations...

            In the ntopng package:

            • Make sure you are not monitoring the wan interface(s).

            Inside of ntopng itself:

            • If you have any of the slice and dice time series information (off by default), turn them all back off.
            • If you have increased data retention times from defaults, lower it.
            • If you have any form of active discovery enabled inside ntopng itself, turn that off as well.
            1 Reply Last reply Reply Quote 0
            • S Offline
              SteveITS Galactic Empire @alnico
              last edited by

              @alnico Run ps aux|grep php and see if you can see what the PHP processes are actually doing. Often those are stuck doing log rotation/compression, which can be a few things...double compression, high log amounts, etc.

              Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
              When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
              Upvote 👍 helpful posts!

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