Help stopping pfSense writing to SSD



  • 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.



  • 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.



  • 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.


  • LAYER 8 Global Moderator

    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..




  • 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!


  • LAYER 8 Global Moderator

    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..



  • @johnpoz:


    Mine shows at 75.1 and not running squid..

    70.2 (and not squid).

    And the winner was : apinger …..  ;D


  • LAYER 8 Global Moderator

    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..



  • 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!)


Log in to reply