[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: swap not being used



martin f krafft <madduck@debian.org> writes:
>   mother:~# cat /proc/swaps
>   Filename                        Type            Size    Used    Priority
>   /dev/hda2                       partition       996020  0       -1
>
>   mother:~> free
>                total       used       free     shared    buffers     cached
>   Mem:        516580     475844      40736          0     170540     224736
>   -/+ buffers/cache:      80568     436012
>   Swap:       996020          0     996020
>
> now say i'll start openoffice and mozilla and a couple of others, just to
> consume RAM. the system will not use the swap space. any idea why not?

It doesn't need to.  It looks like you have 512 MB of physical RAM;
that's a lot, even if you are trying to run Mozilla.  :-)  What you've
posted suggests that (a) the kernel knows your swap space exists but
is intentionally ignoring it, and (b) you have about 436 MB of ~unused
RAM.  Until that looks like it's in danger of going, you're not going
to go into swap at all.

(I think the conventional wisdom of "swap should be twice physical
RAM" is clearly wrong these days; on machines with 256 MB or more of
RAM, I tend to do just fine without swap, unless I'm running a really
memory-hungry research compiler.  Besides, at 128 kbps, a gigabyte is,
what, 18 hours of Vorbis-encoded music?  :-)

-- 
David Maze         dmaze@debian.org      http://people.debian.org/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell



Reply to: