Ramdisk Size

Jeffrey B. Layton laytonjb at bellsouth.net
Mon Sep 22 16:04:16 EDT 2003

Tony Travis wrote:

> Jeffrey B. Layton wrote:
>> [...]
>>   What's the difference between tmpfs and a ramdisk created through
>> the kernel? Is there a speed difference?
> The main difference is that tmpfs uses both RAM and swap. The memory 
> manager will therefore optimise use of RAM for programs, tmpfs, or 
> disk cache according to demand: Inactive pages of processes and 
> infrequently accessed parts of tmpfs filesystems are written to disk 
> to free up RAM when the system starts to run out of physical memory 
> (RAM). By default, tmpfs size is limited to half the available RAM 
> detected at boot time. 

Didn't know this. Thanks! Doesn't this imply that you could
get swapped to disk as some point? So if you wanted to make
sure everything stayed in memory you would have to use a
ram disk. But if you didn't really mind getting some pages
swapped to disk (not much a measurable speed hit on the
application), then tmpfs is the way to go. Is this accurate?

>> BTW, here's a link on creating a generic ram disk:
>> http://www.lissot.net/partition/ramdisk.html
>> (read the bottom part).
> Hey! that only tells you how to format and mount a default 4Mb ramdisk. 

Just change the count to what you want.


Beowulf mailing list, Beowulf at beowulf.org
To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf

More information about the Beowulf mailing list