Ramdisk Size

Tony Travis ajt at rri.sari.ac.uk
Mon Sep 22 15:34:36 EDT 2003

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.

> 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.

You don't have to boot with an "initrd=" argument. You could use e.g.:

	boot: vmlinuz ramdisk_size=10485760
	mkfs -t ext3 /dev/ram0
	mkdir /mnt/ramdisk
	mount /dev/ram0 /mnt/ramdisk
	cp -a /stuff /mnt/ramdisk    # stuff you want on RAM disk

However, I still think you would be better off with tmpfs :-)

Dr. A.J.Travis,                     |  mailto:ajt at rri.sari.ac.uk
Rowett Research Institute,          |    http://www.rri.sari.ac.uk/~ajt
Greenburn Road, Bucksburn,          |   phone:+44 (0)1224 712751
Aberdeen AB21 9SB, Scotland, UK.    |     fax:+44 (0)1224 716687

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