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

How do I find out what write continuously on my pfSense SSD

General pfSense Questions
7
34
2.1k
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 @Gertjan
    last edited by Aug 27, 2024, 8:54 AM

    @Gertjan said in How do I find out what write continuously on my pfSense SSD:

    To make it work, a lot of data needs to be stored and updated.
    If you have just one or two small DNSBL lists, or/and your 'network' doesn't try to visit every host name that is listed in these DNSBL, then stats maintenance won't create a lot of write (update) events.

    Yes you are right and I underestimated that. 😬

    I tried now to disable as much as possible (complete UT1 list) but still see continuously pfblockerng.inc queries writes (no python mode).

    So at the end of the day RAM disk look like the solution.

    pfSense Gold subscription

    S 1 Reply Last reply Aug 27, 2024, 9:03 AM Reply Quote 0
    • S
      slu @slu
      last edited by Aug 27, 2024, 9:03 AM

      I don't activate RAM disk yet (because the reboot), but don't look like there is much data in:

      login-to-view

      So if this is my problem, it must write every time the same "1 MB" file.

      pfSense Gold subscription

      1 Reply Last reply Reply Quote 0
      • G
        Gertjan @slu
        last edited by Aug 27, 2024, 11:16 AM

        You have a

        @slu said in How do I find out what write continuously on my pfSense SSD:

        pfSense CE system

        so your SSD is accessible and replaceable ? This was one of the criteria when I picked my Netgate appliance : I could, in theory, change the drive, if needed, as I know pfSense behaves like any OS out there, and when we start adding gadgets, widgets, packages and tools, drives will get solicited.
        So, a 4100 was the bare minimum for me.
        Ok, it wears out after x years.
        The smallest Crucial out there is .. what ... 20 box ?

        IMHO : stay away from 'RAM drives'. They solve some issues, by creating other ones.

        Classic iron disk don't last 'forever' neither. Some last over 10 years, some died within a couple of yours.

        The problem is different but nothing really changed ;)

        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 27, 2024, 11:22 AM Reply Quote 0
        • S
          slu @Gertjan
          last edited by Aug 27, 2024, 11:22 AM

          @Gertjan said in How do I find out what write continuously on my pfSense SSD:

          so your SSD is accessible and replaceable ?

          Yes no problem to replace the M.2 NVMe SSD.

          @Gertjan said in How do I find out what write continuously on my pfSense SSD:

          Classic iron disk don't last 'forever' neither. Some last over 10 years, some died within a couple of yours.

          That's true.

          @Gertjan said in How do I find out what write continuously on my pfSense SSD:

          IMHO : stay away from 'RAM drives'. They solve some issues, by creating other ones.

          This is not clear to me, what issues can it create?
          I have enough RAM (16 GB), so it will not be an issue.

          On say use RAM disk, the other say not, I'm really unsure at the moment.

          pfSense Gold subscription

          G 1 Reply Last reply Aug 27, 2024, 12:43 PM Reply Quote 0
          • S
            stephenw10 Netgate Administrator
            last edited by Aug 27, 2024, 12:33 PM

            Enable it and see what happens. I usually start out at double the minimum values but since you're running some packages etc and have RAM to spare I'd start out at least 4x. So 160 + 240 MB. If somethings fail to start at boot double it again.

            S 1 Reply Last reply Aug 27, 2024, 3:23 PM Reply Quote 1
            • G
              Gertjan @slu
              last edited by Aug 27, 2024, 12:43 PM

              @slu said in How do I find out what write continuously on my pfSense SSD:

              This is not clear to me, what issues can it create?

              The ones I've never seen before ^^
              Remember : I've a 4100 and I went for the MAX, but that didn't MAXed out the RAM, though.
              So with a mere 4 Gbytes, still very ok to run pfSense, I can't go wild with the big resource eating packages, or use options like "pfBlockerng with all feeds selected ^^"

              More serious : every non programmed power down will destroy all recent stats ...

              Also : It gives a blow to the KIS concept.

              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
              • S
                stephenw10 Netgate Administrator
                last edited by Aug 27, 2024, 12:48 PM

                Yup you lose the RAM disk content if power is lost. But only since the last time it wrote out.

                B 1 Reply Last reply Aug 27, 2024, 12:56 PM Reply Quote 0
                • B
                  Bob.Dig LAYER 8 @stephenw10
                  last edited by Aug 27, 2024, 12:56 PM

                  @stephenw10 But loosing its content is what is wanted here anyways. If it would wrote everything to the disk at some point, there is nothing gained from this.

                  G 1 Reply Last reply Aug 27, 2024, 2:05 PM Reply Quote 0
                  • S
                    stephenw10 Netgate Administrator
                    last edited by Aug 27, 2024, 1:20 PM

                    Writing periodically is still far fewer disk writes. And not everything is written out like that only the RRD files. The other ram disk content is only backed up at shutdown.

                    1 Reply Last reply Reply Quote 0
                    • G
                      Gertjan @Bob.Dig
                      last edited by Aug 27, 2024, 2:05 PM

                      @Bob-Dig said in How do I find out what write continuously on my pfSense SSD:

                      there is nothing gained from this.

                      There is.
                      During shutdown, the set of files will get written out to the 'real' disk.
                      But de xxxxx times the files were updated are all pure bonus.

                      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
                      • B
                        bmeeks @Gertjan
                        last edited by bmeeks Aug 27, 2024, 2:06 PM Aug 27, 2024, 2:05 PM

                        @Gertjan said in How do I find out what write continuously on my pfSense SSD:

                        @bmeeks No coffee this morning ?
                        At line 6530, a SQLite database is queried (read operation) for the 'resolver' field which contains the current PID of unbound.
                        If it changed = restart of unbound, then that field is updated, and that's a (very small) write operation.

                        I see both a "read" query and a "write" operation in that function loop. Notice it does a SQL SELECT and then a SQL INSERT INTO depending on what the query found. I'm not sure of all the logic as I did not author this code, so perhaps the write operation is only occasional. But it looks like all this is associated with the Dashboard Widget and is how it gathers and stores the DNS query statistics for populating the pretty graph. It follows then that the more DNS activity you have on your network the more database writes you have happening so long as the Dashboard Widget is active.

                        S 1 Reply Last reply Aug 27, 2024, 3:26 PM Reply Quote 1
                        • S
                          slu @stephenw10
                          last edited by Aug 27, 2024, 3:23 PM

                          @stephenw10

                          I enable the RAM disk and it look like better now:

                          iostat -d 5 6
                                      ada0            pass0            pass1 
                           KB/t  tps  MB/s  KB/t  tps  MB/s  KB/t  tps  MB/s 
                           20.9   10   0.2   0.4    0   0.0   0.0    0   0.0 
                            0.0    0   0.0   0.0    0   0.0   0.0    0   0.0 
                            0.0    0   0.0   0.0    0   0.0   0.0    0   0.0 
                            0.0    0   0.0   0.0    0   0.0   0.0    0   0.0 
                            0.0    0   0.0   0.0    0   0.0   0.0    0   0.0 
                            0.0    0   0.0   0.0    0   0.0   0.0    0   0.0
                          

                          As far as I understand everything is saved during normal shutdown/reboot, only power outage is an problem?
                          In this case pfSense should boot, but missing maybe some data (no config settings)?

                          pfSense Gold subscription

                          S 1 Reply Last reply Aug 27, 2024, 3:49 PM Reply Quote 0
                          • S
                            slu @bmeeks
                            last edited by Aug 27, 2024, 3:26 PM

                            @bmeeks said in How do I find out what write continuously on my pfSense SSD:

                            It follows then that the more DNS activity you have on your network the more database writes you have happening so long as the Dashboard Widget is active.

                            We have much DNS activity...

                            pfSense Gold subscription

                            1 Reply Last reply Reply Quote 0
                            • S
                              stephenw10 Netgate Administrator @slu
                              last edited by stephenw10 Jan 14, 2025, 3:23 PM Aug 27, 2024, 3:49 PM

                              @slu said in How do I find out what write continuously on my pfSense SSD:

                              but missing maybe some data (no config settings)?

                              I doesn't lose config. It will lose logs and RRD data since the last periodic write out. It loses cached stuff that will need to be re-downloaded at the next boot.

                              I run ram disks here on numerous machines and never see any significant issues. Even when deliberately trying!

                              S M 2 Replies Last reply Aug 27, 2024, 4:04 PM Reply Quote 1
                              • S
                                slu @stephenw10
                                last edited by Aug 27, 2024, 4:04 PM

                                @stephenw10
                                this should added to the documentation (IMHO), if someone enable pfBlockerNG on a 1100
                                it will write "down" the storage.

                                Maybe an hint here:
                                https://docs.netgate.com/pfsense/en/latest/packages/pfblocker.html

                                I learned (again) many thinks of pfSense / FreeBSD.
                                Thanks @bmeeks @Gertjan @stephenw10

                                pfSense Gold subscription

                                1 Reply Last reply Reply Quote 1
                                • N
                                  NOCling
                                  last edited by NOCling Aug 27, 2024, 6:28 PM Aug 27, 2024, 6:17 PM

                                  This wasn't a big issue with UFS, but it has become a problem with the functionality of ZFS.
                                  With a RAM disk this is no longer a problem, so it should be included in the documentation.

                                  Keep an eye on the RAM disk values ​​when you trigger the pfBlocker reload, then you need space for all the tables.
                                  That's why I use 256/2048MB.

                                  Netgate 6100 & Netgate 2100

                                  S B 2 Replies Last reply Sep 4, 2024, 1:52 PM Reply Quote 3
                                  • S slu referenced this topic on Sep 2, 2024, 1:39 PM
                                  • S
                                    slu @NOCling
                                    last edited by Sep 4, 2024, 1:52 PM

                                    RAM disk works as expected, what a huge difference!

                                    login-to-view

                                    login-to-view

                                    pfSense Gold subscription

                                    S 1 Reply Last reply Jan 14, 2025, 2:56 PM Reply Quote 2
                                    • S slu referenced this topic on Oct 24, 2024, 9:33 AM
                                    • S
                                      slu @slu
                                      last edited by Jan 14, 2025, 2:56 PM

                                      Now more than four months later we had the same written data units like before in one week without the ram disk.

                                      Available Spare:                    100%
                                      Available Spare Threshold:          10%
                                      Percentage Used:                    68%
                                      Data Units Read:                    25,221 [12.9 GB]
                                      Data Units Written:                 93,370,737 [47.8 TB]
                                      Host Read Commands:                 4,428,272
                                      Host Write Commands:                4,340,924,956
                                      Controller Busy Time:               42,507
                                      Power Cycles:                       25
                                      Power On Hours:                     16,659
                                      

                                      pfSense Gold subscription

                                      1 Reply Last reply Reply Quote 1
                                      • M
                                        michmoor LAYER 8 Rebel Alliance @stephenw10
                                        last edited by Jan 14, 2025, 5:20 PM

                                        @stephenw10 curious but do most customers run RAMDISK as part of their standard deployment or is it used mainly for systems with weaker storage drives?

                                        Firewall: NetGate,Palo Alto-VM,Juniper SRX
                                        Routing: Juniper, Arista, Cisco
                                        Switching: Juniper, Arista, Cisco
                                        Wireless: Unifi, Aruba IAP
                                        JNCIP,CCNP Enterprise

                                        S 1 Reply Last reply Jan 14, 2025, 6:03 PM Reply Quote 0
                                        • S
                                          stephenw10 Netgate Administrator
                                          last edited by Jan 14, 2025, 5:58 PM

                                          No, RAM disks are pretty rare amongst the general customer base in my experience.

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