"Tony Sceats" <[EMAIL PROTECTED]> writes: > Ah, now this all depends. If /var/run was a normal disk filesystem > under Ubuntu you would be correct. It isn't, though: > > ] mount | grep /var/run > varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755) > > Note 'type tmpfs' there? tmpfs is a swap backed ramdisk, essentially, > and like /var/lock is put there by Ubuntu to ensure that these > directories are cleaned at reboot without having to fuss about deleting > files or read-only filesystems. > > hey, that's pretty cool, can't say I'm familiar with tmpfs - does it > pre-allocate the space or grow to the specified size as it needs to?
Like ramfs it grows on demand, with a cap, rather than preallocating space. ramdisk is a reasonably inaccurate description of it, really, because this is a purpose built ram backed filesystem rather than emulating a block device. > I ask because clearly 2Gb is an enormous amount of RAM/SWAP to spend > on /var/run just so you don't have to clean it at boot time (which can > be done trivially) Heh, yes: it would be. >> imho, 2Gb is either way too big or too small depending on what the computer >> does.. try 'du -hs /var/run/*' to see what else is happening there - for me >> it's usually less than 1Mb, but sometimes spools (eg, mail spools) will be >> put there which will increase it a lot, > > The mail spool lives under /var, but not under /var/run. The FHS, in > fact, carefully defines the purpose of /var/run -- and that does not > include being scratch space for large processes. > > FHS aside (because I know you're right about it), I know I've seen > spools there, there used to pretty much always be a /var/run/spool > directory, and I know this has caused me problems, many moons ago now > though, that's for sure, probably on RH6 or Debian Potato Well, people do all sorts of crazy stuff, I guess. I am not familiar with any Unix that stuck spools under /var/run, but someone must have: every /other/ sort of perversion has been tried by some Unix vendor or others at some time. > Y'all should file a bug report indicating that Mondo should use /tmp or > /var/tmp to build big scratch files. > > Indeed, this would be very annoying, space aside - I'm not actually > familiar with this app, but given the in-built inpermanence of > /var/run, this seems like a very quick way to lose hours of hard work! Mmmm. Using a tmpfs there is reasonably new, and not yet popular, so on most distributions /var/run is backed on the same media as the rest of /var, for better or worse. Regards, Daniel -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html