1 |
Hello all, |
2 |
|
3 |
Grant wrote: |
4 |
> Also, I've noticed in top that when my server's 2GB of memory is |
5 |
> filled, it uses a small amount of swap (~24k) before it frees some up. |
6 |
> The "Swap: 24k" then remains. Is that normal? |
7 |
|
8 |
Yes I have also notice that after a heavy ram use I get this tiny |
9 |
space used on my swap. And it remains even after my ram has been half freed. |
10 |
My box has 1GB of ram and the small amount I sometime get on swap is |
11 |
164KB and it can stay like that for 2 weeks, until i reboot. |
12 |
But I assume rebooting is not a great solution for a server :=) |
13 |
|
14 |
Writing to disk is too expensive as Pablo Antonio suggested, so once swap |
15 |
has been used it won't be cleaned until next use, but how to be sure |
16 |
it is cleaned at next use ? |
17 |
|
18 |
Anyway if you want to have stats on the usage of your memory you can use 'free' |
19 |
but for a long-period log I would recommend 'vmstat' as it puts everything on one |
20 |
line so you could gnuplot it later. |
21 |
|
22 |
vmstat | grep -v [a-z] >> memory.log |
23 |
|
24 |
|
25 |
As Daniel Iliev suggested, there is the configurable sysctl for swap control |
26 |
solutions. The variables vm.swappiness and the vm.swap_token_timeout which |
27 |
control the "trashing behavior". I didn't really find much info on vm.swap_token_timeout. |
28 |
|
29 |
The man is not very extensive. |
30 |
Has Anyone more info on configuration of the file /etc/sysctl.conf ? |
31 |
especially for : |
32 |
vm.swappiness |
33 |
vm.swap_token_timeout |
34 |
|
35 |
If we get a solution or just some more info, |
36 |
it would be nice to have a wiki page about it, wouldn't it ? ;) |
37 |
|
38 |
Have a Good Day, |
39 |
Red. |
40 |
|
41 |
----------------------------------------+ |
42 |
MAGELLIUM @ http://www.magellium.fr/ |
43 |
----------------------------------------+ |
44 |
|
45 |
-- |
46 |
gentoo-user@g.o mailing list |