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

    Pfsense Log rotation issues - high bzcat CPU

    Scheduled Pinned Locked Moved General pfSense Questions
    6 Posts 4 Posters 289 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.
    • L
      Luce321
      last edited by

      Hello,

      the 'bzcat' processes have started to use a combined of 100% CPU.
      I have disabled logging on all the rules as a test, but still the same.
      I have also disabled pfBlockerNG, but still the same.

      The dashboard is not accessible at all when the CPU spikes (the firewall log widget probably causing it), also the firewall logs via GUI are also not accessible. Not ever, not even when the CPU calms down for a minute or two, which is when I can login to any other page but /index.php because dashboard.

      CPU:
      4590bc6c-a109-41ff-8731-c2f9ff8e4af2-image.png

      Appears to be a log cycle issue. The log settings:
      6e2cd4f8-71f8-49d7-acc1-372988d3334c-image.png

      The log files appear huge.
      4c36bb61-30bb-4988-a103-f368e69cca0d-image.png

      We're not using ZFS, turning off compression probably not the best idea.
      There's also this shiny red button that I have not pressed yet:
      7c50c30c-3a09-4574-8318-bdc34c3d19ad-image.png

      Pfsense is running on a VM and version is:
      2783efd1-12fe-43ea-8461-14359dd38656-image.png

      Any hints appreciated!

      W S 2 Replies Last reply Reply Quote 0
      • W
        WN1X @Luce321
        last edited by

        @Luce321 As the message says "Compressing rotated log files saves disk space, but can incur a performance penalty."

        Turn off log compression.

        L 1 Reply Last reply Reply Quote 0
        • L
          Luce321 @WN1X
          last edited by

          @WN1X

          True, however, I'd need to find out approx. how much more space it will use up.
          Going from a mediocre performance due to compression to a disk full, would be quite the opposite of fixing the issue.

          There is 2.5GB available currently.

          W 1 Reply Last reply Reply Quote 0
          • W
            WN1X @Luce321
            last edited by WN1X

            @Luce321 Alternatively, choose a different compression algorithm. Zstd is good choice for performance.

            1 Reply Last reply Reply Quote 0
            • S
              SteveITS Galactic Empire @Luce321
              last edited by

              @Luce321 700 MB seems rather large but the logs also go back 2 months? Typically with high log usage the problem is either no rotation (large log/rotation size) or way too much rotation (lots of writing to logs and it can't keep up).

              Is this on an SSD?

              discussion of compression and when to not use it:
              https://docs.netgate.com/pfsense/en/latest/monitoring/logs/settings.html#log-rotation-settings

              Pre-2.7.2/23.09: 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 restart, or more depending on packages and device speed.
              Upvote 👍 helpful posts!

              1 Reply Last reply Reply Quote 0
              • stephenw10S
                stephenw10 Netgate Administrator
                last edited by

                Yeah it should never reach that size. It's probably unable to rotate them because of the compression time taking longer than the rotation time.

                I would clear the log files and disable compression. Or increase the log size and reduce the amount logging so they aren't rotating as often.

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