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

Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2)

Scheduled Pinned Locked Moved General pfSense Questions
20 Posts 7 Posters 997 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.
  • S
    slu
    last edited by slu Aug 18, 2024, 4:06 PM Aug 18, 2024, 9:47 AM

    Hi,

    since my third SSD died in different pfSense setups we check the SMART status of an two year old pfSense system with the following packages installed:

    arpwatch
    Cron
    freeradius3
    nmap
    openvpn-client-export
    pfBlockerNG
    Service_Watchdog
    snort
    Status_Traffic_Totals
    System_Patches
    zabbix-agent6
    

    SMART show total write of 47 TB (!) in two years, no wonder my SSDs are die.
    The question is now, what write so much?

    Do SNORT write on the disk to check the data flow @bmeeks ?

    Edit: Modify topic subject.

    pfSense Gold subscription

    K F B 3 Replies Last reply Aug 18, 2024, 9:57 AM Reply Quote 0
    • K
      keyser Rebel Alliance @slu
      last edited by keyser Aug 18, 2024, 9:58 AM Aug 18, 2024, 9:57 AM

      @slu Snort might be the obvious culprit, but let me assure you, depending on your version and config of pfBlockerNG (obviously also the number of clients and traffic), it can absolutely lay waste to SSD’s if you fx. Ask it to do replylogging and have a lot of blocklists with standard logging turned on.
      I had a config where pfBlockerNG did around 400 KB/s sustained writes to my SSD 24/7 with just 50 clients on the network.
      That will total about 13 TB writes a year from pfBlockerNG alone.

      Love the no fuss of using the official appliances :-)

      S 2 Replies Last reply Aug 18, 2024, 10:01 AM Reply Quote 0
      • S
        slu @keyser
        last edited by Aug 18, 2024, 10:01 AM

        @keyser
        ok so I must check snort as next step.

        Available Spare:                    100%
        Available Spare Threshold:          10%
        Percentage Used:                    67%
        Data Units Read:                    22,535 [11.5 GB]
        Data Units Written:                 92,432,066 [47.3 TB]
        Host Read Commands:                 4,378,418
        Host Write Commands:                4,303,452,653
        Controller Busy Time:               42,328
        Power Cycles:                       25
        Power On Hours:                     13,114
        

        pfSense Gold subscription

        1 Reply Last reply Reply Quote 0
        • F
          fireodo @slu
          last edited by Aug 18, 2024, 10:05 AM

          @slu said in What wrote 47 TB (!) in two years? 2.7.2:

          SMART show total write of 47 TB (!) in two years, no wonder my SSDs are die.
          The question is now, what write so much?

          Hi, if you dig in the Netgate Forum you'll find some threads concerning the huge amount of writing to SSDs/Disk ...

          Regards,
          fireodo

          Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
          SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
          pfsense 2.7.2 CE
          Packages: Apcupsd Cron Iftop Iperf LCDproc Nmap pfBlockerNG RRD_Summary Shellcmd Snort Speedtest System_Patches.

          1 Reply Last reply Reply Quote 0
          • S
            slu @keyser
            last edited by slu Aug 18, 2024, 10:15 AM Aug 18, 2024, 10:14 AM

            @keyser said in What wrote 47 TB (!) in two years? 2.7.2:

            version and config of pfBlockerNG (obviously also the number of clients and traffic)

            I guess you are right, unbound and with it pfBlockerNG 3.2.0_8 (?) is the problem.
            Any hint to disable the logging?

            top -m io show:

            pfSense write 2024-08-18_12-10.png

            Enable remote logging is enabled to external syslog server.

            pfSense Gold subscription

            S G 2 Replies Last reply Aug 18, 2024, 1:17 PM Reply Quote 0
            • S
              slu @slu
              last edited by slu Aug 18, 2024, 2:07 PM Aug 18, 2024, 1:17 PM

              Found it, as soon I switch from "unbound python mode" to "unbound mode" unbound stop permanent writing. I can confirm this on two different pfSense boxes with 2.7.2 CE.

              As @keyser wrote, this is a huge problem.
              https://forum.netgate.com/post/1027554

              pfSense Gold subscription

              W 1 Reply Last reply Aug 18, 2024, 4:15 PM Reply Quote 2
              • S slu referenced this topic on Aug 18, 2024, 2:07 PM
              • W
                w0w @slu
                last edited by Aug 18, 2024, 4:15 PM

                @slu
                32TB writes since 2019 and no, in my case it's not unbound in first place, enabled python mode since it was introduced in pfblockerng btw.

                S 1 Reply Last reply Aug 18, 2024, 5:56 PM Reply Quote 0
                • S
                  slu @w0w
                  last edited by Aug 18, 2024, 5:56 PM

                  @w0w
                  thanks for your reply, that's interesting.

                  On my smaller network (only ~ 8 systems online) I see write throughput of approximately 10. But on my bigger network (screenshot above) its continuity around 1400 write throughput.

                  pfSense Gold subscription

                  W 1 Reply Last reply Aug 19, 2024, 5:07 AM Reply Quote 0
                  • B
                    bmeeks @slu
                    last edited by Aug 18, 2024, 6:58 PM

                    @slu said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                    Do SNORT write on the disk to check the data flow @bmeeks ?

                    No, Snort only writes what you see in the alert logs. It does no temporary writes other than when downloading and unpacking rules files updates. Those happen under /tmp and are cleaned up when the rules update completes. Snort logs are under /var/log/snort/.

                    S 1 Reply Last reply Aug 18, 2024, 7:13 PM Reply Quote 1
                    • S
                      slu @bmeeks
                      last edited by Aug 18, 2024, 7:13 PM

                      @bmeeks said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                      No, Snort only writes what you see in the alert logs.

                      Thank you @bmeeks that confirmed what I see in top -m io with the Snort process.

                      pfSense Gold subscription

                      1 Reply Last reply Reply Quote 0
                      • W
                        w0w @slu
                        last edited by Aug 19, 2024, 5:07 AM

                        @slu
                        Long-term monitoring of disk writes still showed that a significant portion of them is performed unbound. I'm not sure what percentage of the records are unbound, but it is clear that it's substantial, though I don't know how to track it precisely. The Samsung SSD 860 PRO 256GB drives are in a ZFS mirror, and 88% of the resource remains, which is generally non-critical, but...

                        1 Reply Last reply Reply Quote 1
                        • G
                          Gertjan @slu
                          last edited by Gertjan Aug 19, 2024, 11:57 AM Aug 19, 2024, 11:56 AM

                          @slu said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                          Any hint to disable the logging?

                          Just checking :

                          0bef5076-93bd-4ba2-ab41-273ab7a766cb-image.png

                          = unbound log level setting : Right ?

                          Level 3 and above logs a lot, and is only useful for temporary debug sessions. Setting it back to '1' is not 'optional'.

                          Btw : logs files, also the /var/log/resolver.log file, are rotated by pfSense.
                          My pfBlockerng log files (most of them are here /var/unbound/var/log/pfblockerng) are also rotated.
                          I've never, over a decade now, saw a Tbytes file size on my pfSense ...

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

                          S 1 Reply Last reply Aug 19, 2024, 12:01 PM Reply Quote 0
                          • S
                            slu @Gertjan
                            last edited by slu Aug 19, 2024, 12:02 PM Aug 19, 2024, 12:01 PM

                            @Gertjan said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                            = unbound log level setting : Right ?

                            Yes setting is "Level 1", I tried also "Level 0" but unbound write anyway according to "top -m io".

                            Edit:
                            @Gertjan said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                            I've never, over a decade now, saw a Tbytes file size on my pfSense ...

                            I do not have Tbytes file/log size on my pfSense, only see the SSD write TB's...

                            pfSense Gold subscription

                            W 1 Reply Last reply Aug 22, 2024, 6:04 PM Reply Quote 0
                            • W
                              w0w @slu
                              last edited by Aug 22, 2024, 6:04 PM

                              @slu
                              I know this might not solve the root problem, but what about looking for a really long-lasting SSD? Maybe some of the older, reliable MLC or SLC variants? Which form factor do you have?

                              S 1 Reply Last reply Aug 22, 2024, 6:10 PM Reply Quote 0
                              • S
                                SteveITS Galactic Empire @w0w
                                last edited by Aug 22, 2024, 6:10 PM

                                @slu Or perhaps a RAM disk.

                                pfBlocker has some options that are on by default such as DNS Reply Logging to log all non-blocked queries (i.e. all valid DNS). Much like Suricata's HTTP request logging we disable that.

                                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!

                                S 1 Reply Last reply Aug 22, 2024, 8:18 PM Reply Quote 0
                                • S
                                  slu @SteveITS
                                  last edited by Aug 22, 2024, 8:18 PM

                                  @SteveITS said in Unbound python mode in combination with pfBlockerNG wrote more than 40 TB (!) (was: What wrote 47 TB (!) in two years? 2.7.2):

                                  pfBlocker has some options that are on by default such as DNS Reply Logging to log all non-blocked queries (i.e. all valid DNS).

                                  I tried to disable this settings and reload pfBlockerNG + reboot pfSense, but unbound write and write again in python mode.

                                  pfSense Gold subscription

                                  S 1 Reply Last reply Aug 22, 2024, 8:57 PM Reply Quote 0
                                  • S
                                    SteveITS Galactic Empire @slu
                                    last edited by Aug 22, 2024, 8:57 PM

                                    @slu I don't know, have not noticed high disk writes. I have seen posts over the years though...here are a couple.

                                    https://www.reddit.com/r/pfBlockerNG/comments/13di9c2/dnsbl_python_mode_and_disk_writes/
                                    https://forum.netgate.com/topic/165993/should-i-be-using-unbound-python-mode-is-it-stable

                                    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!

                                    S 1 Reply Last reply Aug 25, 2024, 4:32 PM Reply Quote 0
                                    • S
                                      slu @SteveITS
                                      last edited by Aug 25, 2024, 4:32 PM

                                      @SteveITS
                                      thanks @SteveITS for the links.

                                      Still not sure whats the root cause for this massive writes on the SSD, maybe I'm on the wrong way with pfBlockerNG and Unbound Python mode...

                                      pfSense Gold subscription

                                      W 1 Reply Last reply Aug 25, 2024, 4:42 PM Reply Quote 0
                                      • W
                                        w0w @slu
                                        last edited by Aug 25, 2024, 4:42 PM

                                        @slu
                                        The settings can affect it. I just checked how often it updates. The Cron settings are set to once a day. This is probably significantly reducing the number of writes. Maybe there are some other settings that are affecting it as well.

                                        S 1 Reply Last reply Aug 26, 2024, 5:32 PM Reply Quote 0
                                        • S
                                          slu @w0w
                                          last edited by Aug 26, 2024, 5:32 PM

                                          New topic here to investigate the issue since pfBlockerNG is not the cause.
                                          https://forum.netgate.com/topic/189820/how-do-i-find-out-what-write-continuously-on-my-pfsense-ssd

                                          pfSense Gold subscription

                                          1 Reply Last reply Reply Quote 0
                                          4 out of 20
                                          • First post
                                            4/20
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received