[ale] RAM disks

Joe Steele joe at madewell.com
Tue Jan 16 13:11:07 EST 2001


> Is it possible to specify a size of 16meg for a ramdisk?

Yes.  The kernel boot parameter is:  ramdisk_size=<size in kb>
This size is an individual upper limit per ramdisk, applicable 
to all ramdisks.

> If so, and I only put a 4meg image, will
> 16megs be used my the device regardless of image size?

No.  The ramdisk dynamically grows as more space is required.  
My understanding is that it's similar to a hard disk in that as 
blocks are written, buffers are allocated to hold the data.  
The difference is that a hard disk driver will eventually write 
the data to disk and release the buffers, whereas a ramdisk 
never releases the buffer space (until explicitly told to do so 
with a BLKFLSBUF ioctl command which flushes the buffers and 
erases the ramdisk.)  

Therefore, if you write a 4 MB image of a file system to a 
ramdisk, only 4 MB of ram is used, even if ramdisk_size=16384.

--Joe
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list