# /etc/sysctl.conf vm.swappiness=10 advisable?

## jeffk

On Gentoo ~x86, what do people think about this tip:

 *Quote:*   

> http://lifehacker.com/software/feature/slim-down-and-speed-up-linux-333798.php
> 
> Reduce swappiness
> 
> If your system generally has enough memory to handle what you throw at it, your use of swap space should be minimal, but your system doesn't know that. To temporarily lower your swappiness, type the following command into a terminal (replacing "sudo" with "su" in some systems):
> ...

 

vm.swappiness is not present in my stock /ect/sysctl.conf.

On my Thinkpad T61p, I have that frequent hard drive spindown cycle problem that many Ubuntu users have reported. I'm searching for ways to take advantage of the installed 4GB and minimize or eliminate disk access where possible.

Thanks.

----------

## Dottout

it has a different name on latest kernels, vm.mapped

----------

## MostAwesomeDude

If you're using a recent kernel and enough memory (2GB and kamikaze-sources 2.6.23 for me,) Gentoo will just not use swap, period; it will always reclaim cache for new pages. I'm not sure why it's still swapping out; if you really want to, you could always force the kernel to not swap by unmounting the swap partition.

```
# swapoff -a
```

Also, the new entry is /proc/sys/vm/mapped, or vm.mapped in sysctl.

----------

## Dottout

 *MostAwesomeDude wrote:*   

> If you're using a recent kernel and enough memory (2GB and kamikaze-sources 2.6.23 for me,) Gentoo will just not use swap, period; it will always reclaim cache for new pages. I'm not sure why it's still swapping out; if you really want to, you could always force the kernel to not swap by unmounting the swap partition.
> 
> ```
> # swapoff -a
> ```
> ...

 

I totally agree, with 1 gb of ram and running xfce..well, I just dont have a swap partition  :Wink: 

----------

## albright

Oddly, in my system 2.6.23-gentoo-r5 I have

/proc/sys/vm/swappiness ... BTW, is it set to 60.

----------

