LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Basic Question on having /tmp as tmpfs (https://www.linuxquestions.org/questions/linux-hardware-18/basic-question-on-having-tmp-as-tmpfs-4175648881/)

wearetheborg 02-23-2019 01:49 AM

Basic Question on having /tmp as tmpfs
 
I moved over my /tmp onto RAM as indicated here:
https://askubuntu.com/questions/1730...maximum-amount

Code:

tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,mode=1777 0 0
A couple of questions: if I do not give the size option, the size is set at half the RAM. I have 32GB ram. and /tmp gets 16GB. Does this mean I now only have 16GB for standard RAM purposes? That is, even if /tmp has 1GB data, will the other 15GB not be usable as "standard RAM" space?

The other question: in the above, there is "defaults" then other options. Do the options that follow override "defaults"?

pan64 02-23-2019 02:34 AM

Quote:

Originally Posted by wearetheborg (Post 5965822)
there is "defaults" then other options. Do the options that follow override "defaults"?

yes, it will take the default set of options and override the ones specified.

The real size of that tmpfs depends on the usage, I think it is dynamically allocated.

wearetheborg 02-23-2019 02:39 AM

Quote:

Originally Posted by pan64 (Post 5965833)
yes, it will take the default set of options and override the ones specified.

The real size of that tmpfs depends on the usage, I think it is dynamically allocated.

Thanks.
When I do df-h, it gives 16GB for /tmp

syg00 02-23-2019 02:49 AM

That's the default limit, not "size" as it applies to disk partitions. Read this

ondoho 02-23-2019 02:50 AM

Quote:

Originally Posted by wearetheborg (Post 5965822)
if I do not give the size option, the size is set at half the RAM. I have 32GB ram. and /tmp gets 16GB. Does this mean I now only have 16GB for standard RAM purposes? That is, even if /tmp has 1GB data, will the other 15GB not be usable as "standard RAM" space?

no.


btw, mine looks like this:
Code:

grep /tmp /etc/mtab
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0

never had any problems with it.


All times are GMT -5. The time now is 12:39 PM.