LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   How can i make a ramdisk of 1GB or more (https://www.linuxquestions.org/questions/linux-general-1/how-can-i-make-a-ramdisk-of-1gb-or-more-299524/)

narmida 03-09-2005 05:31 AM

How can i make a ramdisk of 1GB or more
 
Ive tried :

kernel /vmlinuz-2.6.10-1.770_FC3smp ro root=LABEL=/ ramdisk_size=1024000
and got :
none 632M 0 632M 0% /dev/shm


also did this :

mke2fs -vm0 /dev/ram0 1024000
mount -t tmpfs /dev/ram0 /ramdisk

and got the same 632M

must i change this in the kernel ?

who has done it ?

plz there is nothing of this matter on the net

abisko00 03-09-2005 06:08 AM

Haven't done this, but yes, you may need to change the kernel config:
CONFIG_BLK_DEV_RAM_SIZE=<value in kb>

narmida 03-09-2005 06:27 AM

im gonna compile the kernel hope it works

let you know here

dokterneo 03-09-2005 12:52 PM

Here are alternatives:

RAMFS

You mount a volume to a mount point with or without
specifying a definite max size.

mount -t ramfs none /mnt/RAM1

It starts utilizing your ram as the mount point fills
with data. Once your ram is depleted, your box will
stop responding.

I have 32GB of ram with a ramfs mount. I created a
10g
temp tablespace for oracle in it and it works great.


TMPFS

You mount a volume to a mount point and specify a
size.

mount tmpfs /tmp -t tmpfs -o size=1000m

What is unique about this one is that once you run out
of physical ram, it will start using your virtual ram,
aka swap. This can be good or bad depending on you
application requirements.

I wouldn't bother too much with ramdisk, as your memory will be reserved whether you write to those mount points or not . You also have format ramdisks, filesystem overhead, etc. The alternatives are nice because what memory you don't use gets utilized by the system.


Hope this helps.


All times are GMT -5. The time now is 03:19 PM.