Re: Default size limits for /run (/var/run) and /run/lock (/var/lock)
On Wednesday 13 April 2011, Ben Hutchings wrote:
> On Wed, 2011-04-13 at 13:34 +0200, Bernhard R. Link wrote:
> > * Philip Hands <email@example.com> [110413 12:54]:
> > > This strikes me as suboptimal, since one could use the disk space
> > > allocated to /tmp as extra swap and then allocate a tmpfs of that size
> > > to be mounted on /tmp with no effect other than allowing the system to
> > > have access to more swap than it would have otherwise had (of course,
> > > that's probably more than it needs, so instead you could just save some
> > > disk space that would otherwise be left generally unused by overloading
> > > the swap usage with /tmp usage.
> > >
> > > Therefore, in the multi-partition setup, I think we should also default
> > > to having /tmp on tmpfs.
> > This has both the disadvantage of a system then having swap (given the
> > big memory sizes one currently has and the big difference between RAM
> > and disk access times, having swap is often quite a disadvantage)
> Under Linux, swap space is a requirement to defragment RAM. (This may
> change in the future.) Without swap space, the kernel eventually
> becomes unable to make large physically-contiguous allocations. Don't
> turn it off.
I am surprised at this. I have several boxes which are small single board
computers with solid state disks (MIDE or CF), so as I did not need swap
space (the running set is fixed and the memory requirement was within
the total available memory, I did not define any swap space. A few days
ago I needed to move one of the boxes I noted its uptime at 594 days just
before I switched it off. I grant you that it has 256MB of memory, and
120MB is currently free, but I have not noticed any problems growing over
the time it was up. Maybe it just did not need to make any large physically
BTW, /var/run is currently occupying a grand total of 27KB if that is relevant
to the subject of this thread.