tmpfs?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users tmpfs?
# 1  
Old 06-03-2012
tmpfs?

hi

I'm just wondering, when you use tmpfs on your machines: servers & clients?
# 2  
Old 06-03-2012
tmpfs is used in cases where you want to save temporary data which you do not want to be persistent over a reboot. Solaris uses tmpfs for /tmp.
This User Gave Thanks to admin_xor For This Post:
# 3  
Old 06-03-2012
Thx, but are you using tmpfs on your machines with unix and linux, installed on a really small storage devices, or when doesn't need to be persistent over a reboot?
# 4  
Old 06-03-2012
tmpfs is not a persistent storage solution. But, not to forget, it takes space from swap area too when there's a shortage of real memory. I have seen it's used on some *BSD based firewalls to store configs, logs, etc. which do not need to be available after a reboot.

What makes you interested in tmpfs? Maybe I can help.
This User Gave Thanks to admin_xor For This Post:
# 5  
Old 06-03-2012
Quote:
Originally Posted by admin_xor
What makes you interested in tmpfs? Maybe I can help.
Thx again, I'll install a minimal Linux (Debian) with LXDE on a thin client with 2GB CompactFlash (CF) and 1GB RAM. Should I use tmpfs for /tmp, /var/(log,run,lock)?
# 6  
Old 06-03-2012
If you are sure that you do not want to keep the log files for reviewing, you may go ahead with making /var/log as tmpfs. /var/run is one of the directories which need to be cleared during boot time. Files in /var/lock get deleted while stopping the services. So you are good to go for making these as tmpfs.

One thing I would suggest you that you put a size limit to these directories, especially /tmp with "size" mount option in /etc/fstab. Otherwise, you will find yourself out of memory if something dumps huge files in /tmp.

In my estimation, 2-5MB for /var/run, 2MB for /var/lock, 15-20MB for /var/log and 10MB for /tmp is more than enough for a box with considerable workload. It should suffice for a thin client.

Best of luck!
This User Gave Thanks to admin_xor For This Post:
# 7  
Old 06-03-2012
Quote:
Originally Posted by admin_xor
One thing I would suggest you that you put a size limit to these directories, especially /tmp with "size" mount option in /etc/fstab. Otherwise, you will find yourself out of memory if something dumps huge files in /tmp.

In my estimation, 2-5MB for /var/run, 2MB for /var/lock, 15-20MB for /var/log and 10MB for /tmp is more than enough for a box with considerable workload. It should suffice for a thin client.
Thx a lot, it helps, but how to put size limit, for example to /tmp with "size" mount option in /etc/fstab?
Perhaps something like:
Code:
tmpfs       /tmp      tmpfs      rw,size=10m    0     0


Last edited by ccc; 06-03-2012 at 08:29 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SWAP and TMPFS on Solaris8

hi, With Solaris 8. after I enter df -k, I see 2 lines of SWAP; one is mounted on /var/run while the other is on /tmp. I remembered that I set up only 1 swap during the installation. Then, a Solaris Admin book says that the TMPFS fils system is a new feature. Can someone please share... (7 Replies)
Discussion started by: andrec
7 Replies
Login or Register to Ask a Question