tmpfs
tmpfs is a Linux filesystem whose contents reside in virtual memory and may use swap unless swapping is disabled for that mount.
The filesystem grows with its contents; size is an allocation ceiling, not reserved RAM. The separate nr_inodes limit can be exhausted even when byte capacity remains. Unmounting discards the files. [2] [1]
The noswap mount option, available since Linux 6.4, disables swapping for that instance. It does not change every internal shared-memory object or other tmpfs mount. Swap use does not turn a temporary filesystem into persistent file storage. [2] [1]
Relations
- related
- Linux memfd_create, Memory-mapped file, Page cache, zram, zswap
Citations
- Linux 6.12: tmpfs, swap and per-mount limits
- Linux man-pages: tmpfs(5), dynamic allocation and noswap
Sources & caveats
- Source synthesis checked against Linux 6.12 documentation; noswap introduction checked in tmpfs(5).
- No swapping, memory-pressure benchmark or reboot experiment was performed for this definition.