Mount and Unmount
Derek Broughton
news at pointerstop.ca
Fri Aug 31 23:32:42 UTC 2007
John L Fjellstad wrote:
> "D. Lam" <lam.dna at gmail.com> writes:
>
>> Perhaps he wants a ramdisk?
>> If so, add this to /etc/fstab:
>> /dev/ram /media/ramdisk tmpfs,user rw 0 0
>
> Isn't it pretty silly to put swap on you ramdisk? Swap is used when you
> run out of memory. You are using memory to do the swap. So basically,
> the OS will swap things out of memory and into swap which is already
> memory. Wouldn't you be better off not using the swap-in-memory, and
> then the OS wouldn't swap in the first place since the memory would
> still be available?
>
You have it backwards. tmpfs puts a temporary filesystem (ramdisk) on your
_swap_, not vice versa.
By default /var/lock, /var/run, /dev/shm and udev are all in tmpfs already.
I used to keep all of /tmp there when I used Debian (making the swap
partition much larger than necessary for actual swapping), but it seems
inconsistent with Ubuntu's defaults and I never worked out what I'd need to
do that now.
--
derek
More information about the ubuntu-users
mailing list