Talkback for article: 210, July2001

Wacky uses for Raid, /dev/ram, and ramfs

Back to: http://cgi.linuxfocus.org/English/July2001/article210.shtml

From: Grant Johnson <grant(at)amadensor.com> [ date: 2001-06-25 ]
With sufficient memory, and Linux's aggressive file cacheing, the only advantage to this HD/RAM Disk raid is specifying which files get cached. You might be better off just throwing in the memory, and letting the file cacheing take care of it.

Another fun idea: I don't remember the kernel option, but with some options, it is possible to export raw partitions much like you would NFS, then mount them via another machine as ext2, rather than NFS. This could be fun in a RAID set up. Imagine 2 machines in 2 countries with a REALLY BIG piece of fiber between them, being a RAID 0. One country gets a natural disaster, adn the users don't even notice that one server, and the entire building it was in no longer exist.
From: Rob [ date: 2001-06-25 ]
There was a slram patch which let you use RAM disk on machines where only first 16MB was cached, which meant adding memory slowed things down.

I'd like an article with something on the tmpfs idea where the /tmp is backed on VM, so stale contents can be swapped out, that's in 2.4 I think.

ext2 benchmarks from a while back, showed small file creation and removal, was quicker than using memfs of BSD or tmpfs of Solaris.

The RAMfs is interesting however for CD-ROM based distro's, you could boot a firewall router off CD-ROM and initialise RAM disks for volatile areas of system.

Rob
From: yogesh Sharma <yog_sliet(at)yahoo.com> [ date: 2001-07-24 ]
With sufficient memory, and Linux's aggressive file cacheing, the only advantage to this HD/RAM Disk raid is specifying which files get cached. You might be better off just throwing in the memory, and letting the file cacheing take care of it.

Another fun idea: I don't remember the kernel option, but with some options, it is possible to export raw partitions much like you would NFS, then mount them via another machine as ext2, rather than NFS. This could be fun in a RAID set up. Imagine 2 machines in 2 countries with a REALLY BIG piece of fiber between them, being a RAID 0. One country gets a natural disaster, adn the users don't even notice that one server, and the entire building it was in no longer exist.
--------------------------------------------------------------------------------

From: Romualdas Maciulis <romualdui(at)takas.lt> [ date: 2001-08-14 ]
OK, Fun is GOOD. Image this a raid with 2 or 3 ramfs partitions set for performace.
With a very large amount of RAM this would be a killer. :)
From: Ira S. Nix <ira(at)isnix.com> [ date: 2001-09-09 ]
I have an IBM x350 series server with 16GB of ram, RedHat Linux 7.1, kernel 2.4.9. I have run into 2 problems when trying to create a large ramdisk.

#1 after issuing the following commands -- insmod rd rd_size=8000000, mke2fs /dev/ram1 -- when I try to mount /dev/ram1 to /ramdisk I get the following error ** mount: wrong fs type, bad option, bad superblock on /dev/ram1, or too many mounted filesystems **

#2 after issuing the following commands -- mount -t ramfs none /ramdisk -o maxsize=8000000 -- or -- mount -t ramfs none /ramdisk -o maxfilesize=4000000,maxsize=8000000 -- or --mount -t ramfs none -o maxsize=8000000 -o maxfilesize=4000000 -- everything is OK until I try to copy a 3.8GB file to /ramdisk, I get the following error ** File size limit exceeded (core dumped) ** after copying approx 2GB

Any help with this would be greatly appreciated :-(
From: david thornton <david(at)quadratic.net> [ date: 2002-08-04 ]
Hey all... I have played around with making a large ramdisk.

http://www.quadratic.net/reference/ramdisk500.html
From: floris lambrechts <floris-(at)-linuxfocus-(dot)-org> [ date: 2002-11-23 ]
Hi, Mark & readers.
I think that indeed, the kernel's file caching will speed up your reading operations allmost as good as a ramdisk will. It would be interesting to benchmark this.
With write operations, it's a little different: if the kernel writes to a file that is being cached, I'm not sure what happens. Either it gets written physically, OR it gets written to the cached version and gets updated physically at a later time.
It gets really intersting when you consider a journalled filesystem. If you have a *real* journalled FS (i.e. journals not only metadata, but also the data itself), then the kernel will do the write operations first in the journal, and at certain intervals the filesystem driver will update the filesystem based on what is in the journal. But of course the journal has to be kept on disk too, not only in memory - otherwise it could get lost at a crash... Intersting stuff to investigate huh :-)

VFS is the virtual file system - the layer that sits above the FS drivers and the memory. VFS is the thing that handles swapping and the like - people who can know it expect that Linus' 2.6 (or 3.0) will have a *real* good VFS layer. What this VFS does in regard to the ramdisk I don't know.

As a last remark, I'm afraid that your RAID plans are not possible. You want to read from the fastest disk of the RAID set, but I'm not sure that this is possible. Because everybody allways tells me that for RAID you need identical harddisks, and not only identical partitions. But maybe this only depends on the RAID *level* - so maybe what you propose is possible in RAID mirroring - I'm pretty sure it's impossible if you do disk striping tho'.

tnx for the fun article


From: Denis <linux(at)basing.si> [ date: 2003-10-19 ]
Using ramdisk to assist in fileservers is increasingly a good idea. With Giga LAN, larger/cheaper Ram dims. I'm using that aproach at work and works fine, until we upgraded server to 1.5GB RAM, and then I figure out that max ramsize is 500Mb. So what to do it this case. It may have something to do with kernel option "High Memory".
Any suggestions regarding this matter?

Regards
Denis
From: p1p3 <jonkarkaninen(at)hotmail.com> [ date: 2004-01-23 ]
One idea i have been playing with is if you could have 2 computers.
The first shares one diskimage over the network.
The other boots up, creates a raid 1 array whith a ramdrive and the diskimage over the network. Restores the data from the diskimage and then boots of the ramdrive.
Don't know if this i possible.
From: Philip Stoev <www.stoev.org> [ date: 2004-07-01 ]
The ramfs parameters mentioned in the article are only available via patches, as well as the 1/2 memory limit. The ramfs in the 2.4.21-4.EL kernel as provided by Red Hat Enterprise Linux ES release 3 (Taroon) does not provide either. You can fill up your entire memory with a single ramdrive.

10 talkbacks in English
Other talkbacks:   Castellano Francais




Due to the increased amount of web spam we have deciced to removed the talkback posting possibility. You can read old talkbacks but you can no longer post new ones.

Back to http://cgi.linuxfocus.org/English/July2001/article210.shtml

Please contact webmaster(at)linuxfocus.org if you have any questions with regards to this talkback

lftalkback version 3.10