Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] rfc: use of the /run directory
Date: Tue, 17 May 2011 20:25:34
Message-Id: BANLkTimSGwcmRJdViC4AWZNy11VWWxYSew@mail.gmail.com
In Reply to: Re: [gentoo-dev] rfc: use of the /run directory by "Olivier CrĂȘte"
1 2011/5/17 Olivier CrĂȘte <tester@g.o>:
2 > On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
3 >> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
4 >>
5 >> OTOH, we could use an rc.conf configuration variable to control
6 >> whether /tmp is mounted as tmpfs.
7 >
8 > Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
9 > think we should facilitate it in any way.
10
11 I've run my system this way for ages - even back when I had 2GB of RAM
12 running kde, samba, mythtv, mysql, and apache. Usually not a problem.
13 Unfortunately the kernel swapping logic isn't perfect, which can
14 cause it to bog down if you're compiling something like chromium or
15 openoffice.
16
17 When you think about it tmpfs on swap should be no slower than ext3.
18 If anything it should be faster since it doesn't need to journal. In
19 practice it doesn't always work this way, but I'd consider this a bug.
20 With a filesystem, anything you write ends up on disk within 30
21 seconds or whatever. With a tmpfs, some of the stuff you write ends
22 up on disk, and the kernel has more freedom with how it goes about
23 doing this.
24
25 Then problem comes when the kernel decides to swap out mysql or
26 whatever in order to hang onto some pages full of .so files or
27 whatever from your latest build.
28
29 Rich