LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial 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
 
LinkBack Search this Thread
Old 02-20-2011, 02:11 PM   #1
cf500
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 0
Centos5 Ramdisk help


Okay so I'm attempting to create a ramdisk for running minecraft server inside it because my i/o is very abysmal for some reason and following this guide: http://crazytoon.com/2007/06/01/ramd...s-rhel-fedora/

it says to find the line in grub.conf that is similar to "kernel /vmlinuz-2.6.9-42.0.10.EL ro root=/dev/VolGroup00/LogVol00"

The thing is i don't have anything close to the
root=/dev/VolGroup00/LogVol00

What i do have however is this
Quote:
title CentOS (2.6.18-194.26.1.el5.centos.plusPAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.26.1.el5.centos.plusPAE ro root=LABEL=/
initrd /initrd-2.6.18-194.26.1.el5.centos.plusPAE.img
title CentOS (2.6.18-194.26.1.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-194.26.1.el5PAE ro root=LABEL=/
initrd /initrd-2.6.18-194.26.1.el5PAE.img
title CentOS (2.6.18-164.el5PAE)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.el5PAE ro root=LABEL=/
initrd /initrd-2.6.18-164.el5PAE.img
So where do i append the ramdisk_size= at?
 
Old 02-20-2011, 04:21 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,717

Rep: Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635Reputation: 635
You can add it to the end of each kernel line as I'm not sure which one you're using. Your root volume is referred to by it's label - '/', that's why you can't see anything like /dev/VolGroup00/LogVol00

cheers
 
Old 02-20-2011, 04:33 PM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
You don't need to add it to GRUB as with a stock Centos kernel (you're one version behind BTW as 2.6.18-194.32.1.el5 is current now) you've already got those /dev/ram* devices: just format and mount them. For the difference between /dev/shm and /dev/ram see (/usr/src/kernels/`uname -r`/)Documentation/filesystems/tmpfs.txt.
 
Old 02-20-2011, 05:42 PM   #4
cf500
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by kbp View Post
You can add it to the end of each kernel line as I'm not sure which one you're using. Your root volume is referred to by it's label - '/', that's why you can't see anything like /dev/VolGroup00/LogVol00

cheers
Thanks
Quote:
Originally Posted by unSpawn View Post
You don't need to add it to GRUB as with a stock Centos kernel (you're one version behind BTW as 2.6.18-194.32.1.el5 is current now) you've already got those /dev/ram* devices: just format and mount them. For the difference between /dev/shm and /dev/ram see (/usr/src/kernels/`uname -r`/)Documentation/filesystems/tmpfs.txt.
The guide insinuated that the /dev/ram* devices were only 16mb each
Also there seems to not be a Documentation directory within my 2.6.18-194.26.1.el5.centos.plusPAE-i686 directory
 
Old 02-20-2011, 06:33 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,539
Blog Entries: 51

Rep: Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604Reputation: 2604
Quote:
Originally Posted by cf500 View Post
The guide insinuated that the /dev/ram* devices were only 16mb each
True, unless you need space way bigger than the default you can combine existing ram disks with something like say 'mdadm --create /dev/md0 --level=0 --raid-devices=4 /dev/ram0 /dev/ram1 /dev/ram2 /dev/ram3; mkfs.ext2 /dev/md0; mount /dev/md0 /some/path/ramdisk' as easily.


Quote:
Originally Posted by cf500 View Post
Also there seems to not be a Documentation directory within my 2.6.18-194.26.1.el5.centos.plusPAE-i686 directory
Wouldn't be too hard to find on the 'net wouldn't it?
 
Old 02-20-2011, 07:50 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 11,812

Rep: Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923Reputation: 923
ramdisk is so last century ...
tmpfs is the way to go - more so if allocating large amounts on a PAE kernel. You really don't want to go fixing (lots of) memory in that scenario if you can avoid it.
 
Old 02-21-2011, 12:19 AM   #7
BoraxMan
Member
 
Registered: Apr 2010
Posts: 84

Rep: Reputation: 8
http://wiki.debian.org/ramfs

http://www.thegeekstuff.com/2008/11/...mpfs-on-linux/

There is no need to use /dev/ramX devices unless you need to control the block structure of the filesystem, or need a specific filesystem in use. If you just want a filesystem in RAM (which still supports unix permissions, etc), then the two links above are the better options.
 
Old 02-21-2011, 03:38 PM   #8
jefro
Guru
 
Registered: Mar 2008
Posts: 10,265

Rep: Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257Reputation: 1257
Not sure you should edit it just yet but it shows you have three choices on boot. Do you see those at boot or if you press space bar at boot?

Ignore this "root=/dev/VolGroup00/LogVol00"

Add your ram statement to each if you want to be sure.

This assumes you want it created at boot. I would test within the OS before I went to automation of the disk.


"# mkdir /tmp/ramdisk; chmod 777 /tmp/ramdisk
# mount -t tmpfs -o size=256M tmpfs /tmp/ramdisk/

where 256M is amount of RAM you wish to allocate for ramdisk. It’s clear that this value should be less than amount of free memory (use “free -m“). BTW, if you specify too many MBs for ramdisk Linux will try to allocate it from RAM and then from swap so resulting performance would be very poor."

http://www.linuxscrew.com/2010/03/24...n-ubuntulinux/

Here is more what you saw.


http://www.vanemery.com/Linux/Ramdisk/ramdisk.html


I can't say about syg00's statement about tmpfs. May be a better way but no links or suggestions how to use it.
 
Old 02-22-2011, 01:59 AM   #9
cf500
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jefro View Post
Not sure you should edit it just yet but it shows you have three choices on boot. Do you see those at boot or if you press space bar at boot?

Ignore this "root=/dev/VolGroup00/LogVol00"

Add your ram statement to each if you want to be sure.

This assumes you want it created at boot. I would test within the OS before I went to automation of the disk.


"# mkdir /tmp/ramdisk; chmod 777 /tmp/ramdisk
# mount -t tmpfs -o size=256M tmpfs /tmp/ramdisk/

where 256M is amount of RAM you wish to allocate for ramdisk. It’s clear that this value should be less than amount of free memory (use “free -m“). BTW, if you specify too many MBs for ramdisk Linux will try to allocate it from RAM and then from swap so resulting performance would be very poor."

http://www.linuxscrew.com/2010/03/24...n-ubuntulinux/

Here is more what you saw.


http://www.vanemery.com/Linux/Ramdisk/ramdisk.html


I can't say about syg00's statement about tmpfs. May be a better way but no links or suggestions how to use it.
Well the box is a dedicated server i'm leasing, came with centos so i wouldn't know. Ended up going with tmpfs seemed to be a bit more flexible than going with a static ramdisk size. Whole reason as i said in the OP was for Minecraft server, the game world has a lot of small files making up its entirety and i went for a RAM heavy setup as apposed to getting a decent hdd+raid for speed so the i/o required by it was very intensive and caused a fair amount of lag on the game. With the tmpfs however with the test i ran i get 1.6GB/s transfer on the tmpfs so it's a big improvement over the ~60MB/s i was getting on just the hdd.


Thanks to everybody who gave input
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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
Ramdisk mudasar Linux - General 2 07-22-2010 11:54 AM
centOS5.2 ekac Linux - Newbie 4 06-05-2009 07:53 AM
creating a ramdisk runtime from another ramdisk code123 Linux From Scratch 0 10-11-2004 08:59 AM
ramdisk clu Slackware 0 05-08-2003 02:25 AM


All times are GMT -5. The time now is 02:36 AM.

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