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

    Help stopping pfSense writing to SSD

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    9 Posts 4 Posters 3.8k 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.
    • P
      pfsense_me
      last edited by

      Hi,
      I'm switching from an old HDD to SSD.
      In the options, I've activated the /var and /tmp to ramdisk. I also have no swap.
      Problem is I can see the SSD being accessed very often.
      "iostat -x" tells me the write is around 25K/s, all the time.
      Any idea what can cause this?
      I'm using squid3, squidquad, lightsquid and snort. Squid is configured to store on disk only files bigger than 10M, the smaller are kept in RAM.
      Thanks,
      PS: Before seing the ramdisk options, I tried disabling all the logs options I can find in the menus, but it still kept writing to disk.

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

        Mostly due to Squid3, also if you install ClamAV, both of these were HDD/SDD writing extensively. My suggesion is if its home use, then stop using Squid3, useless.

        Release: pfSense 2.4.3(amd64)
        M/B: Supermicro A1SRi-2558F
        HDD: Intel X25-M 160G
        RAM: 2x8Gb Kingston ECC ValueRAM
        AP: Netgear R7000 (XWRT), Unifi AC Pro

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

          Thanks for your reply pfcode.
          Squid is great for filtering access to websites, and caching is quite interresiting too  :)
          Today, after a few hours of run, writing came down to 13KB/s.
          I tried disabling squid, same write rate. After restarting (and stop squid process), write rate is higher, it will slow down progressively, very slowly. After 15mn, still 42KB/s. This write does not seem to be related to squid.
          Any other idea?
          Is there a way to increase disk cache or delay for writing to disk (5mn for example)? This way it may reduce write access if it is always the same file being rewriten.

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            Curious… With modern SSD endurance testing showing writes in the PB range before failure... Why is there concern of really low level IO?

            So lets do some math.. If you are writing 25KBytes per second..

            x60 = minute
            x60 = hour
            x24 = day
            x365 = year

            So I work that out to 788GB a Year... When drives have been shown they can write 100 of TB before they signs of failure..  And make it to PB before actual failure..  The warranty on the drive is say 75 TBW

            Look up ssd endurance testing..

            So your not even writing a TB a year in the background..  So if I look at the warranty of the disk
            http://www.samsung.com/global/business/semiconductor/minisite/SSD/global/html/support/warranty.html

            That its 5 years or 75TBW for a 850 evo 120GB disk.. how is that an issue to be concerned with to be be honest?

            What am I missing here?  So my datastore in my esxi is SSD.. And I currently show it with 153KBps avg write rate..  So if I do the math on that average its 4.7TB a year.. Well at that rate with 75TBW, I'm looking at over 15 years... The warranty is only 5.. So where is the issue?  Even if I take the PEAK lets call it 400 Im under 13TB a year..  So still way under the warranty numbers on that disk..

            writerate.png
            writerate.png_thumb

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

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

              Hi
              You're right, that's not much compared to what SSD can endure. I'm using a 32GB mSATA SLC (should be virtually indestructible).
              I just can't understand why it is writing to the disk, event when there is no traffic passing through the firewall!

              1 Reply Last reply Reply Quote 0
              • johnpozJ
                johnpoz LAYER 8 Global Moderator
                last edited by

                well why don't you figure out what process is writing.. I would assume your apinger is pinging your gateways every second, and writing that to rrd graphs for quaility.. You got all your other rrd graphs going on..

                Can you just hit m in top and see what PID is writing to disk?

                Mine shows at 75.1 and not running squid..

                An intelligent man is sometimes forced to be drunk to spend time with his fools
                If you get confused: Listen to the Music Play
                Please don't Chat/PM me for help, unless mod related
                SG-4860 24.11 | Lab VMs 2.8, 24.11

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

                  @johnpoz:

                  …
                  Mine shows at 75.1 and not running squid..

                  70.2 (and not squid).

                  And the winner was : apinger …..  ;D

                  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
                  • johnpozJ
                    johnpoz LAYER 8 Global Moderator
                    last edited by

                    Still comes down to why does it matter if its 25, 75, 105, 400?  Pretty sure these low levels of IO is of little care to modern SSD..

                    An intelligent man is sometimes forced to be drunk to spend time with his fools
                    If you get confused: Listen to the Music Play
                    Please don't Chat/PM me for help, unless mod related
                    SG-4860 24.11 | Lab VMs 2.8, 24.11

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

                      I didn't know about the "m" in top, thanks!
                      Same for me, seems like it's apinger. Strenge as aping.conf tells it should store things  in file "/var/run/apinger.status" (in RAM for me!)

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