TMPFS (Temporary Filesystem)

Introduction

TmpFS was first developed by Julio M. Merino Vidal for NetBSD as a SoC project: Efficient memory file-system. Rohit Jalan ported it from NetBSD to FreeBSD. Now HowardSu and Glen Leeder (<glen.leeder AT nokia DOT com> ) and XinLi are working on it to continue this effort.

Using TMPFS

tmpfs is included in Release since 7-Release. A typical usage is use tmpfs as /tmp mount point.

  1. Change the /tmp mount point in /etc/fstab to:
    • tmpfs /tmp tmpfs rw,mode=777 0 0

  2. umount /tmp

  3. mount /tmp

TODO

Testing Status

Regression Testing

We port NetBSD regression test cases.

All tests successful.

POSIX Correctness Testing

All tests successful. Files=184, Tests=3353, 823 wallclock secs (29.94 cusr + 368.38 csys = 398.31 CPU)

Stress Testing

Survive after fsstress -n 10000 -p 50. Tested under AMD64/i386.

Any pressure testing in SMP box are highly welcomed.

Buildworld testing

We successfully build world to a tmpfs in 4-CPU box with -j32.

fsx Testing

fsx(tools/regression/fsx) is a tool to test the correctness of a filesystem read/write. It tests read, write, truncate, mmapread, mmapwrite, hole/extend write.

We passed fsx testing now.

Performance Testing

The vacache code is removed. sf_buf is used for data I/O. The performance will depends on sf_buf implementation in different platform. In Amd64, sf_buf is zero copy however i386 is not. So you will notice a performance difference.


CategoryStale

TMPFS (last edited 2022-09-19T01:33:53+0000 by KubilayKocak)