2011/5/17 Olivier Crête <[email protected]>:
> On Wed, 2011-05-18 at 01:18 +0530, Nirbheek Chauhan wrote:
>> Maybe you should use /var/tmp for that? Or ~/tmp/ ?
>>
>> OTOH, we could use an rc.conf configuration variable to control
>> whether /tmp is mounted as tmpfs.
>
> Having /tmp and /var/tmp as tmpfs sounds like a terrible idea.. I don't
> think we should facilitate it in any way.

I've run my system this way for ages - even back when I had 2GB of RAM
running kde, samba, mythtv, mysql, and apache.  Usually not a problem.
 Unfortunately the kernel swapping logic isn't perfect, which can
cause it to bog down if you're compiling something like chromium or
openoffice.

When you think about it tmpfs on swap should be no slower than ext3.
If anything it should be faster since it doesn't need to journal.  In
practice it doesn't always work this way, but I'd consider this a bug.
 With a filesystem, anything you write ends up on disk within 30
seconds or whatever.  With a tmpfs, some of the stuff you write ends
up on disk, and the kernel has more freedom with how it goes about
doing this.

Then problem comes when the kernel decides to swap out mysql or
whatever in order to hang onto some pages full of .so files or
whatever from your latest build.

Rich

Reply via email to