1 |
Iain Buchanan wrote: |
2 |
> Hi, |
3 |
> |
4 |
> over the last week or so I've noticed unusually large swap usage. I |
5 |
> usually hibernate this laptop and have uptimes up to 12 days so apps can |
6 |
> run for a long time. I don't usually use any swap space (except for a |
7 |
> few k). |
8 |
> |
9 |
> If I swapoff and swapon, the usage falls back to zero but then creeps up |
10 |
> again over a few days. |
11 |
> |
12 |
> $ free -m |
13 |
> total used free shared buffers cached |
14 |
> Mem: 3040 859 2181 0 38 415 |
15 |
> -/+ buffers/cache: 406 2634 |
16 |
> Swap: 494 431 62 |
17 |
> |
18 |
> nothing unusual there, except for the swap usage itself. 'top' doesn't |
19 |
> show any large apps. sorted by mem the top 4 are: |
20 |
> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND |
21 |
> 8318 iain 20 0 494m 150m 21m S 0 5.0 1:20.67 evolution |
22 |
> 20424 iain 20 0 342m 77m 30m S 0 2.5 0:01.84 firefox |
23 |
> 8009 root 20 0 83364 37m 6260 S 7 1.2 38:34.31 X |
24 |
> 8090 iain 20 0 159m 32m 1600 S 1 1.1 3:48.08 skype |
25 |
> |
26 |
> Hm, I just noticed Mem is in %. % of what? % total or % used? Even if |
27 |
> it was % of total RAM that could be as much as 152Mb for evo and 76Mb |
28 |
> for firefox. Not that much really. |
29 |
> |
30 |
> any ideas? |
31 |
> |
32 |
> thanks :) |
33 |
> |
34 |
|
35 |
|
36 |
I ran into this a while back and noticed that a setting got changed and |
37 |
I didn't know about it. Still no idea what changed it but you can |
38 |
check the setting with this: |
39 |
|
40 |
root@smoker / # cat /proc/sys/vm/swappiness |
41 |
20 |
42 |
root@smoker / # |
43 |
|
44 |
The lower the number, the less often it will use swap. I have swap on |
45 |
some slow drives and 2Gbs of ram so I don't want swap used unless it |
46 |
will keep me from crashing. You can use echo to change the setting and |
47 |
I actually added this to rc.conf to set it at bootup: |
48 |
|
49 |
echo 20 > /proc/sys/vm/swappiness |
50 |
|
51 |
May not be the problem but worth checking into at least. |
52 |
|
53 |
Dale |
54 |
|
55 |
:-) :-) |