General discussion

Locked

Swap is not useing

By vijay_kar ·
If I say free when system boots it show 0% useage of swap.
How to make use of swap?

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Swap is not useing

by cpfeiffe In reply to Swap is not useing

This is actually a good thing. Not using swap means you still have free RAM. swap will be utilized when you are out of RAM. Process data will be swapped out of RAM and to disk memory (swap) when new processes need to load their data into RAM. Then processes will continue to swap data in out of RAM/swap as it is needed (data can only be processed in RAM, but it can be idle in swap). The only problem with having 0% swap usage is if you have allocated too much swap space and you don't want towaste this disk space. The general recommendation in unix is for swap to be at least the size of RAM (because of how some applications reserve memory) and if you are allowing dumps on your system you should have enough space for the dumps as well.Usually 2 X RAM is sufficient. This fits well on an average configuration, but the more RAM you have the less swap you need. If you have so much RAM that swap is never used for memory data then it only needs to be there for dumps (still needs to be equal to the amount of RAM you have for this to work). Basically, this is a good thing and if you've over-allocated then you want to reconfigure your disk to use less swap. Once you start using swap (instead of maintaining all data in RAM) your system will slow. I hope this was helpful.

Collapse -

Swap is not useing

by vijay_kar In reply to Swap is not useing

Poster rated this answer

Collapse -

Swap is not useing

by R.E.C. In reply to Swap is not useing

Make sure you actually have a swap partion/file available.
Type the command:
swapon -s
in a console to see if swap is availble.
If you have plenty of memory (RAM), you may not be using swap as the first response to your question stated.

If you don't have swap space set up, post another question on how to do this.

Collapse -

Swap is not useing

by vijay_kar In reply to Swap is not useing

Poster rated this answer

Collapse -

Swap is not useing

by vijay_kar In reply to Swap is not useing

This question was closed by the author

Back to Linux Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums