Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/etc/sysctl.conf vm.swappiness=10 advisable?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jeffk
l33t
l33t


Joined: 13 Sep 2003
Posts: 671

PostPosted: Mon Dec 24, 2007 3:17 am    Post subject: /etc/sysctl.conf vm.swappiness=10 advisable? Reply with quote

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):
Code:
sudo sysctl -w vm.swappiness=10

To make that fix permanent, enter the following command (trading "gedit" for "kate" in KDE systems, or "nano" or "vi" if you have neither):
Code:
sudo gedit /etc/sysctl.conf

In the file that comes up, look for the line vm.swappiness=x and change the value to 10, or add the line if it doesn't exist.

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.
Back to top
View user's profile Send private message
Dottout
l33t
l33t


Joined: 07 Mar 2006
Posts: 882

PostPosted: Mon Dec 24, 2007 10:29 am    Post subject: Reply with quote

it has a different name on latest kernels, vm.mapped
Back to top
View user's profile Send private message
MostAwesomeDude
Guru
Guru


Joined: 12 Aug 2007
Posts: 373

PostPosted: Mon Dec 24, 2007 4:12 pm    Post subject: Reply with quote

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.
Code:
# swapoff -a


Also, the new entry is /proc/sys/vm/mapped, or vm.mapped in sysctl.
Back to top
View user's profile Send private message
Dottout
l33t
l33t


Joined: 07 Mar 2006
Posts: 882

PostPosted: Mon Dec 24, 2007 4:16 pm    Post subject: Reply with quote

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.
Code:
# swapoff -a


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


I totally agree, with 1 gb of ram and running xfce..well, I just dont have a swap partition ;)
Back to top
View user's profile Send private message
albright
Advocate
Advocate


Joined: 16 Nov 2003
Posts: 2588
Location: Near Toronto

PostPosted: Mon Dec 24, 2007 8:52 pm    Post subject: Reply with quote

Oddly, in my system 2.6.23-gentoo-r5 I have
/proc/sys/vm/swappiness ... BTW, is it set to 60.
_________________
.... there is nothing - absolutely nothing - half so much worth
doing as simply messing about with Linux ...
(apologies to Kenneth Graeme)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum