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

Re: tmp & swap ?




On Wed, 31 Dec 1997, Shachar Tal wrote:

> /bin/echo "y" | /sbin/mkfs.ext2 /.tmp_file
> /bin/mount -t ext2 -o loop,nosuid /.tmp_file /tmp
> /bin/chmod 1777 /tmp
> 
> I use this on my system to add swap space.

how does this scheme get you additional swap space? or rather, where does
this give you any advantage? it looks like it simply replaces the tmp
directory by a file system placed in a single file - it'll get cached in
the same manner that as real file system gets cached.

in any case, according to the linux disk howto, there are *talks* about
implementing such a file system (which already appears under bsd, namely
tmpfs, and other OSes), but no mention of any existing system was found.

now, for my stupid idea - what about creating a ram disk, and them
mounting /tmp on a directory on that ram disk? won't that give you an
effect similar to tmpfs's effect?

yet again - why would this give you any advantage at all? files are cached
in memory anyway, and if memory is exhausted - the cache is flashed to
disk (in your tmpfs case, it'd be flashed to swap space - is swap usage
significantly faster then usage of a normal file system?) - so i don't see
the big advantage of this.

guy