On Thu, Apr 11, 2013 at 01:51:16PM +0200, Nicolas Mailhot wrote:
> 
> Le Mer 10 avril 2013 22:52, Richard W.M. Jones a écrit :
> > On Wed, Apr 10, 2013 at 06:55:59PM +0200, Ralf Corsepius wrote:
> >> Disable /tmp on tmpfs?
> >
> > I have suggested this should be done automatically in RAM-limited
> > situations (primarily for VMs):
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=858265
> >
> > Well, ideally it would never have been done in the first place, but we
> > are where we are.
> 
> Ideally it should never have been done without some automated way to grow
> swap via files in /var/tmp when the tmpfs gets saturated (and possibly
> shrink it back when the pressure ceases). That's the only way to get the
> benefits of a ramdisk without hitting mem limits at unexpected moments.

This would be quite complex.

/tmp on disk already has the property that it uses memory (ie. the
buffer cache) when available and transparently spills to disk when it
is not.

tmpfs gets away with ignoring fsync, so in some synthentic benchmarks
it appears faster.  You could imagine an ext4 attribute that could be
added to /tmp to make it too ignore sync/fsync/journal.

In fact ext4 already has the *opposite* attribute -- to force updates
to a particular file or directory to be synchronous.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Reply via email to