Welcome, Guest. Please login or register.
April 19, 2014, 07:45:08 AM
Home Help Search Calendar Login Register
Show unread posts since last visit.
News: Let Pardus-Anka become #1: Pardus-Anka Bug ReportPardus-Anka World Google+ | The Pardus wiki  | Visit Pardus-Anka official website  | Register as forum member?  Email the moderator!

+  Pardus Worldforum
|-+  Assistance
| |-+  Configuring Pardus
| | |-+  Swappiness or how to make your linux more responsive
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Swappiness or how to make your linux more responsive  (Read 1844 times)
Pardus fellow craft
Posts: 50

View Profile
« on: November 09, 2007, 20:50:25 PM »

Evening all!

This time I`m writing from my main computer at home (so no package manager issues included  Grin). While browsing the web I found this interesting article about how to make linux even more responsive click
When I tried the sysctl -w vm.swappiness=1 command as root I got this
tuxpower@linuxlab ~ $ su
linuxlab tuxpower # sysctl -w vm.swappiness=1
error: "vm.swappiness" is an unknown key
linuxlab tuxpower #
My next step was editing of /etc/sysctl.conf. On the end of the file I added a new section called responsivnessland. Next I added vm.swappiness=1 and vm.vfs_cache_pressure=50 as lines under this section. Here is the modified sysctl
tuxpower@linuxlab ~ $ cat /etc/sysctl.conf
# /etc/sysctl.conf
# For more information on how this file works, please see
# the manpages sysctl(Cool and sysctl.conf(5).
# In order for this file to work properly, you must first
# enable 'Sysctl support' in the kernel.
# Look in /proc/sys/ for all the things you can setup.

# Disables packet forwarding
#net.ipv4.ip_forward = 0
# Disables IP dynaddr
#net.ipv4.ip_dynaddr = 0
# Disable ECN
#net.ipv4.tcp_ecn = 0
# Enables source route verification
net.ipv4.conf.default.rp_filter = 1
# Enable reverse path
net.ipv4.conf.all.rp_filter = 1

# Enable SYN cookies
# http://cr.yp.to/syncookies.html
#net.ipv4.tcp_syncookies = 1

# Disable source route
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv4.conf.default.accept_source_route = 0

# Disable redirects
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv4.conf.default.accept_redirects = 0

# Disable secure redirects
#net.ipv4.conf.all.secure_redirects = 0
#net.ipv4.conf.default.secure_redirects = 0

# Ignore ICMP broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1

# Disables the magic-sysrq key
#kernel.sysrq = 0
# When the kernel panics, automatically reboot in 3 seconds
#kernel.panic = 3
# Allow for more PIDs (cool factor!); may break some programs
#kernel.pid_max = 999999

# TCP Port for lock manager
#fs.nfs.nlm_tcpport = 0
# UDP Port for lock manager
#fs.nfs.nlm_udpport = 0

# improve responsiveness (good for mplayer)
dev.rtc.max-user-freq = 1024

# default is 8k, Beagle runs better with 16K
fs.inotify.max_user_watches = 16384

# responsivnessland
tuxpower@linuxlab ~ $   

It is very possible that I edited the file wrong. Maybe I shoudn`t make another section, author is simply stating just to add those 2 lines in sysctl.conf. If anyone has any sugestions, on how to edit this file properly pls post it. All other opitons and explanations are also open.

When I try to run sysctl -w vm.swappiness=1 command I still get the same output as mentioned above.
After running the ls  /proc/sys/vm command I should get the swappiness listed but in my case there is no such thing.

tuxpower@linuxlab ~ $ ls  /proc/sys/vm
affinity_load_balancing    laptop_mode           overcommit_ratio
block_dump                 legacy_va_layout      page-cluster
dirty_background_ratio     lowmem_reserve_ratio  panic_on_oom
dirty_expire_centisecs     mapped                percpu_pagelist_fraction
dirty_ratio                max_map_count         swap_token_timeout
dirty_writeback_centisecs  min_free_kbytes       vdso_enabled
drop_caches                nr_pdflush_threads    vfs_cache_pressure
hardmaplimit               overcommit_memory
tuxpower@linuxlab ~ $

Help is very appreciated,

Regards Bandito
« Last Edit: November 09, 2007, 20:53:28 PM by Bandito » Logged
Pardus fellow craft
Posts: 50

View Profile
« Reply #1 on: November 17, 2007, 11:15:30 AM »

After talking to a friend about this, he mentioned another way to regulate swappiness. Here is how it`s done.

Swappiness is regulated trhough mapped file (/proc/sys/vm/mapped). The philosophy as it follows ----> swappiness = 100 - mapped.
For example if you want to have swappiness set to 1(according to the article mentioned above), you have to change the number inside the mapped file to 99 (the default number in my case was 66). This is proven to have a greater effect on old computers.

Regards, bandito
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!