Question about the swap file...???

Patrick Doyle wpdster at
Tue Jun 22 12:55:12 UTC 2010

On Tue, Jun 22, 2010 at 8:46 AM, Larry <larryesu at> wrote:
> *I've been watching my pc's CPU at times in is lower than at other time,
> I am guessing when it is performing  a task, it inscreases say from 16.5
> too 48, then drops back to a lower rate...But the Swap file shows  0%,
> all of the time, would this speed up things if the swap file would take
> the load away from the CPU at times...???
> If this is true, can someone suggest to me on how to get the swap to be
> used when it is needed...???
> Thanks for any help on this issue...
> Larry
> *

Hi Larry,
The swap file is space on your hard disk that is effectively "extra
memory" outside of the 2G, 4G, or whatever amount of RAM you have on
your motherboard.  Accessing a hard disk is orders of magnitude slower
than accessing RAM.  So the kernel tries very hard never to put things
into the swap file -- because it just slows everything down -- having
to write to the hard disk, having to read it back later when the data
are needed again, keeping track of what is stored where, etc...  This
is a very simplified explanation, but I hope it gives you the idea.

You asked "how to get the swap to be used when it is needed?"  The
answer is -- the kernel will use it when it is needed.  But if you
have enough RAM in your system, hopefully it will never be needed.


More information about the ubuntu-users mailing list