View Full Version : Fedora 6 not using swap ?

28th October 2006, 02:42 PM
Ok, this is something I've also notice some time ago when I installed Knoppix :

If I run ksysquard an look at System Load the Phisical Memory graduallly gets used (1.5 G of Ram); on Swap Memory -- it's allways 0 . At first I liked this, but then I noticed that eventually ALL Ram is used (except for 50M) and NO Swap is used, then the system works very slow .

swapon -s
Filename Type Size Used Priority
/dev/mapper/VolGroup00-LogVol01 partition 2031608 0 -2

So, I do have a swap partition (or is it a file?), but it NEVER gets used, not even when I run out of RAM.
What can I do to force Fedora to use swap ?

28th October 2006, 02:48 PM
In reality, swap is only intended to be used when your system actually runs out of RAM. Swap is hard drive space that is used as virtual RAM.

Hard Drives are considerably slower than RAM, so you don't want your system to swap if at all possible. When you actually start using your Swap consisently, it's time to actually consider getting a RAM upgrade.

Unless your box is crashing, you probably don't need to use that swap space. And if your box does actually start using swap space, it's going to slow down even more than it is now. It has too, since reading data from the hard drive is considerably slower than from RAM.

Don't worry about not using Swap. In the end that is a very good thing. Hope my explanations helped.

P.S. Most of the ram used is likely being taken by the kernel anyway. And the kernel will gobble up as much as it can to function the best...however when an app comes along which needs RAM, the kernel will free up the RAM that it is taking. That is the reason that your RAM is running close to 0. It's likely just the kernel using whatever it can get it's hands on.

28th October 2006, 03:27 PM
Well, I do really know what swap is, and unless you have X times 2^32 bytes of Ram, where X is the number of procceses runnig, I can think of sittuations when you need swap (this is very funny, you see, because for the last 1/2 a year I've been cursing windows for still using swap even though I explicitly set it NOT to use swap, now I'm complainig Fedora does not use swap :D ).

No really, when I'm left with just 50M of ram, the sistem is basicall unusable (I can't download anyting, opening new prgrams takes forever etc. ).