Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Fri Jan 21, 2011 7:30 am 
Offline
Senior Member

Joined: Tue Dec 07, 2010 10:18 am
Posts: 65
Code:
[root@linode ~]# free -m
             total       used       free     shared    buffers     cached
Mem:           498        442         56          0         25        119
-/+ buffers/cache:        297        200
Swap:          511        125        386


I am on 512 linode hosting around 30 websites and email domains. Average bandwdith usage is 1GB per day.

Can someone tell me why swap space is used when free and cached memory is available?


Is amavisd being used for all incoming/outgoing emails?


Thanks
Richard


Top
   
 Post subject:
PostPosted: Fri Jan 21, 2011 10:03 am 
Offline
Senior Member

Joined: Fri Feb 18, 2005 4:09 pm
Posts: 594
There is a Linux kernel tuning parameter for swapping, amusingly and aptly name "swappiness", that is discussed here:

http://kerneltrap.org/node/3000

and here:

https://help.ubuntu.com/community/SwapFaq

I have swappiness on my linode set to 100, which works well for me. Even with the parameter set to zero, some swapping will still occur.

James


Top
   
 Post subject:
PostPosted: Fri Jan 21, 2011 12:28 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
The logic is that unused or seldom-used RAM is wasted RAM. The kernel will swap out stuff that isn't actively used, and use the freed RAM for caching and other useful things.

There should be a net performance gain, unless you have a strange usage pattern, in which case adjusting swappiness can help.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group