2 .\" Copyright (c) 2007 Xin LI
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" 3. The name of the author may not be used to endorse or promote products
14 .\" derived from this software without specific prior written permission
16 .\" THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .\" $FreeBSD: src/share/man/man5/tmpfs.5,v 1.7 2010/01/29 15:11:50 jh Exp $
34 .Nd "efficient memory file system"
36 To compile this driver into the kernel,
37 place the following line in your
38 kernel configuration file:
39 .Bd -ragged -offset indent
43 Alternatively, to load the driver as a
44 module at boot time, place the following line in
46 .Bd -literal -offset indent
50 The following options are available when
54 .Bl -tag -width indent
60 permissions in octal format.
62 maximum number of inodes.
64 maximum size for the file system.
66 maximum file size of the file system.
73 filesystems are backed by swap space.
74 Only memory pressure will cause data to be backed to swap.
75 Normal filesystem operations such as
77 buffer cache flushing, and vnode recycling have no effect.
80 stores meta-data in wired kernel memory.
81 Meta-data is not backed by swap so care must be taken if using
83 to store large numbers of small files.
85 It is recommended that a large amount of swap space be reserved on modern
87 platforms to accommodate
90 32-bit kernels can accommodate 32G of swap by default while 64-bit kernels
91 can accommodate 512G of swap by default.
92 These defaults can be increased though it should be noted that 32-bit
93 kernels are ultimately limited by the amount of KVM available in its
94 small 32-bit address space.
97 will allocate and deallocate swap backing store on the fly based on usage.
100 allows up to 100% of swap space to be used.
101 If this is not desirable then the size option should be used to limit
104 Every option that accepts a numerical value as its argument can take a
107 to indicate bytes (the default), a trailing
109 to indicate kilobytes, a trailing
111 to indicate megabytes or a trailing
113 to indicate gigabytes.
114 Note that both lowercase and uppercase forms of these letters are allowed.
120 .Dl "mount -t tmpfs tmpfs /tmp"
128 driver first appeared in
134 kernel implementation was written by
135 .An Julio M. Merino Vidal Aq jmmv@NetBSD.org
136 as a Google SoC project.
139 and others ported it from
145 and others ported it from
150 This manual page was written by
151 .An Xin LI Aq delphij@FreeBSD.org .