Iain Buchanan wrote:
Hi,

over the last week or so I've noticed unusually large swap usage.  I
usually hibernate this laptop and have uptimes up to 12 days so apps can
run for a long time.  I don't usually use any swap space (except for a
few k).

If I swapoff and swapon, the usage falls back to zero but then creeps up
again over a few days.

$ free -m
              total       used       free     shared    buffers     cached
Mem:          3040        859       2181          0         38        415
-/+ buffers/cache:        406       2634
Swap:          494        431         62

nothing unusual there, except for the swap usage itself.  'top' doesn't
show any large apps.  sorted by mem the top 4 are:
   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
  8318 iain      20   0  494m 150m  21m S    0  5.0   1:20.67 evolution
20424 iain      20   0  342m  77m  30m S    0  2.5   0:01.84 firefox
  8009 root      20   0 83364  37m 6260 S    7  1.2  38:34.31 X
  8090 iain      20   0  159m  32m 1600 S    1  1.1   3:48.08 skype

Hm, I just noticed Mem is in %.  % of what?  % total or % used?  Even if
it was % of total RAM that could be as much as 152Mb for evo and 76Mb
for firefox.  Not that much really.

any ideas?

thanks :)


I ran into this a while back and noticed that a setting got changed and I didn't know about it. Still no idea what changed it but you can check the setting with this:

r...@smoker / # cat /proc/sys/vm/swappiness
20
r...@smoker / #

The lower the number, the less often it will use swap. I have swap on some slow drives and 2Gbs of ram so I don't want swap used unless it will keep me from crashing. You can use echo to change the setting and I actually added this to rc.conf to set it at bootup:

echo 20 > /proc/sys/vm/swappiness

May not be the problem but worth checking into at least.

Dale

:-)  :-)

Reply via email to