- Ramdisk size
- Posted by Vilmos Soti on November 28th, 2003
Hello,
This is in the kernel config help:
What should I know if I want to change this 4096 to something else?
How big can a ramdisk be? I looked at the source, and it said that
the ramdisk now uses space from the buffer cache, so it could be
fairly big. I am right?
Also, is there a way that one specific device (let it be ramdisk,
actual hard disk, floppy, or nfs) doesn't get cached?
Thanks, Vilmos
- Posted by Roger Leigh on December 1st, 2003
Vilmos Soti <vilmos@vilmos.org> writes:
[ramdisk size]
I wouldn't want it bigger than that, myself. If you want a bigger
ramdisk, try ramfs, which allows filesystems to be nearly as big as
your physical memory. Even better, try tmpfs which uses virtual
memory, so the disk size is limited only by memory and swap space. I
use tmpfs on /tmp, and it's quite nice.
O_DIRECT?
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
- Posted by LEE Sau Dan on December 4th, 2003
Roger> I wouldn't want it bigger than that, myself. If you want a
Roger> bigger ramdisk, try ramfs, which allows filesystems to be
Roger> nearly as big as your physical memory. Even better, try
Roger> tmpfs which uses virtual memory, so the disk size is
Roger> limited only by memory and swap space.
Or limited by a mount option, which can be changed at any time with a
remount.
Roger> I use tmpfs on /tmp, and it's quite nice.
I can't agree more. I've already mkswap'ed the old /tmp partition(s)
and switched to using tmpfs for 2.5 years. Now, I can have big swap
space and big /tmp space on the same system (letting them compete for
the real space, of course; but when any one of them need to be bigger
momentarily, tmpfs handles it ideally). The /tmp directory is
automatically cleared upon boot. Except that files in tmpfs can't be
mounted loopback, I can't see any loss. It's cool to:
cd /tmp
tar jxvf linux-2.4.23.tar.bz2
cd linux-2.4.23
make xconfig
make dep
make bzImage modules
All the compilation is done in RAM (when you've got enough RAM not to
touch the swap space). No disk access (except for the initial loading
of compilers and similar tools into the buffer-cache). Of course, you
loss everything in case of a power interruption! 
--
Lee Sau Dan +Z05biGVm-(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
- Posted by Vilmos Soti on December 4th, 2003
LEE Sau Dan <danlee@informatik.uni-freiburg.de> writes:
Thanks for both of your input. I will play with ramfs and tmpfs.
Vilmos