How do I find out what write continuously on my pfSense SSD
-
@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.
-
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.
-
@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. -
@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 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!
-