SUMMARY: Swap Problems and Mounting /tmp as a true disk partition .....

From: Tis Unix <unixdocs72_at_yahoo.co.uk>
Date: Wed Jun 23 2004 - 11:31:12 EDT
Firstly I'd like to thank the following people -
 
Ric Anderson
Raymond Jackson
Frank Fiamingo
Reggie Beavers
David Livingstone
Gandalf el Gris
Darren Dunham
Rich Kulawiec
Sean McKay
Casper Dik
Terry Moore
Andrew Caines 
(Sorry if I have left anyone off, there were alot of you)  :-)
 
Basically we have come to the conclusion that we are running low on memory, which caused us to delve into /tmp for "virtual memory". This put a high strain on /tmp, and this is why I was seeing this change dynamically, and go up and down quite a lot with "percentage used" .... 
 
To fix the original swap problem, I ended up just rebooting. This fixed the problem and it has been good ever since. It's possible that over the pas 4 months (since the server was last rebooted) some processes may have died and not releasing memory, therefore very slowly draining our resources and adding to our problem. This is where a reboot would have been effective in clearing out any defunct processes that may have held onto some memory.   
 
After some feedback from you I decided not to go with mounting /tmp as a true disk partition, but to leave is as part of tmpfs. The main reason for this is that having /tmp mounted against swap as a tmpfs filesystem improves speed of those applications that require alot of smaller tmp files. This is more than you realise !!!
 
What I did do though is put the following entry in vfstab to limit the amount of data that people can write to /tmp, hence clogging it up to be used for swapping -
 
swap    -       /tmp    tmpfs   -       yes     size=256m
 
I made the limit 256mb, which is an eighth of the total swap configured.
 
The other change I made was that I added 2gb of additional swap in the form of a file. I would have preferred to have had this as physical disk, ie an additional slice of disk for swap, but we had no spare slices left. This was the command I used to add this swap file of 2gb-
 
# mkfile 2000m /dir/swap
# swap -a /dir/swap
 
You need to run the mkfile first to create the file then use the swap -a to add the swap file. To make the change permanent to the system, add this line to /etc/vfstab
 
/dir/swap       -       -       swap    -       no      -
 
Thanks to everyone who took time out to email me their valuable opinions. It did help alot.
 
Thanks
Tis
 
Original Post -

Tis Unix <unixdocs72@yahoo.co.uk> wrote:
Hi All,

Just wanted your opinion on mounting /tmp as a true disk partition (instead of tmpfs, which is part of memory) .... Have many of you done this and why did you do it ?

Some of you may have seen earlier posts from me, but I had alot of trouble with swap earlier, and /tmp increasing and decreasing in size alot.

It has been suggested to comment out the following line in /etc/vfstab -

swap - /tmp tmpfs - yes -

And we currently have this in our /etc/vfstab -

/dev/md/dsk/d5 - - swap - no -

To mount /tmp as a disk partition would I then change this line to ? -

/dev/md/dsk/d5 /dev/md/rdsk/d5 /tmp ufs yes -

Thanks in adance for your help .....
Tis



---------------------------------
ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself 
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


		
---------------------------------
 ALL-NEW Yahoo! Messenger - sooooo many all-new ways to express yourself 
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Wed Jun 23 11:31:39 2004

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:31 EST