Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've got a Centos 5.7 running Magento with nginx. I also got there 10GB of Swap. But the os never use it. How can i make it work?

share|improve this question
    
Begin running out of RAM and CentOS will start using it. Although at that point you may have some problems... –  qweet Feb 27 '12 at 9:47
    
You don't EVER want to use your swap, it is a safety net when you run out of RAM, nothing more. –  Ben Lessani - Sonassi Mar 12 '12 at 0:09

2 Answers 2

up vote 3 down vote accepted

This article about swap from Tony Kay in the Linux Journal is the best I've ever read on the subject: http://www.linuxjournal.com/article/10678

If you're interested to know the details of how swap space is used, you should give it a read.

share|improve this answer

It's not because you have swap it will automatically be used. It has been reported as a bug before on centos 6, but it was ruled as not a bug. You only need to be concerned when your memory is full, and your swap is not being used. At that point, as stated by qweet, you will have some bigger problems to worry about.

The OS knows when to use swap.

share|improve this answer
2  
The OS is smart enough to know when it makes sense to use swap and when not to. If you think you know better, you can turn up the swappiness. –  David Schwartz Feb 27 '12 at 10:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.