Hey guys. So I recently bought a router from Aliexpress and I installed OPNsense on it. I was watching a few tutorial videos on OPNsense and Pfsense since I am new to these types of routers.
I remember watching one tutorial and the guy said it is recommended to put /var and /tmp as a RAM disk so it won't wear out my SSD, and it can also help with security. I see that I can do this in System > Settings > miscellaneous.
I tried Googling it, but I cannot find anything recent about this.
I have 8GB of RAM on my router, and idle I am at around 5% memory usage. So I have more than enough RAM to do so. But would there be any benefit? Would there be any risks?
You lose certain historic data when the system reboots but nothing critical. The senses both re-create all the important stuff afresh on startup. It's how I've had my systems running for years. So that advantages are less I/O on the drive, faster I/O because it's effectively a RAM drive; disadvantages are loss of that historic non critical data, which I for one am not that interested in. I cannot think of anything else, someone else might do though. :)
I believe it's mainly for historical reasons, as most of the older Alix/APU firewall appliances and the like were sold with compact flash cards instead of 'real' harddrives. Running these mount points as a ramdrive reduces writes to the media and prolongs its lifespan.