Swap partition not used?

Toomas Aas toomas.aas at raad.tartu.ee
Sun Dec 12 15:06:37 PST 2004

Simon Burke wrote:

> After a while of using 5.3RELEASE, i have noticed a small problem, my
> swap partition isnt getting used. Well its not a small problem
> considering that i have only 256mb ram on this machine.
> boredom# swapctl -l
> Device:       1024-blocks     Used:
> /dev/ad0s1b      482112        56
> this i suppose shows that some of it is used but the amount used never
> increases. I'm currently using 100% memory (installing openoffice from
> ports, finally).

Do you get any system error messages indicating that something is 
running out of memory? If not, I'd say everything is OK with your system 
- the swap is not used much because it simply isn't needed. The fact 
that 56 kB of swap is used seems to indicate that your system knows very 
well where it's swap is.

> I've tried using swapon -a to add it and it doesnt seem to have worked.

What do you mean by that? The swapctl output above shows that your swap 
partition is being used. You can't force your system to use more swap by 
issuing that command ;)

> Its also does not show in df -ha ,though i cant recall if it is
> supposed to be there. Though i dont think it has to be mounted?

No, the swap partition is not supposed to show up in output of df.

I'm also running a 5.3-STABLE box with 256 MB of RAM and at the moment 
the situation is like that:

premium# swapctl -l
Device:       1024-blocks     Used:
/dev/ad0s1b      524288         0

I'm not worried at all :)

More information about the freebsd-questions mailing list