About RAMDISK Size ?

Does anyone know is there any size limitation when doing RAMDISK under SUSE Linux?

I can not give you some absolute numbers, but be prepared to have to study a number of things. In no particular order:
. Restrictions in the BIOS (I know of a BIOS that could not boot from a partition that started after a certain disk address, only a partial restricrion, easy to overcome).
. The maximum number of partitions (that is of course logical partitions).
. The maximum size of a partition.
. The maximum size the file system type you want to put on a partition can handle.
. Anybody knowing more of these?

At least for the fs sizes you could google for information about ext4 and others.

More reading about how partition tables function (maximum size of disk address fields there) might give you more clues.

And after rereading your very short post (short posts tend to have not to much information), Just saying RAMDISK might even mean: a lot of disks. That would depend on the bus capacity of your system. Not on openSUSE (the name is not SUSE Linux).

figaro yang wrote:
> Does anyone know is there any size limitation when doing RAMDISK under
> SUSE Linux?

what are you wanting to do?

that is, when you use the phrase “doing RAMDISK” exactly which of
these kinds of physical hardware/software are you asking about:

a. http://members.fortunecity.com/ramdisk/RAMDisk/ramdriv002.htm

b. http://en.wikipedia.org/wiki/RAM_disk

c. http://en.wikipedia.org/wiki/Solid-state_drive

d. http://tinyurl.com/32n4thq

e. http://memory.dataram.com/products-and-services/software/ramdisk

f. http://tinyurl.com/2v98rm5

and, when you say “SUSE Linux” are you talking about SUSE Linux
Enterprise Server, SUSE Linux Enterprise Desktop, or openSUSE Linux…

and, which version?

short questions like yours require either a lot of guessing, or a lot
of questions…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

As I take the OP’s question, he is asking about ramdisk which is a technique used to allocate sections of memory to function as if they are a physical disk. Old M$ DOS used this a lot before higher speed hdd’s were around. Linux kernels use them to load and uncompress the kernel before actually making the root partition active, and it is also possible to set them up and mount them on a running system (usually to do hot fixes). As for the size limits, and number that can be supported I’m not 100% clear. I did find a reference in Ubuntu forums that said a maximum of 16 64MB ramdisks set using /dev/ramdisk0 thru /dev/ramdisk15.

  1. BIOS restrictions that you refer to are for where the bootable partition must reside below cylandar 1023 and any motherboard made in the last 10 years does not have this restriction anymore
  2. Maximum number of partitions is 4 primary, or you can have 3 primary and 1 extended with a maximum of 16 logical defined in the extended. But soon to be released new schemes allow for upto 3 extended with 16 per each. And this is of course only talking about a single hdd.
  3. As for number of hdd’s, EIDE =4 (this includes any CD/DVD drives), SCSI = 16 per scsi-port and a maximum of 256 scsi-ports. USB_hdd = 16 per usb hub
  4. Maximum partition size in ext4 is 3TB, so technically speaking if we actually could manage a huge hdd of 57TB, then we could break it down to 19 eaqual partitions of 3TB with 3 being primary and 16 being logical. But then this is just theory.

So there are some numbers for you.

techwiz03 wrote:
> As I take the OP’s question, he is asking about ramdisk which is a
> technique used to allocate sections of memory to function as if they are
> a physical disk. Old M$ DOS used this a lot

that is the way i read it also (back in the day i had a staggering 16
MB of RAM and put most of one into a RAM disk to hold something, but i
don’t remember what…something mostly static that often got read)…

anyway, if s/he ever answers that way, my next questions is:

Since Linux handles RAM very differently than does “old M$ dos” (and
as far as i know any Redmond system) what are you trying to accomplish
by taking RAM away from the system only to then give it back as a
pseudo-physical disk resident in RAM?

that is, in the old dayz we did it to get a great speed boost compared
to the slow hard drives…but, i wonder what s/he is trying to do now
as hard drives are a quantum faster and if you let the system manage
the RAM it will probably do a much better job than always tying up xxx
MBs for some still unknown purpose…

now, if the questioner is sufficiently versed in the Linux memory
model, and has a great idea on how to get more/better use of RAM by
setting up a ‘permanent’ virtual hard-disk in RAM, i’d like to
understand the path…if it is for some hot-fix use then i guess the
questioner may (since s/he also used the term “SUSE Linux”) be using
SLES in which case i wanna direct him/her to the more correct place to
ask…

[so, from my point of view the question is either about how to use RAM
like the folks did in the 80s or how to do it in SLES today…unless i
misunderstand [probability: high] the answers so far, neither of those
slants on the question have been addressed, yet…)


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

I now see I completely misunderstood the question. My fault. I should ave read better and note have read DISK where it says RAMDISK.

In any case it would be nice if the OP told a bit more about what he is thinking about. The more while the only other thread he asked something, he never returned to the thread either telling the answers were usefull, or having any other comment on them.

Please @figaro_yang, can you join the discussion you started?

And I read it yet another way (lol): in there a maximum size to the initrd ?

Let’s see if @figaro_yang drops in to explain :slight_smile:

Sorry, this time because have some work issues, there was not immediate response. I ask this question, because I have a large memory spaces (more than 4TB ), if I want to use this memory spaces to do a RAM disk,i need to patch or do something on SUSE Linux Kernel Source ?

figaro yang wrote:
> I ask this question, because I have a large memory spaces
> (more than 4TB … on SUSE Linux

whoa, with that much RAM i guess you are probably not using openSUSE
but rather SUSE Linux Enterprise Server (or Desktop)…and, while you
might get some great advice here (and you are welcome to hang around
and find out) you really ought to ask over in the forum of the
maker/distributor where you can get the professional support which
comes with your license, try forums.novell.com

otherwise, if you really ARE using openSUSE i guess your best answer
will come from one of the developers–we here are mostly volunteer
users helping each other…so, developers are almost never here (but
you are welcome to wait), you can ask them via one of the mail list,
an email to opensuse+subscribe@opensuse.org
should get you started…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

What size of multiplexed mainframe are you working with? I suspect, you are confusing harddisk space with memory (volatile).
Please give us some real details about the hardware you are using.

Hi, i build a vSMP machine in taiwan , it was a mainframe-like architecture… so have large memory . We use this architecture design a computing cloud environment, Because some computing model need fast storage , I hope that through RAM Disk as a temporary area to save comput data , that increase the speed of comput mode…

figaro yang wrote:
> Hi, i build a vSMP machine in taiwan , it was a mainframe-like
> architecture… so have large memory . We use this architecture design a
> computing cloud environment, Because some computing model need fast
> storage , I hope that through RAM Disk as a temporary area to save
> comput data , that increase the speed of comput mode…
>
>
still, it seem you are looking at this through Microsoft eyes…

that is: in MS-DOS systems there is usually a great speed advantage
gained by forcing certain data to remain resident in RAM…

Linux, which uses memory differently from MS-DOS: that is, Linux will
always fill RAM with data as it is used AND let it remain there
(whereas MS-DOS flushes it out)…

so, you may or may not see any speed increase with a RAM disk under
Linux, because to build a RAM disk you have to TAKE RAM away from the
operating system, to put data in, and THEN when you access the data it
will automatically be replicated in the RAM you left to the
system…and it will then STAY in both places until the system
controlled RAM must free some space for more data…

try it…run some test…your original question was how large can a
RAM disk be–i have no idea, try it: build one of 1 TB and fill it
with whatever you want to…run some carefully controlled test, use a
stop watch…

then do the exact same test with all memory owned and controlled by
Linux, with no RAM disk…see how it works and report back…

btw, you did not answer: are you using openSUSE or SUSE Linux
Enterprise Server???


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

Ok I see what your up to. Sharing memory for shear speed between multiprocesses. The Linux ramdisk has an upper limit of 4GB at present, Unix ramdisk with threaded behaviour has an upper limit of 32GB. Both are well below your desired 1TB size. You can create multiple ramdisks (32 in Linux, and 64 in Unix). This means that your overall controllable memory is 128GB in Linux and 2TB in Unix.

At current harddisk storage speeds, EIDE,PATA & SATA drives internal will in most cases match or exceed memory access speeds. Externals and USB’s will lag sorely behind memory speed.

I fear your application of Linux is moving beyond the expertise of vitually all volunteer’s here. You may need a custom memory manager (hardware) which is not bank switched like a real mainframe has. A virtual SMP model is simulated using bank switching which will always incurr higher memory overhead. I’m not saying what you want can’t be done, it’s just difficult and beyond the expertise you will normally find here.

RAM Disk Creation

You (through lack of details by OP ) are making a miss-diagnosis. Ramdisks in Systematic Multiple Process (SMP) are an old concept that predates DOS and M$. Today, Mainframes, and *'nix for power users still do use them as another form of protected memory. Most desktop users will never tap this ability.
MSDOS had an upper memory of 640KB and used emm386 to gain access to memory up to the 16MB limit through paging and had no protected mode. Windows 95 and below also lacked protected mode.
Windows 98 allowed both protected and real mode and it’s here that Linux came on the scene with full protected mode processing.

so, you may or may not see any speed increase with a RAM disk under Linux, because to build a RAM disk you have to TAKE RAM away from the operating system, to put data in, and THEN when you access the data it will automatically be replicated in the RAM you left to the system…and it will then STAY in both places until the system controlled RAM must free some space for more data…

Do you realize, that people with on-board video with shared memory are actually using a ramdisk shared between the OS and the Video controller? The memory is taken away from the system for video use, but sending info to the video does NOT build up in user space memory unless you deliberately keep a copy in variables of your program. The same is true of ramdisks you create. They are like a disk really. If you save say 10 files (movies for example) of 4.7GB each to disk, only part of the stream stays in memory but the disk fills up as you write more.

techwiz03 wrote:
> Ok I see what your up to. Sharing memory for shear speed between
> multiprocesses.

thank you for helping…i see now i was totally off track! (and far
outside my comfort zone)

still, i think s/he is probably using a product with a longer expected
life than openSUSE…and, should be asking over at novell…


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

Thank you for your help, you let me clarify a lot of my question :slight_smile: