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

Re: Moving /tmp to tmpfs makes it useless



2012/5/27 Adam Borowski wrote:

> I think that box had jfs, but other filesystems are no different: for
> example, ext* will fsync() during a rename() call behind your back even
> if you don't request it, forcing every file to hit the disk

This is easy to check:
  $ cd /path/to/tmpfs
  $ touch 1
  $ time for i in `seq 10000`; do mv $i $((i+1)); done
  real    0m9.760s
  user    0m2.727s
  sys     0m6.773s
  $ cd /path/to/ext3
  $ touch 1
  $ time for i in `seq 10000`; do mv $i $((i+1)); done
  real    0m9.624s
  user    0m2.679s
  sys     0m6.877s
I don't see major difference. Both tests gave 9.5-9.8s range between runs.
Maybe your filesystem is to blame?

> So don't tell me real filesystems are "almost as good" as tmpfs

Tests tell you that. :)

Actually real filesystem is not just "as good", it's better, because it
does not eat memory and slow down other running programs when
writing to disk.

-- 
  Serge


Reply to: