# Swap question.

## destroyedlolo

Hello,

My main system is an old Athlon 1.1 Ghz with 1.5 Go of RAM.

I installed LXDE on it, and mainly using Firefox, Gimp, Kino, Avidemux2, LibreOffice and obviously some C(++) compilation. In background, I have a website (Apache, PostgreSQL and PHP5) for development purposes.

All in all, my memory usage is b/w 20-30% in general and I never see Conky's RAM usage above 50%.

Currently, my figures are :

RAM usage : 320M (21%)

Buffers : 119 M

Cache : 1.01 G

But, why I have also 24 Mo used in my swap ?

Thanks

Laurent

----------

## Spinmc

AFAIK you should set some low value for vm.swappiness in your /etc/sysctl.conf

Try setting this value in console with 

```
sysctl -w vm.swappiness=1
```

 or another low value (1,2,...,10) when you'll  find yor desierd value, make it persistent putting vm.swappiness=<your-value> in /etc/sysctl.conf

Excuse me if I said trivial things that you already tried!

Ps. Excuse me for my english!

----------

## invasivenorman

You should be glad it's swapping.  Idle stuff in RAM (getty is an obvious culprit) is just taking up space that could be used for something better, like caching hard drive writes, or pre-fetching, or running programs.  Linux is trying to be your friend and do what's best for you, ie put as much of your system to as good of a use as possible.

Addendum:  I know this ain't FreeBSD, but http://www.freebsd.org/doc/en_US.ISO8859-1/books/faq/misc.html#MORE-SWAP

----------

## destroyedlolo

Hi all,

Sorry for this late response : I had problem with my system and then forgot this issue ... until now I'm editing video with cinelerra and I can see the swap increasing even if only 40% of the memory is used (but cache/buffer obviously  :Smile:  ).

 *Spinmc wrote:*   

> AFAIK you should set some low value for vm.swappiness in your /etc/sysctl.conf
> 
> Try setting this value in console with 
> 
> ```
> ...

 

Thanks for the information. The default value is 60, and as per a link I found, it should explain my system behaviors. I will try to reduce to 40 or less.

 *invasivenorman wrote:*   

> You should be glad it's swapping.  Idle stuff in RAM (getty is an obvious culprit) is just taking up space that could be used for something better, like caching hard drive writes, or pre-fetching, or running programs.

 

Is it a way to know what has been swapped ?

The other thing is this swapping process slow down my video editing (and as I'm using a 10 year old machine it's noticeable). Even if SWAP partition is on another disk than my video files, and even if the system is on a 3rd disk, I suspect IO congestion ...

----------

## pilla

Moved from Gentoo Chat to Kernel & Hardware.

----------

