I have 8GB of RAM and 4GB is dedicated to the tmpfs on /dev/shm.

There's nothing actually in /dev/shm, so I'm wondering, is this memory still available for applications to use?

If I needed to use 7GB in an application (which I do) would the tmpfs give up part of its allocated memory for this, or would I end up using swap after 4GB?


From Documentation/filesystems/tmpfs.txt:

tmpfs ... grows and shrinks to accommodate the files it contains and is able to swap unneeded pages out to swap space.

So unless you needed all 4GB of data stored in tmpfs at once, you would get as much RAM for your applications as feasible.

|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.