What size RAM disk?
-
What size RAM disk?
-
@jimbob-indiana ...that you should set? "It depends" on what is needed and how much RAM your router has.
https://docs.netgate.com/pfsense/en/latest/config/advanced-misc.html#config-ram-disks has a brief discussion. I believe other posts here have suggested at minimum using double the minimum. On a router with 4 GB and plenty of RAM we usually set 512 MB for /tmp and 1 GB for /var. Someone could easily have a setup with lots of logging or temp space needed and need more than that. Once I tried adding the very large UT1 block list because someone here was having trouble using it, and found it used more than 1 GB of space just downloading/extracting the list.
With recent pfSense versions the RAM disk doesn't actually use the RAM until files are written to it...it no longer pre-allocates the RAM. So you can make it a little bigger without "wasting" RAM.
-
I usually use double the default size to start with and that's almost always fine for a base install.
Many packages will require a lot more than that. Some packages cannot run from RAM disks like that.
Steve
-
I set it at 256 and then 512 for \var and I'm getting alerts that I need to address the ram disk size. I'm gonna try 512 and 1024.
If I keep getting that alert message and the sizes are way more than needed then its something else. I'm not all that certain ram disk make a difference. I have 8gb so its worth playing around.
-
It really depends what you're doing. Using RAM disks does significantly reduce drive writes though. And it makes filesystem damage far less likely if you're running UFS. So it makes sense on a 3100 running from eMMC without any large packages for example.
-
Getting this even though ram size is 512 and 1024.
“available free RAM (6.95 GiB)”
“RAM disk creation failed. Reverted to traditional storage. Check RAM disk sizes. @ 2023-05-04 18:59:36”
-
What version are you testing in?
-
@stephenw10 DEV 2.7
-
Yup, there was a bug introduced. The next snap will be fixed:
https://redmine.pfsense.org/issues/14351Steve