[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tmp & swap ?
Actually it should be slower than the usual cache-in-a-file setup (see
swap-HOWTO). The loop device is smart enough to avoid double buffering.
I don't know how he obtains swap space like this. There are only 2 places
outside RAM where one can swap to: a network or a disk partition. The
network swap is something for masochists on 10MB ethernet.
On Thu, 1 Jan 1998, guy keren wrote:
>
> 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
>
>
>