Unix ramdisk?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unix ramdisk?
# 1  
Old 12-13-2002
Unix ramdisk?

This may be a stupid question but I've noticed that there is quite a bit out there currently for a ramdisk on that Redmond company's OS. Is there a ramdisk made for Unix and if not, why?
# 2  
Old 12-13-2002
Google found me some hits with the terms "solid state disk Unix".
Here's one:
http://www.imperialtech.com/
I think these people only have systems for Unisys hardware, but this is what we have here:
http://www.dynamicsolutions.com/
According to their manual, the built-in 10,000 RPM spinning drives inside perform read ops at 30MB/sec, where as reads from memory perform at nearly 400 MB/sec!

I don't know if HP-UX has the ability, but some Unix variants do this easily. For example, on a Linux box, I can do this:
Code:
mkdir /opt/ramdisk
/sbin/mkfs.ext2 /dev/ram0 20480 >/dev/null 2>&1
/sbin/tune2fs -i0 /dev/ram0 >/dev/null 2>&1
/bin/mount -t ext2 /dev/ram0 /opt/ramdisk >/dev/null 2>&1

I've just added 20 meg of ramdisk mounted at /opt/ramdisk.
This requires some tweaking with the kernel to get any bigger than a 4 meg (default in the kernel - you can specify at boot-time) ramdisk, but it's very easy to do. I've heard of people putting their dynamic web content on there via scripts at startup, and running a lightning-speed web server.
# 3  
Old 12-13-2002
the single disk linux distrobutions some use ramdisk, which is great especially if you have a gig of ram. i think check out the http://floppyfw.wojci.dk/ website i think that can use ramdisk, its basically a minimal linux distrobution. hope that helps. seeya.
# 4  
Old 12-14-2002
I'm not sure what is being discussed in this thread.

One possibility is a device like an ordinary scsi disk but with no moving parts. It would look to the kernel like a very fast disk drive. I don't have any experience with something like this. But if it is available, I would guess that it would only take a driver to get it work under unix.

The other possibility is a pseudo-driver that allocates a large chunk of system memory and makes it look like a very fast disk drive. Any data stored on a pseudo-disk like this is guaranteed to disappear at shutdown time. I do have experience with this sort of thing, so I will comment on this.

Every version on unix that I know of uses memory based filesystems. But mostly they are used when booting an install or a support media. With HP-UX, you can even use Ignite to create a bootable tape that will have a copy of your root filesystem. When you boot that tape, root will be in memory while the tape is running.

As far as using a memory disk while the system is running, SunOS comes close with its handling of /tmp, but that is not locked in core, instead it is virtual.

Unix is very aggressive about caching disk data. Blocks are read into core and most disk i/o is really to and from core anyway. When a file is being processing sequencially, unix will notice this and will read ahead. The combination of write-behind and read-ahead is so effective that most disk i/o never happens.
Quote:
On a typicall UNIX system, over 85 percent of the implied disk transfers can be skipped because the requested block already resides in the buffer cache.
That quote is from page 208 of The Design and Implementation of the 4.3BSD UNIX Operating System which was published in 1989. Today's system are much better than that, mostly due to very large memories. Today's read-ahead algorithms are also smarter. And we are moving away from block based filesystems to extent based filesystems like Veritas.

But don't take my word for it, try this...
program1 | program2
program1 > datafile ; program2 < datafile

You probably won't be able to measure the difference on a single cpu system. What good would it do to put datafile in a memory-based filesystem? Or maybe I really should say that memory-based filesystems are all that unix supports.
# 5  
Old 12-16-2002
I did somewhat blur the two.

There are several hardware products that could be called a RAMDisk. They communicate via a high-speed cable, often Fibre Channel... They are not cheap, though. Based on a recent purchace my employer made, we spent about $10,000 per gigabyte.

On the other hand, if you could utilize a memory-based filestsyem on an HP-UX server, would that be a cheaper way to, say, store transaction logs for a large database? Or any other highly I/O intensive files?

I know that the hardware solution is essentially built for this type of work, and even 1 gig can be a huge help if you place the right files on it, but is that something that could be done without an additional puchase?
# 6  
Old 12-17-2002
Quote:
Originally posted by LivinFree
On the other hand, if you could utilize a memory-based filestsyem on an HP-UX server, would that be a cheaper way to, say, store transaction logs for a large database? Or any other highly I/O intensive files?
That's all good until you have that one nanosecond burp of electricity and the filesystem is laid to waste. Smilie

Ah, Bubble memory. Where are ya when we need ya? Smilie
# 7  
Old 12-17-2002
Re: Unix ramdisk?

Quote:
Originally posted by keelba
This may be a stupid question but I've noticed that there is quite a bit out there currently for a ramdisk on that Redmond company's OS. Is there a ramdisk made for Unix and if not, why?
Under FreeBSD, you can man mount_mfs and see examples on creating a RAMDrive and mounting a RAMDrive. It appears that there is even a way to save the image of the ramdrive to hardrive for loading again later. Kinda handy.

/edit:

Here is more detail about using RAMDisk (aka mfs) under FreeBSD in case you are interested:

http://www.onlamp.com/pub/a/bsd/2000...y_Daemons.html

Last edited by auswipe; 12-17-2002 at 01:44 AM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to view Ramdisk Initialization Process

Dear all, I read some articles about initrd, but how to view this process in my computer :(? Is there anyway to display to the screen or write to the log file? (3 Replies)
Discussion started by: Hannibal2010
3 Replies

2. AIX

maximum size of a ramdisk on AIX 5.3

Hi, Do you know what is the maximum size I can use to create a ramdisk on AIX 5.3? I m pretty sure i've seen somewhere i can use more than 2 Gb but I can't remember where. I need to do some recommandations for one of my customer and they'll need to create a ramdisk of 20 Gb. Can this be done? ... (1 Reply)
Discussion started by: cedric hanquez
1 Replies

3. Ubuntu

initial ramdisk in ubuntu

hi everybody! i need your help! i have some problems with "initial ramdisk" (initrd). i did with instructions of the following link Linux initial RAM disk (initrd) overview but my initrd not run. after loading, it stopped,and failure notice : "ramdisk : compressed image found at block 0 no... (0 Replies)
Discussion started by: xikechamh
0 Replies

4. Shell Programming and Scripting

Sorting in ramdisk

Hi, I have sort command that sorts in ramdisk created by a script 'mktd' and later unmounted by script 'rmtd'. The platform is AIX. # code sudo -E mktd 44 # create ramdisk of size 44GB sort ... -k1,1 -2,2 ... # sort a file using the ramdisk on keys 1 and 2 sudo -E rmtd # unmount... (1 Reply)
Discussion started by: ChicagoBlues
1 Replies

5. Shell Programming and Scripting

Ramdisk already defined

I am trying to mount the ramdisk for sorting, and i get the message "ramdisk already defined." What exactly is /dev/ramdisk0 and is it safe to remove it? # command sudo -S mktd 60 <<EOF initiate EOF # block of code for mktd ... && { print "ramdisk already defined." ... (1 Reply)
Discussion started by: ChicagoBlues
1 Replies

6. Shell Programming and Scripting

how to modify ramdisk size,kinda urgent !!!

Hi all, I wanted to know how to modify the size of the ramdisk? I mean am manipulating a live cd ,for which the file am manipulating is within a ramdisk now due to size constraints i am unable to play around with some stuff.... currently the size of the ram disk is 64M... I would like to... (1 Reply)
Discussion started by: wrapster
1 Replies

7. Shell Programming and Scripting

how to create a ramdisk

Hi all, I wanted to make a ramdisk for a opensolaris distro. I have very little idea of how to create it? can anyone pls help me out? Is there any tutorial on creating it on the net??? Also can i make changes to the actual os itself by changing the scripts involved in ramdisk then use it to... (1 Reply)
Discussion started by: wrapster
1 Replies
Login or Register to Ask a Question