-1

I have a swap of 64 GB SSD. So is there a way to make /tmp mounted as tmpfs to use swap alone and not use RAM?

closed as unclear what you're asking by HBruijn, womble, kasperd, Jenny D, Cristian Ciupitu Aug 25 '15 at 16:16

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Sounds like too much work. Besides, tmpfs will automatically be swapped out if necessary, so you don't need to do anything. If this isn't sufficient, why not just put /tmp on the SSD? – Michael Hampton Aug 20 '15 at 4:51
  • 4
    Uhm... tmpfs entirely on swap is generally called "a disk partition". – womble Aug 20 '15 at 5:53
  • @womble Actually not. That will also get cached in memory. – kasperd Aug 21 '15 at 8:32
  • That is true. Not using RAM is actually rather tricky on a computer system... – womble Aug 21 '15 at 21:54
10

I'm not quite clear what you're asking. tmpfs is an in-memory filesystem but you apparently don't want the contents of /tmp to actually reside in memory, is that right?

Then you simply don't use tmpfs and instead use an ordinary on-disk /tmp directory or dedicated partition with a normal file-system.

  • 2
    It might be added that even a mounted disk filesystem will take up some memory by using the block cache. – Tilman Schmidt Aug 20 '15 at 7:21

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