LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-08-2003, 01:09 AM   #1
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Set ramdisk size?


Hi all,

I am running RH 7.3, grub, 2.4.18-18.7.xsmp kernel and would like to create a huge ramdisk, maybe 2 GB to store a static database in that is continually queried by my webserver (Apache). I can easily enough create a ramdisk but by default RH sets the size to 4 MB, only 1/500th of what I need! Does anyone know where this is defined?

I found a doc that mentioned adding a line to /etc/lilo.conf but it was for RH 6 and didn't work for me.

Another article said:
insmod rd rd_size=200000
but I don't have that module compiled and/or installed:
[root@system root]# insmod rd rd_size=200000
insmod: rd: no module by that name found

Any help will be greatly appreciated!
 
Old 02-08-2003, 10:54 AM   #2
Half_Elf
Guru
 
Registered: Sep 2001
Location: Montreal, Canada
Distribution: Slackware; Debian; Gentoo...
Posts: 2,163

Rep: Reputation: 45
if the ramdisk support is include inside your kernel, you can't specify the size of the ram disk. If you want to do so, you need to recompile your kernel and to add ram_disk as a module, not include.
 
Old 02-09-2003, 10:35 PM   #3
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Original Poster
Rep: Reputation: 32
Thanks! I will give it a shot.
 
Old 02-09-2003, 11:13 PM   #4
PTBmilo
Member
 
Registered: Jan 2003
Posts: 167

Rep: Reputation: 30
do you have over 2 gigs of memory?

Either way, I believe that the setting in the kernel is the *default* size, but you shouldn't need to re-comple to make a larger ramdisk.

I've done this with isolinux, but lilo should be the same or similar:

#the kernel params (in the boot loader config):
ramdisk_size=16384 # if I remember correctly, that's +16 megs

#on the command line:

/sbin/mke2fs -m 0 -i 1024 /dev/ram0
mount /dev/ram0 /mnt/ramdisk

And that's it. Just adjust the ramdisk_size parameter (and verify size w/ df after you mount it all)

EDIT:
Now that I think about it, the above works if ramdisk support is built into the kernel, but you may be able to alter the size if you load it after boot with modules.conf or something. Maybe your other source meant:

$insmod ramdisk ramdisk_size=200000

Last edited by PTBmilo; 02-09-2003 at 11:28 PM.
 
Old 02-09-2003, 11:32 PM   #5
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Original Poster
Rep: Reputation: 32
Yup, 4 GB of RAM. I will try this before I recompile. I know support is included as I can create ramdisks, just that they are 4 MB.

I won't be able to try this until Tuesday night since this is a production machine and I can't shut it down or reboot until then in case something goes bad. I'll post the results.

Thanx!
 
Old 02-10-2003, 01:56 AM   #6
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
P.S. linux (and most commercial unices) use all free mem available for disk cache so if this db is on your local disk it will be ram cached up to 4GB (minus OS and apps) anyhow.
 
Old 02-22-2003, 03:08 PM   #7
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Original Poster
Rep: Reputation: 32
Well, after further investigation, the 2 GB file is only 1 of 4 that must reside in the same directory. The combined size of all of the files is in excess of 4 GB so I am not going to persue a large ramdisk any further. Maybe if I can talk the boss into 8 GB RAM...
Thanks to all for the suggestions!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 03:08 PM
the size limit of LILO to load a ramdisk golien Linux - General 0 03-31-2005 12:32 AM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 08:59 AM
ramdisk size jonfa Linux - General 1 05-22-2004 01:22 PM
Mplayer set window size taoweijia Linux - Software 0 09-16-2003 10:14 PM


All times are GMT -5. The time now is 09:42 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration