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

Re: Mounting /tmp on ram disk



On Thu, 2 Aug 2001, Iftach Hyams wrote:

> I am trying to squeeze better performance using the /tmp directory.
>
> The second option (as seen on SunOS) - mount the /tmp on a virtual files
> system
> resident in the swap. It actually a ram disk that can extend to the swap
> partition
> when needed.
>
> Do you know which one is best ?
> How can I (simply) do the second option in RedHat 7.1. Should I patch the
> kernel ?

No need to patch the kernel. Just do the following:

dd if=/dev/zero of=/dev/ram0 bs=1024 count=(number of K's of /tmp to use)
mke2fs /dev/ram0
mount /dev/ram0 /tmp

Note that you cannot easily free the memory assigned to the ramdisk.

  Alon

-- 
This message was sent by Alon Altman (Psycho99@bigfoot.com) ICQ:1366540
The RIGHT way to contact me is by e-mail. I am otherwise nonexistent :)
--------------------------------------------------------------------------
My idea of roughing it turning the air conditioner too low.


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il