2002-06-25 21:13:09

by devnull

[permalink] [raw]
Subject: ramfs/ramdisk.

Hello All,

I am trying to understand the differences between ramfs and ramdisk, and
also trying to use ramfs.

I am running 2.4.13-ac8.

I do a mount -t ramfs none /tmp/tmpfs

Then use dd to create a file, of size 500M.
do a df, and %Use is 49%(machine has 2G) so i guess default size of
"ramfs" fs will be half of that, 1G.

But when i delete the file. df doesnt show %Use to be 0%.

du -sk doesnt either.

Not sure what is going on.

Cant the utilization of the ramfs be changed.

Also, from fs/ramfs/inode.c

"* NOTE! This filesystem is probably most useful
* not as a real filesystem, but as an example of
* how virtual filesystems can be written.
"

1. Can i use ramfs for any practical purposes at all ?


2. I was hoping to create a few ram disks, mount them as swaps on Sun
machines(so i dont have to buy their expensive memory) and run big
simulations. (agreed might not be screaming over NFS)


Also, some articles talk about using ramfs when on a webserver. So it
ramfs mostly for read-only stuff rather than read-write.

Thanks,

Regards.

/dev/null

[email protected]