LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setting up ramdisk under RedHat (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-ramdisk-under-redhat-768055/)

linux_dk 11-09-2009 08:28 PM

setting up ramdisk under RedHat
 
I am a newbie..trying to pickup Linux..moving away from Windows...
I am trying to setup a Ramdisk but trying to understand the max ramdisk size I can use..I was able to setup up to 30gig and didn't have issue setting up (setup process didn't complaint)... but, when I tried 500gig, it hangs in the middle of mke2fs...
I am wondering the max ramdisk_size I can set to, and for mke2fs to work without a problem.
if there is some limitation or a known bug/issue, is there a different driver and/or ways for me to overcome the issue I am having...
Q1: max ramdisk_size?
Q2: max mke2fs ramdisk size it can support?
Q3: if some known limitation, what other option do I have?
Thanks for your kind help...
Daniel

Tinkster 11-09-2009 08:48 PM

Hi,

welcome to LQ!

Goodness ... I can't actually answer the question(s), but I'm curious:
what kind of hardware do you have access to? :}

500GB RAM disk? The largest spec server I've ever had access to was
roughly 200GB ....


And I'd like to pose another question: what's the background for
wanting a RAM disk that size?


Cheers,
Tink

timmeke 11-10-2009 02:01 AM

Are RAM disks not installed via a boot option, rather than mke2fs?

The concept of a RAM disk is to use a piece of your physical memory to serve as (very fast) hard disk-like storage.
This is typically used when you need to do a long series of IO operations (like streaming) rapidly.
Disk cache mostly solves this sufficiently, RAM disks are only needed for special cases.
In any case, it doesn't make sense to make your RAM disk larger than the amount of physical RAM you have at your disposal.
And I agree with Tinkster that a computer with 500GB (or more) RAM is unusual to say the least.

This is not to be confused with your swap disk (=piece of hard drive used as a slow alternative to your RAM, when you
don't have enough physical RAM on board).

johnsfine 11-10-2009 07:26 AM

Quote:

Originally Posted by linux_dk (Post 3751018)
I am trying to setup a Ramdisk

Why?!

A tmpfs is better than a ramdisk in almost every way.

Quote:

but trying to understand the max ramdisk size I can use..I was able to setup up to 30gig
Does your system have 32GB of ram?

I don't think there is any meaning to a ramdisk larger than the size of ram, but I never tried to create one and don't know what would happen.

A tmpfs larger than the size of ram (but smaller than ram plus swap space) may make sense. But what do you want to use it for.

linux_dk 11-10-2009 10:32 AM

Ramdisk
 
the physical memory I have is 3gig...I fully understand the usage of Ramdisk...since I've used it under windows and other OS environments before to speed up some data access...I am, just trying to understand the max ramdisk I can create assuming I had infinite amount of physical ram...in the feature, I am thinking of purchasing more memory in the system to test out DB apps I'll be working with...again, because I am new to linux, I am trying to understand how far I can take ramdisk..again, RedHat system I just put together, even though I have 3gig physical mem, it's allowing me to create 30gig -- and, I can see the valume I just created and it's property showing 30gig as the size. Again, I just would like to know:
Q1: max ramdisk I can have; assuming I had infinite amount of physical mem
Q2: limitation with mke2fs (when tried large ramdisk_size, it hangs during writing of inote table; at around 420-ish..)
Q3: is there other method, other than using mke2fs to setup a file system on ramdisk that are of large size?
one person replied with "tmpfs"... I could not find this under RedHat version I have... is this a driver that I can load to my RedHat and use? and, what's the limitation on this...and readme files for this?

johnsfine 11-10-2009 03:41 PM

Quote:

Originally Posted by linux_dk (Post 3751738)
the physical memory I have is 3gig...I fully understand the usage of Ramdisk...since I've used it under windows and other OS environments

Don't assume the behavior will be the same on Linux.

I haven't used ramdisks on Linux because tmpfs is better. So I didn't know how misusing it might respond.

Apparently, it does not allocate the requested ram until you actually use it. A file system have some overhead areas that must be initialized, which will be some small fraction of the total size. For a 30GB ramdisk, I guess you have enough ram to allocate the overhead areas, though doing so if pointless, because you don't have the ram to actually use for file storage.

Quote:

I am, just trying to understand the max ramdisk I can create assuming I had infinite amount of physical ram.
For a large enough ramdisk, you don't even have enough ram to allocate the overhead of the filesystem, so you can't initialize the filesystem. I expect that, rather than some more fundamental limit of ramdisks, is causing your problem. If you had more actual ram you could initialize a ramdisk even further beyond the amount you could actually use.

Quote:

one person replied with "tmpfs"... I could not find this under RedHat version I have.
What version of RedHat? I think tmpfs has been available in RedHat a long time, but I don't know details about old versions, so I don't really know how long.

The normal way to use tmpfs is to put a line into /etc/fstab defining the tmpfs and its mount point. I'm pretty sure creating the mount point is all you need to do before that.

I don't know where detailed documentation is for tmpfs. Some documentation for tmpfs is in the man page for mount.

If you want to experiment, you can create the tmpfs directly with the mount command, rather than edit the fstab file. The fstab approach is for a tmpfs that you want created every time Linux starts.

lazlow 11-10-2009 04:10 PM

Have you looked at the solid state drives? They have huge speed advantages and the price would be significantly less when applied to large scale (500GB).

There was also a company called hyperdrive(?) that was selling ram drives (physical) that were impressive. Gigabyte was also selling one but it was only 4GB.


All times are GMT -5. The time now is 11:47 AM.