[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: mv to /tmp = baby's birthday jpg's lost.

On Wed, May 08, 2002 at 09:49:13PM +1000, CaT wrote:
> Is it faster then the cache used for ext2 and ext3? Cos I seriously
> doubt it... at least not so much faster that you'd bother with it for
> the sole purpose of speed. And I think it can be swapped out so if you
> leave something there long term, you're still hitting disk.
> The only reason I'd bother with it as a replacement for /tmp is if I had
> tons of ram+swap and didn't use it all. Then it'd save me oh...
> 128M-256M of disk space. ;)

It's faster because it doesn't need to do any kind of updates to disk.
With ext2, every five seconds any dirty metadata will get flushed to
disk, and every 30 seconds any dirty disk blocks will get flushed to
disk, and this consumes disk bandwidth.  So if the temp file exists
for less than five seconds, then yes, it might not hit disk at all.
However, for stuff that persists for a longer period of time, /tmpfs
will definitely be a better choice.

If you have a stand-alone /tmp partition, you should definitely
consider switching it to be a swap partition, and then using tmpfs.
For most workloads, it will be just as good, if not better.

> > Of course, even less un-deletable...
> Indeed. :)

Well, yes.  But if you're using a distribution which deletes /tmp by
default, it really isn't much different.  

I've always used /var/tmp for stuff that I want to survive a reboot
and /tmp for stuff where I want it do disappear on reboot.

					- Ted

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]