Subject: Re: MFS vs TMPFS
To: NetBSD-current <current-users@NetBSD.org>
From: Simon Burge <simonb@wasabisystems.com>
List: current-users
Date: 10/04/2005 12:25:22
Simon Burge wrote:

> I just tried a couple of tests on -current i386 that was pretty much
> 
> 	"vmstat ; mount_foo ; <command> ; vmstat ; unmount ; vmstat"
> 
> for the following commands:

Someone asked for timing info as well.  Here's the best time of three
runs for each test:

- sh MAKEDEV all (lots of devices)

    mfs   used  1264 kB or   316 pages (df said    33 kB used)
    tmpfs used   308 kB or    77 pages (df said   308 kB used)

    mfs:   3.426u 4.668s 0:07.76 104.1%    0+0k 36+3977io 0pf+0w
    tmpfs: 3.255u 4.341s 0:07.13 106.4%    0+0k 0+1io 0pf+0w

- extract some etexts from a tar file (a few big files)

    mfs   used 20776 kB or  5194 pages (df said  9379 kB used)
    tmpfs used  9108 kB or  2277 pages (df said  9108 kB used)

    mfs:   0.557u 0.309s 0:00.99  85.8%    0+0k 3+2566io 0pf+0w
    tmpfs: 0.619u 0.144s 0:00.76  98.6%    0+0k 0+0io 0pf+0w

- extract some pkgsrc directories from a tar file (lots of little files)

    mfs   used 79292 kB or 19823 pages (df said 24991 kB used)
    tmpfs used 54060 kB or 13515 pages (df said 54060 kB used)

    mfs:   1.696u 4.975s 0:07.86  84.7%    0+0k 215+79409io 0pf+0w
    tmpfs: 1.269u 4.139s 0:05.41  99.6%    0+0k 0+0io 0pf+0w

> Two interesting points:
> 
>  1- tmpfs is the obvious winner in terms of memory used.
> 
>  2- mfs lies a little about how much memory is actually used (vis
>     the df figure vs the amount of actual memory used).

and:

   3- faster!

Simon.
--
Simon Burge                            <simonb@wasabisystems.com>
NetBSD Support and Service:         http://www.wasabisystems.com/