SWAP being used even when RAM is available

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Level 1
Level 1
Posts: 2
Joined: Tue Oct 16, 2012 10:54 am

SWAP being used even when RAM is available

Postby sepultura90 » Sat Dec 01, 2012 6:30 pm

I want to disable caching if that is what resonsible (if not I still want to disable it) and I want to make the SWAP only be used when I run out of RAM

User avatar
Level 24
Level 24
Posts: 21643
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: SWAP being used even when RAM is available

Postby xenopeek » Sat Dec 01, 2012 6:36 pm

You can reduce the swappiness setting, and this will delay using of swap till there is less free memory available: http://community.linuxmint.com/tutorial/view/998. By default the kernel swaps early, so there is always a larger amount of free memory available--handy when you start a new application or load a big file, as it won't have to swap first as that was already done earlier. Reducing swappiness makes the kernel wait longer, so if you start that new application or load that big file it may take a little longer as it may have to swap first to make the needed free memory available.

As for caching and buffering, don't concern yourself with that. Read this for understanding how you and the Linux kernel speak different languages on that: http://www.linuxatemyram.com/

Return to “Newbie Questions”