RAM Disks in Linux???

David Cole metalgrow at cds1.net
Thu Jul 8 20:13:49 PDT 1999


Mike,
  My question comes from two directions,  and if the kernal and 
all the daimeons use the swap only on ram overflow then one of 
my reasons is dead.

But my main reason is:
  I want to eventually build a diskless Web server out of this 
PII 400 128Mb.  With it serving its data from a 20Mb ram disk. 
Booted and Loaded from a CD.
   Like those wonderful diskless machines you've got going at 
SSU's Library.  (I drooled when I heard about them :-)..  
   But not booting off a critical server but off a CD ROM.

   Because of the thousands of miles of physical distance between 
me and my servers, and my static content,
1) I'm trying to design a server that when I reboot it or it's 
watch dog timer reboots it,  it gets a fresh copy from a CD which 
is year to year much more data relyable than a HD.  
2) And when I need a volunteer, local to the server, install(rarely) 
a new version of the site,  I want them to just replace the CD with 
one I send snail mail,  because my volunteer will most likely be a 
non-technical college student of that campus. (Shudder)


My reason for asking was...
   I have a Standard Red Hat Linux Server NEC Pentium150 w/ 96Mb RAM 
who's entire site contents is a static 20MB with about 30 test hits 
per day that goes corrupt after a week...reboot it and it's fine for 
another week.  I was guessing the HD swap area has bad bits that 
slowly gives Linux "kernel panic" Or a random speckled colored 
screen saver and lock up, where there wasn't a screen saver.  I have 
reasons to suspect the HD, but if what you say is true how could the 
HD corrupt the kernel in a standard RH 5.2 Server install???
   I've seen the HD light blink when used when it had no reason to go 
to HD.  From what you said it must have been a log file updating?  
unless the kernel is using it to swap between daimeons???

Thanks
   David


Mike wrote:
> 
> Swap space is supposed to be for when you run out of memory (RAM) and you
> need more memory. Why not just set your newly added memory to be part of
> your OS so that it is available to all of your programs, and then when you
> exhaust real memory (RAM) your can go into SWAP space....
> 
> Are you having problems with the aparent 64Mb limit being autodetected by
> Linux?
> 
> If you knowexactly how much memory you have and none if this memory is
> shared with your video card (like seom modern machines do) then you can
> just as an entry to yout /etc/lilo.conf like:
> append="mem=128M"
> 
> so that you TELL your kernel how much memory you have.
> 
> What you state can be done, but the reasons seem  ??
> 
> If you REALLY want to be cruel to your CPU you could:
> enable lookpack support,
> 3DES fs encryption,
> RAM Disk support, and
> then create a ramdisk, use dd to write out some block sized fileonto the
> ramdisk. Setup the file on the loopback interface with encryption. Mount
> the loopback interface as swap and really consume CPU cycles! (Joke)
> 
> What purpose are you trying to solve by enabling RAM to be a SWAP via
> RAMDisk?
> 
> It is possible tha there are reasons for this that I have not thought
> about, and I am willing to hear them...
> 
> -M
> 
>  On Thu, 8 Jul 1999, David Cole wrote:
> 
> > Date: Thu, 08 Jul 1999 18:44:18 -0700
> > From: David Cole <metalgrow at cds1.net>
> > Reply-To: nblug-talk at lists.sonic.net
> > To: nblug-talk at lists.sonic.net, dustin at sonic.net, vulpia at sonic.net
> > Cc: MetalGrow at cds1.net
> > Subject: RAM Disks in Linux???
> >
> > Help!!!
> >   I can use any sugestions, I can't find anything about this online

> >
> > With PC100 memory prices as low as $30 for 64Mb,
> > I want to try a RAM Linux SWAP Drive,
> > instead of Hard Drive system Linux SWAP Partition.
> >
> > Does anyone even have a guess at how I would do it.
> > I have Red Hat 5.2, Pentium II 400 with 128Mb of PC100SD Ram.
> > I would like to use about 64Mb for general RAM
> > and 64Mb Ram System SWAP Drive???
> > This would be for my CGI web server Linux box.
> >
> > I know it’s killing a knat with an elephant gun,
> > but it sounds hard enough to be fun.
> >
> > More stable system:  Long term, Ram doesn’t corrupt bits
> > like Hard Drives can :)
> > And oooboy it’d be fast :)
> > the performance difference between RAM and any HD is huge.
> > You can run a 486DX2 out of ram faster than you can run a
> > PII out of a SCSI Hard Drive.
> > Hard Drives are in milliseconds and RAM is in nanoseconds.
> >
> > Thanks
> >    David Cole
> > email: MetalGrow at cds1.net
> >



More information about the talk mailing list