TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:9949] How do I set up a ramdisk?



>> On  9 Nov, Karl Morgan wrote:
>> >      # dd if=/dev/zero of=/dev/ram bs=1024 count=2048
<snip>
>I know that a ramdisk on current linux kernels only require
>one to write to them in order to allocate the space. Thus the mke2fs
>does the trick just fine since it writes the filesystem to the device
>(/dev/ramX). Or more specifically, the following comment in rd.c
> * It also does something suggested by Linus: use the buffer cache as the
> * RAM disk data.  This makes it possible to dynamically allocate the RAM disk
> * buffer - with some consequences I have to deal with as I write this.
        so do the ramdisks all always exist at boot time, but just have a
size of 0?
        then when you write data to them, they fill up to a maximum size of 4MB?

>Just a note, it seems the maximum size of a ramdisk is 4Mb unless you are
>willing to modify /usr/src/linux/drivers/block/rd.c and recompile your
>kernel.
        hmm. that seems a bit silly. but maybe I'm biased.
        here at work we use ramdisks on a lot of computers (useful for
.zip'ing & unzip'ing files, done by scripts); and 4MB is the smallest size
we use. there are a couple of 10-12MB ramdisks that people use.
        i would have guessed that there would be more call for bigger
ramdisks; but I suppose HDDs are so fast these days; it's not as important
as it once was.

Carl Soderstrom
System Administrator	307 Brighton Ave. 
Minnesota DHIA		Buffalo, MN	
carls@agritech.com	(612) 682-1091