Where does the tmpfs file system reside? In RAM or swap?

  • 2
    en.wikipedia.org/wiki/Tmpfs – slm Jul 27 '18 at 17:31
  • 4
    The answer is yes. – Kusalananda Jul 27 '18 at 17:32
  • 4
    There's no request for learning materials here that I can see. – JdeBP Jul 27 '18 at 18:32
  • 2
    Strictly 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 Hemmelgarn Jul 27 '18 at 19:18

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.