Re: Moving /tmp to tmpfs makes it useless
On Fri, 25 May 2012, Serge <email@example.com> wrote:
> Q: /tmp on tmpfs increases apps performance.
> A: What apps? Real apps don't write files during performance-critical
> operations. Even if they do, they write large files. And large files are
> written faster when they're written on real disk, rather then swapped
> out and slow down the entire system (see the "Who uses /tmp" part).
> The apps that can really benefit from tmpfs are too rare. And we're
> talking about default settings and most common cases.
Any application which writes synchronously (through fsync(), fdatasync(), or
opening with O_SYNC) will get a massive performance benefit from using tmpfs.
Of course it's pretty rare to use such an application without wanting the data
to go to disk. The only time this has really made a difference for me was
preparing a MySQL database for distribution (I just needed to load a dump file
and then create a .tgz of the database files) - and in that case the default
tmpfs wasn't big enough.
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/