diff options
Diffstat (limited to 'static/freebsd/man4/tmpfs.4 3.html')
| -rw-r--r-- | static/freebsd/man4/tmpfs.4 3.html | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/static/freebsd/man4/tmpfs.4 3.html b/static/freebsd/man4/tmpfs.4 3.html new file mode 100644 index 00000000..dbb7fc9d --- /dev/null +++ b/static/freebsd/man4/tmpfs.4 3.html @@ -0,0 +1,158 @@ +<table class="head"> + <tr> + <td class="head-ltitle">TMPFS(4)</td> + <td class="head-vol">Device Drivers Manual</td> + <td class="head-rtitle">TMPFS(4)</td> + </tr> +</table> +<div class="manual-text"> +<section class="Sh"> +<h1 class="Sh" id="NAME"><a class="permalink" href="#NAME">NAME</a></h1> +<p class="Pp"><code class="Nm">tmpfs</code> — <span class="Nd">in-memory + file system</span></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYNOPSIS"><a class="permalink" href="#SYNOPSIS">SYNOPSIS</a></h1> +<p class="Pp">To compile this driver into the kernel, place the following line + in your kernel configuration file:</p> +<div class="Bd Pp Bd-indent"><code class="Cd">options TMPFS</code></div> +<p class="Pp">Alternatively, to load the driver as a module at boot time, place + the following line in <a class="Xr">loader.conf(5)</a>:</p> +<div class="Bd Pp Bd-indent Li"> +<pre>tmpfs_load="YES"</pre> +</div> +</section> +<section class="Sh"> +<h1 class="Sh" id="DESCRIPTION"><a class="permalink" href="#DESCRIPTION">DESCRIPTION</a></h1> +<p class="Pp">The <code class="Nm">tmpfs</code> driver implements an in-memory, + or <code class="Nm">tmpfs</code> file system. The filesystem stores both + file metadata and data in main memory. This allows very fast and low latency + accesses to the data. The data is volatile. An umount or system reboot + invalidates it. These properties make the filesystem's mounts suitable for + fast scratch storage, like <span class="Pa">/tmp</span>.</p> +<p class="Pp">If the system becomes low on memory and swap is configured (see + <a class="Xr">swapon(8)</a>), the system can transfer file data to swap + space, freeing memory for other needs. Metadata, including the directory + content, is never swapped out by the current implementation. Keep this in + mind when planning the mount limits, especially when expecting to place many + small files on a tmpfs mount.</p> +<p class="Pp">When <a class="Xr">mmap(2)</a> is used on a file from a tmpfs + mount, the swap VM object managing the file pages is used to implement + mapping and avoid double-copying of the file data. This quirk causes process + inspection tools, like <a class="Xr">procstat(1)</a>, to report anonymous + memory mappings instead of file mappings.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="OPTIONS"><a class="permalink" href="#OPTIONS">OPTIONS</a></h1> +<p class="Pp">The following options are available when mounting + <code class="Nm">tmpfs</code> file systems:</p> +<dl class="Bl-tag"> + <dt id="easize"><a class="permalink" href="#easize"><code class="Cm">easize</code></a></dt> + <dd>Set the maximum memory size used by extended attributes in bytes. The + default is 16 megabytes.</dd> + <dt id="export"><a class="permalink" href="#export"><code class="Cm">export</code></a></dt> + <dd>Accept the <code class="Cm">export</code> option for compatibility with + <a class="Xr">nfsv4(4)</a>. This option does nothing.</dd> + <dt id="gid"><a class="permalink" href="#gid"><code class="Cm">gid</code></a></dt> + <dd>Set the group ID of the root inode of the file system. The default is the + mount point's GID.</dd> + <dt id="inodes"><a class="permalink" href="#inodes"><code class="Cm">inodes</code></a></dt> + <dd>Set the maximum number of nodes available to the file system. If not + specified, the file system chooses a reasonable maximum based on the file + system size, which can be limited with the <code class="Cm">size</code> + option.</dd> + <dt id="maxfilesize"><a class="permalink" href="#maxfilesize"><code class="Cm">maxfilesize</code></a></dt> + <dd>Set the maximum file size in bytes. The default is the maximum possible + value.</dd> + <dt id="mode"><a class="permalink" href="#mode"><code class="Cm">mode</code></a></dt> + <dd>Set the mode (in octal notation) of the root inode of the file system. The + default is the mount point's mode.</dd> + <dt id="nomtime"><a class="permalink" href="#nomtime"><code class="Cm">nomtime</code></a></dt> + <dd>Disable the tracking of mtime updates caused by writes to the shared + mapped areas backed by <code class="Nm">tmpfs</code> files. This option + removes periodic scans, which downgrade read-write-mapped pages to + read-only to note the writes.</dd> + <dt id="nonc"><a class="permalink" href="#nonc"><code class="Cm">nonc</code></a></dt> + <dd>Do not use namecache to resolve names to files for the created mount. This + saves memory, but currently might impair scalability for highly used + mounts on large machines.</dd> + <dt id="nosymfollow"><a class="permalink" href="#nosymfollow"><code class="Cm">nosymfollow</code></a></dt> + <dd>Do not follow <a class="Xr">symlink(7)</a>'s on the mounted file + system.</dd> + <dt id="pgread"><a class="permalink" href="#pgread"><code class="Cm">pgread</code></a></dt> + <dd>Enable pgcache read for the mount.</dd> + <dt id="size"><a class="permalink" href="#size"><code class="Cm">size</code></a></dt> + <dd>Set the total file system size in bytes, unless suffixed with one of k, m, + g, t, or p, which denote byte, kilobyte, megabyte, gigabyte, terabyte and + petabyte respectively. If zero (the default) or a value larger than + SIZE_MAX - PAGE_SIZE is given, the available amount of memory (including + main memory and swap space) will be used.</dd> + <dt id="uid"><a class="permalink" href="#uid"><code class="Cm">uid</code></a></dt> + <dd>Set the user ID of the root inode of the file system. The default is the + mount point's UID.</dd> + <dt id="union"><a class="permalink" href="#union"><code class="Cm">union</code></a></dt> + <dd>Refer to <a class="Xr">mount(8)</a>.</dd> +</dl> +</section> +<section class="Sh"> +<h1 class="Sh" id="SYSCTL_VARIABLES"><a class="permalink" href="#SYSCTL_VARIABLES">SYSCTL + VARIABLES</a></h1> +<p class="Pp">The following <a class="Xr">sysctl(8)</a> variables are + available:</p> +<dl class="Bl-tag"> + <dt id="vfs.tmpfs.memory_percent"><var class="Va">vfs.tmpfs.memory_percent</var></dt> + <dd>The percentage of memory plus swap space available at kernel file system + initialization that can be used by a file system with a size of 0. When + this amount of space in use is reached, new files cannot be created and + files cannot be extended. The default is 95%. Changing this value also + changes <var class="Va">vfs.tmpfs.memory_reserved</var>.</dd> + <dt id="vfs.tmpfs.memory_reserved"><var class="Va">vfs.tmpfs.memory_reserved</var></dt> + <dd>The currently-reserved amount of memory plus swap space based on the + memory percentage. The minimum is compiled into the system, and defaults + to 4 MB.</dd> +</dl> +</section> +<section class="Sh"> +<h1 class="Sh" id="EXAMPLES"><a class="permalink" href="#EXAMPLES">EXAMPLES</a></h1> +<p class="Pp">Mount a <code class="Nm">tmpfs</code> memory file system:</p> +<p class="Pp"></p> +<div class="Bd Bd-indent"><code class="Li">mount -t tmpfs tmpfs + /tmp</code></div> +<p class="Pp">Configure a <code class="Nm">tmpfs</code> mount via + <a class="Xr">fstab(5)</a>:</p> +<div class="Bd Pp Bd-indent Li"> +<pre>tmpfs /tmp tmpfs rw 0 0</pre> +</div> +</section> +<section class="Sh"> +<h1 class="Sh" id="SEE_ALSO"><a class="permalink" href="#SEE_ALSO">SEE + ALSO</a></h1> +<p class="Pp"><a class="Xr">procstat(1)</a>, <a class="Xr">mmap(2)</a>, + <a class="Xr">nmount(2)</a>, <a class="Xr">unmount(2)</a>, + <a class="Xr">fstab(5)</a>, <a class="Xr">mdmfs(8)</a>, + <a class="Xr">mount(8)</a>, <a class="Xr">swapinfo(8)</a>, + <a class="Xr">swapon(8)</a></p> +</section> +<section class="Sh"> +<h1 class="Sh" id="HISTORY"><a class="permalink" href="#HISTORY">HISTORY</a></h1> +<p class="Pp">The <code class="Nm">tmpfs</code> driver first appeared in + <span class="Ux">FreeBSD 7.0</span>.</p> +</section> +<section class="Sh"> +<h1 class="Sh" id="AUTHORS"><a class="permalink" href="#AUTHORS">AUTHORS</a></h1> +<p class="Pp">The <code class="Nm">tmpfs</code> kernel implementation was + written by <span class="An">Julio M. Merino Vidal</span> + <<a class="Mt" href="mailto:jmmv@NetBSD.org">jmmv@NetBSD.org</a>> as a + Google Summer of Code project.</p> +<p class="Pp"><span class="An">Rohit Jalan</span> and others ported it from + <span class="Ux">NetBSD</span> to <span class="Ux">FreeBSD</span>.</p> +<p class="Pp">This manual page was written by <span class="An">Xin LI</span> + <<a class="Mt" href="mailto:delphij@FreeBSD.org">delphij@FreeBSD.org</a>>.</p> +</section> +</div> +<table class="foot"> + <tr> + <td class="foot-date">September 18, 2023</td> + <td class="foot-os">FreeBSD 15.0</td> + </tr> +</table> |
