Using tmpfs in /tmp

I've been stalling moving /tmp to RAM ever since i first bought a SSD for my computer last year. Now when i finally got the energy i read a bit about it and it was almost too easy. Just add this line to fstab then restart or run mount -a and it should work.

tmpfs /tmp tmpfs defaults,nosuid,size=1024M,mode=1777 0 0

I'm pretty sure the mount options can be better tweaked. Here is an excerpt from the documentation.
tmpfs has three mount options for sizing:
size:      The limit of allocated bytes for this tmpfs instance. The 
default is half of your physical RAM without swap. If you
oversize your tmpfs instances the machine will deadlock
since the OOM handler will not be able to free that memory.
nr_blocks: The same as size, but in blocks of PAGE_CACHE_SIZE.
nr_inodes: The maximum number of inodes for this instance. The default
is half of the number of your physical RAM pages, or (on a
machine with highmem) the number of lowmem RAM pages,
whichever is the lower.

2 comments:

John said...

Are you a professional journalist? You write very well.

123 said...

http://remind.com.br/projetos/criar-blog-gratis/replicahandbags69/
http://remind.com.br/projetos/criar-blog-gratis/ureplicawatches/
http://remind.com.br/projetos/criar-blog-gratis/ureplicawatches1987/
http://replbags.livejournal.com/
http://replcawatche.livejournal.com/
http://repldbags.livejournal.com/
http://replica69bags.insanejournal.com/
http://replicabag242.livejournal.com/
http://replicacheap.21classes.com/weblogCategory/1951uut1lrg4t
http://replicacheap.ayubd.com/