Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Memory file systems

On Tue, 9 Feb 2010, Matthew Mondor wrote:
A main difference if I understand, is that mfs uses a backend closer to
a disk file system and can also be tied to kernel images using
mdsetimage.  mfs also has size restrictions defined at configuration

I don't think those three statements are true:

 * mfs uses (well) memory as storage, and if that runs short, it uses
   the system's virtual memory system as backing store, just like tmpfs.
   The VM system uses a swap partition in both cases, and can be also
   bound to a swap file, but that doesn't depend on tmpfs or mfs.
 * mdsetimage has nothing to do with mfs. Read mdsetimage(8) and md(4).
 * you can restrict the size of mfs, but that's done at mount time, not
   system config(8) time.

tmpfs on the other hand might theoretically grow in size more
gracefully and provide enhanced performance, but I honestly didn't try
tmpfs much myself...

The important point is that tmpfs can *shrink* again, and free ressources previously allocated. Which mfs can't do.

Why does mfs exist? Because it was there first (for quite a long time!), and noone bothered to throw it out yet.

There may be a number of corner cases where mfs can do things that tmpfs can't do (yet?), but I don't know them off-hands. See the mount_tmpfs(8) and mount_mfs(8) manpage's BUGS sections for some of them.

 - Hubert

Home | Main Index | Thread Index | Old Index