Where does the tmpfs
file system reside? In RAM or swap?
-
2en.wikipedia.org/wiki/Tmpfs– slm ♦Jul 27, 2018 at 17:31
-
5The answer is yes.– Kusalananda ♦Jul 27, 2018 at 17:32
-
4There's no request for learning materials here that I can see.– JdeBPJul 27, 2018 at 18:32
-
2Strictly speaking, neither. It resides in the page cache, and those pages will get swapped out just like any other 'dirty' pages do when there's memory pressure.– Austin HemmelgarnJul 27, 2018 at 19:18
1 Answer
tmpfs
filesystems (and thus devtmpfs
filesytems) are implemented in Linux as essentially parts of the file and directory caches that have no persistent backing storage. The file data are, unlike ramfs
filesystems, swappable however. So the file data can be either in physical RAM or held on a swap volume on a disc.
Note the plural, by the way. It is possible, and indeed usual with systems like the nosh system-manager
and systemd, to have multiple tmpfs
filesystems.
Further reading
- https://superuser.com/a/894468/38062
- Jonathan de Boyne Pollard (2018).
system-manager
. nosh Guide. Softwares. - Linus Torvalds et al. (2005).
Documentation/filesystems/tmpfs.txt
. Linux. GitHub. - Rob Landley et al. (2005).
Documentation/filesystems/ramfs-rootfs-initramfs.txt
. Linux. GitHub.