On Tue, Oct 26, 2010 at 8:49 AM, Iain Buchanan <email@example.com> wrote:
> 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
Looking at above values 494MB does not seem to be enough for
hibernation. Do you add extra swap or close some apps before
If your system trying to fill up your swap while you have more than
2GB of main memory available, only thing I can think of is your
swapiness is set very high. You check and alter is as follows
$ cat /proc/sys/vm/swappiness
# echo N > /proc/sys/vm/swappiness
where N is a value between 0 and 100. Higher number means more
swapping. If I had 3GB of ram I would set it to something closer to 0
or even 0 if I am just gonna use it for hibernation.
> 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.
% of total main memory excluding swap because its rather difficult to
take it into account.
3040*0.05 = 152 evolution
> any ideas?
You can try to view swap usage on top by pressing f then p and enter
and sort by it by F then P and enter. The values wont be very
realistic though. Alternatively you could try is to compare resident
memory usages before and after swapoff.
Given the mem usage of your apps, total mem usage looks normal. What
does not seem normal is that swap inclined mem usage. Seriously take a
look at your swapiness value. The default value cannot be right every
> Iain Buchanan <iaindb at netspace dot net dot au>
> Chuck Norris once skewered a man with the Eiffel tower.