New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
About /var/run, /run and tmpfs
In Ubuntu 12.04 it seems that /var/run points to /run and is mounted as tmpfs, i.e. It does not persist across restarts. However, in CentOS 6.5 /var/run just resides on the regular filesystem and is not wiped upon reboot. My question: is there an advantage mounting /var/run as tmpfs? And how does the system determine its maximum size? What if it becomes full?
Comments
The main benefit I can think of for the Ubuntu way is that /var/run is meant for transient files such as PID and lock files, and should be cleared out upon boot. This happens for free with the Ubuntu way, being in memory, while CentOS either clears files manually, expects processes to remove their own files, or just doesn't worry about it. I'm not at a computer to check, but it's no biggie anyway.
^ What they said. Additionally, on Debian at least, the default size is determined by the values specified in /etc/default/tmpfs. On my Debian install it uses 10% of real memory by default. Ubuntu may be different.
If it becomes full, nothing else will be able to be written to it until you free up space. Unless you've purposefully made a decision to store a lot of data in a directory under /var/ the chances of it filling up are low.