Gentoo Archives: gentoo-user

From: Michael Mol <mikemol@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] How can I control size of /run (tmpfs)?
Date: Sat, 26 May 2012 22:47:21
Message-Id: CA+czFiCjSh8DwpjrQRJjEusSgYUgcrEeWBFeT=kRv99-24AiUA@mail.gmail.com
In Reply to: Re: [gentoo-user] How can I control size of /run (tmpfs)? by Dale
1 On Sat, May 26, 2012 at 10:17 PM, Dale <rdalek1967@×××××.com> wrote:
2 > Neil Bothwick wrote:
3 >> On Sat, 26 May 2012 22:08:48 +0200, Jarry wrote:
4 >>
5 >>> I suppose default size for tmpfs is half of physical memory,
6 >>> if it is not configured somewhere else.
7 >>
8 >> It is, but that is the default maximum size, a tmpfs filesystem uses
9 >> only as much memory as its contents require.
10 >>
11 >>> BTW, is there any way to turn this great feature off?
12 >>> What is it good for? I do not see any advantage in having
13 >>> /run on tmpfs...
14 >>
15 >> It makes sure that /run is available and writeable early in the boot
16 >> process, whereas /var/run may not be and / may be mounted ro.
17 >>
18 >>
19 >
20 >
21 > Mine wouldn't be since I have /var on a separate partition.  I guess the
22 > devs are getting ready for the ultimate screwup udev and friends is
23 > putting in place.  Oh well.  This is life.
24
25 TBH, there are other occasions for / to be read-only. LiveCDs, for
26 example, where your entire filesystem is (at least initially) R/O. A
27 read-only network filesystem (or disk image) mount in thin clients.
28 That kind of thing.
29
30 >
31 > I just hope it never goes bonkers and tries to use half my ram.  lol  If
32 > it did that while compiling LOo, that could be interesting.  :/
33
34 tmpfs specifically allows pages in it to be swapped out to disk, so if
35 you have a large amount of swap, you shouldn't have a problem.
36
37 FWIW, I try to avoid swap on my servers, but I try to keep my desktop
38 and dual-role boxes with at least 1xRAM in SWAP, just in case I
39 someday decide to experiment with suspend-to-disk. I rarely (if ever)
40 touch it, but it's there if I need it.
41
42 --
43 :wq