Ramdisk size for tmpfs

General support questions

Ramdisk size for tmpfs

Postby Nentoos » 2012/02/17 22:39:27

Hi Peoples,

i have a question.
I have a system with 16GB RAM und the /etc/fstab have the following content:

none /tmp tmpfs defaults 0 0

This is for Ram drive an it take as standard 50% from the avaiable size.
And i now how can i fix it:
none /tmp tmpfs defaults,size=424m 0 0

My question is what is the best size for it.
It is a Web Server with 12 Domains.

Now it is 8GB and i think it is a little to big.
Sorry for my bad english ;)
And thanks for replays
Nentoos
 
Posts: 2
Joined: 2012/02/17 22:28:17

Ramdisk size for tmpfs

Postby pschaff » 2012/02/17 23:26:55

Welcome to the CentOS fora. Please see the recommended reading for new users linked in my signature.

Your question is quite clear, the answer less so. There is no "best" size. I'd suggest monitoring usage, and if it is filling up, then increase the size. You could use a cron job to check it periodically and write to a log, or just do it manually. Be careful as bad things can happen if it fills up.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Ramdisk size for tmpfs

Postby TrevorH » 2012/02/18 00:56:39

It doesn't actually use any space unless something is writing to it. The RAM is not committed until it's written to and when it is, then it's swappable anyway. However, monitoring it is a good way to find out. In all the installs I've done, the default set up is not configured for anything to use it, you have to explicitly point things at it to get it used.
User avatar
TrevorH
Forum Moderator
 
Posts: 9071
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Ramdisk size for tmpfs

Postby Nentoos » 2012/02/18 08:07:05

Ok thanks a lot for your answers.
I will log it with a cron job every 24 h.

I think this the best way.

Thanks a lot.
Nentoos
 
Posts: 2
Joined: 2012/02/17 22:28:17

Re: Ramdisk size for tmpfs

Postby pschaff » 2012/02/18 12:15:12

I'd start with every hour or so to get a better idea of the trend.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America


Return to CentOS 6 - General Support

Who is online

Users browsing this forum: No registered users and 5 guests