man.bsd.lv manual page server

Manual Page Search Parameters

TMPFS(5) File Formats Manual TMPFS(5)

tmpfsefficient memory file system

To compile this driver into the kernel, place the following line in your kernel configuration file:

options TMPFS

Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5):

tmpfs_load="YES"

The following options are available when mounting tmpfs file systems:
root group id.
root user id.
permissions in octal format.
maximum number of inodes.
maximum size for the file system.
maximum file size of the file system.

In the DragonFly implementation, tmpfs filesystems are backed by swap space. Only memory pressure will cause data to be backed to swap. Normal filesystem operations such as (), buffer cache flushing, and vnode recycling have no effect.

tmpfs stores meta-data in wired kernel memory. Meta-data is not backed by swap so care must be taken if using tmpfs to store large numbers of small files.

It is recommended that a large amount of swap space be reserved on modern DragonFly platforms to accommodate tmpfs and other subsystems. 32-bit kernels can accommodate 32G of swap by default while 64-bit kernels can accommodate 512G of swap by default. These defaults can be increased though it should be noted that 32-bit kernels are ultimately limited by the amount of KVM available in its small 32-bit address space.

tmpfs will allocate and deallocate swap backing store on the fly based on usage. By default tmpfs allows up to 100% of swap space to be used. If this is not desirable then the size option should be used to limit its size.

Every option that accepts a numerical value as its argument can take a trailing ‘b’ to indicate bytes (the default), a trailing ‘k’ to indicate kilobytes, a trailing ‘M’ to indicate megabytes or a trailing ‘G’ to indicate gigabytes. Note that both lowercase and uppercase forms of these letters are allowed.

To mount a tmpfs memory file system:

mount -t tmpfs tmpfs /tmp

fstab(5), mount_nfs(8), mount_tmpfs(8), swapcache(8)

The tmpfs driver first appeared in DragonFly 2.5.

The tmpfs kernel implementation was written by Julio M. Merino Vidal <jmmv@NetBSD.org> as a Google SoC project.

Rohit Jalan and others ported it from NetBSD to FreeBSD.

Naoya Sugioka and others ported it from NetBSD to DragonFly.

This manual page was written by Xin LI <delphij@FreeBSD.org>.

To mount NFS exported tmpfs DragonFly NFS client need to disable ReaddirPlus, see mount_nfs(8).

February 2, 2010 DragonFly-5.6.1