Average writes to Disk
-
Hi,
as I had, a wile a go, a sudden death of a SSD i took a look into my pfsense and I was astonished to see that my pfsense is writing about 20GB (TWENTY) per Day to Disk. A Lab Installation with almost no auxiliary packages comes to aprox. 14-18GB/Day.
Could you take a look at your machines and write down how much writes you have?
Just for curiosity!Thank you all,
fireodo
(My config is visible in my signature) -
@fireodo said in Average writes to Disk:
(My config is visible in my signature)
These :
Iftop,
Iperf,
pfBlockerNG-devel,
Snortoperate on every packet that comes in, to make logs, stats, etc.
You were asking for details, and you are served details. These packages are created for that very reason.
Details have to be stored somewhere.Easy to test - proof the contrary : remove the WAN cable and check that writing comes to a "stand still".
RRD_Summary : I'm not sure.
-
It would be useful if the install allowed the user to set an amount of space to be left unpartitioned. Some modern SSDs can use un-partitioned space to map out failed blocks. Some SSDs have this space already hidden. This option would help prevent a sudden failure from one of the 2 probable causes, wear. SMART would have time to warn and be noticed. A controller failure remains sudden and unpredictable.
-
Are either of those old installs that have been upgraded?
There was a bug at one time that was not mounting root as noatime. That increased drive writes in normal use. Check how it's mounted with
mount -p
Steve
-
@stephenw10 said in Average writes to Disk:
Are either of those old installs that have been upgraded?
One is fesh install with 2.5.1 and upgradet to 2.5.2 and the Lab machine is a fresh install with 2.5.2.
mount -p zroot/ROOT/default / zfs rw,noatime,nfsv4acls 0 0 devfs /dev devfs rw 0 0 zroot/tmp /tmp zfs rw,nosuid,noatime,nfsv4acls 0 0 zroot/var /var zfs rw,noatime,nfsv4acls 0 0 zroot /zroot zfs rw,noatime,nfsv4acls 0 0 /dev/md0 /var/run ufs rw 2 2 devfs /var/dhcpd/dev devfs rw 0 0 /usr/local/bin /var/unbound/usr/local/bin nullfs ro,noatime,nfsv4acls 0 0 /usr/local/lib /var/unbound/usr/local/lib nullfs ro,noatime,nfsv4acls 0 0 /lib /var/unbound/lib nullfs ro,noatime,nfsv4acls 0 0 devfs /var/unbound/dev devfs rw 0 0 /var/log/pfblockerng /var/unbound/var/log/pfblockerng nullfs rw,noatime,nfsv4acls 0 0 /usr/local/share/GeoIP /var/unbound/usr/local/share/GeoIP nullfs ro,noatime,nfsv4acls 0 0
-
What are you using to check the drive writes? What's the actual data it's giving you?
-
@stephenw10 said in Average writes to Disk:
What are you using to check the drive writes? What's the actual data it's giving you?
On the one hand the smart value of LBA_written and on the other hand iostat -d 5 6.
-
And what values are you actually seeing there?
-
@stephenw10 said in Average writes to Disk:
And what values are you actually seeing there?
iostat -d 5 6 md0 ada0 pass0 KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s 0.00 0 0.00 15.55 14 0.21 0.38 0 0.00 0.00 0 0.00 12.80 22 0.27 0.00 0 0.00 0.00 0 0.00 14.67 15 0.21 0.00 0 0.00 0.00 0 0.00 12.59 14 0.17 0.00 0 0.00 0.00 0 0.00 14.67 14 0.20 0.00 0 0.00 0.00 0 0.00 13.56 14 0.19 0.00 0 0.00
Using mathematics it comes to about 20GB/day
PS. On the LAB machine (the fresh 2.5.2 install) there are no other packages running. Basic pfsense.
-
@stephenw10 said in Average writes to Disk:
There was a bug at one time that was not mounting root as noatime
I looked, as we have some older routers, and found a few.
/dev/gptid/4eca01a4-9c0d-11e7-bbd9-0008a20cdf70 / ufs rw 1 1
devfs /dev devfs rw 0 0
/dev/md0 /var/run ufs rw 2 2
devfs /var/dhcpd/dev devfs rw 0 0Just change rw to rw,noatime in /etc/fstab, and reboot?
-
@steveits said in Average writes to Disk:
Just change rw to rw,noatime in /etc/fstab, and reboot?
In /etc/fstab there is only that:
"# Device Mountpoint FStype Options Dump Pass#
/dev/ada0p2 none swap sw 0 0"And if you look in the beginning of the thread there is the output of mount -p - most every FS is mounted noatime.
-
Yup, exactly, just edit the fstab if you have some that were created at that time.
ZFS does write to the drive more than UFS by design. I'm not sure what might be done there.
Enabling RAM disks reduces it significantly but you wouldn't want to do that with Snort and pfBlocker running.
Steve
-
@fireodo said in Average writes to Disk:
In /etc/fstab there is only that:
Because you're running ZFS which doesn't use the fstab.
-
@stephenw10 said in Average writes to Disk:
Enabling RAM disks reduces it significantly but you wouldn't want to do that with Snort and pfBlocker running.
That was my idea too but as you say - no way with snort&pfblockerNG ...
-
@stephenw10 said in Average writes to Disk:
ZFS does write to the drive more than UFS by design.
Do you think that could be from ZFS? Because I have stopped most every service that can be stopped but the writings go on ...
On the other hand - is my installation so particular?
-
@fireodo what ssd are you using? Modern SSD even with 20GB a day you should still be like a 10 year lifespan..
I just looked up a shit $20 128GB ssd from lexar the ns100, and it lists 60TB write life.. at 20GB a day your still looking at 8 some years..
Off the cuff 20GB a day does seem like a lot... But even at that you should get decent life out of the SSD..
-
@johnpoz said in Average writes to Disk:
what ssd are you using?
See my signature :-)
I already ordered some spare for ... just in case ;-)
-
@fireodo I don't see anything listed for 16GB size.. But the 64 is listed as
36.5TBW (64GB)
So you have to assume lower than that.. So yeah, prob not the best drives for lots of writes..
Lets call it half that.. Your looking at like 2.5 years only..
-
@johnpoz said in Average writes to Disk:
@fireodo I don't see anything listed for 16GB size.. But the 64 is listed as
36.5TBW (64GB)
So you have to assume lower than that.. So yeah, prob not the best drives for lots of writes..
Lets call it half that.. Your looking at like 2.5 years only..
Of course this all sounds reasonable but for me its strange that a older APU (that I have as quick replacement in case of hardware failure - i do much HomeOffice) with 2.4.5 shows insignificant writes to disk (also ZFS) far far away from 20GB/day.
-
Extra space will get longer life, more room for TRIM to work with and at todays prices it is worth the investment IMHO.