How do I find out what write continuously on my pfSense SSD
-
@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 SQLINSERT 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. -
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)? -
@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...
-
@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!
-
@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.htmlI learned (again) many thinks of pfSense / FreeBSD.
Thanks @bmeeks @Gertjan @stephenw10 -
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. -
-
RAM disk works as expected, what a huge difference!
-
-
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
-
@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?
-
No, RAM disks are pretty rare amongst the general customer base in my experience.
-
@michmoor said in How do I find out what write continuously on my pfSense SSD:
weaker storage drives?
Define a weaker storage drive?
I my case it is a server SSD with 128 GB, but 47 TB in 1 1/2 year is to much for a router... -
Generally, eMMC or CF/SD cards vs SSDs.
-
-
@NOCling said in How do I find out what write continuously on my pfSense SSD:
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.Is there a way to monitor it easily? And are your values failsafe? I just noticed I had a much to low value for /tmp...
-
The size and usage are shown on the dashboard in the Disks widget.