You are not logged in.

#1 2007-11-19 21:09:17

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

System booster.

I came accross this howto http://rudd-o.com/archives/2007/10/02/t … -fix-that/

and placed following in my /etc/sysctl.conf:

#System booster
vm.swappiness=1
vm.vfs_cache_pressure=50

Is this correct, please try and let me know if you experienced any response improvement.

Offline

#2 2007-11-19 22:40:04

kensai
Member
From: Puerto Rico
Registered: 2005-06-03
Posts: 2,484
Website

Re: System booster.

In theory this should work perfectly, I have used this values for some time, but I have no empiric proof that this in fact has boosted my performance considerably. At least I haven't had any problems using this options. I think is a matter of you test it, and run some benchmarks.


Follow me in: Identi.ca, Twitter, Google+

Offline

#3 2007-11-20 03:05:05

FizDev
Member
From: Canada
Registered: 2007-06-29
Posts: 57

Re: System booster.

If I may ask... what do these options do exactly?

Offline

#4 2007-11-20 07:27:36

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: System booster.

FizDev wrote:

If I may ask... what do these options do exactly?

Check the URL i have pasted, it will give you an idea.

Offline

#5 2007-11-20 11:05:51

Sekre
Member
From: The Rainy North
Registered: 2006-11-24
Posts: 116

Re: System booster.

hm.. I read most of the article and then changed my values to see if there were any real difference.
But I have yet to feel it actually. I might have noticed a brief improvement in snappiness on nautilius when totem is creating a larger (about 13+ 250mb) thumbnails of video files but it might just be my imagination.

Will however keep using them for a while and see. Probably learned a few thing anyway so thanks for the link smile

Offline

#6 2007-11-20 14:06:12

Nihathrael
Member
From: Freising, Germany
Registered: 2007-10-21
Posts: 82
Website

Re: System booster.

Sounds interesting. I'll give it try, thanks for the tip!


Unknown Horizons - Open source real-time strategy game with the comfy Anno 1602 feeling!

Offline

#7 2007-11-20 14:26:19

jaideep_jdof
Member
From: Delhi, India
Registered: 2006-06-05
Posts: 311

Re: System booster.

Startup of applications feels faster or may be I am imagining.

Offline

#8 2007-11-20 19:46:40

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: System booster.

why this is called system boster?
#System booster
vm.swappiness=1
vm.vfs_cache_pressure=50

vm.swappiness=value
% of swap allowed
higher value means that kernel will swap out often. default 60% so max swap dump is 60% of swap partition (important for suspend to disk)
so unless system swaps constantly, the above value will not change much.

VFS shrinkage tuning: This adds /proc/sys/vm/vfs_cache_pressure, which tunes the vfs cache versus pagecache scanning pressure. At vfs_cache_pressure=0 we don't shrink dcache and icache at all, at vfs_cache_pressure=100 there is no change in behaviour, at vfs_cache_pressure > 100 we reclaim dentries and inodes harder

so if there is something else, these values (as set) have very little impact on average system performance.

Last edited by broch (2007-11-20 19:48:01)

Offline

#9 2007-12-26 23:02:02

DonVla
Member
From: Bonn, Germany
Registered: 2007-06-07
Posts: 997

Re: System booster.

hi all,

actually setting swappiness to 10 improved speed and responsiveness a lot!
having 1gb ram and using the default setting of vm.swappiness=60 and suspending a lot to disk, there were still 100-200mb in the swap partitin (and only 500mb in ram). opened, but less used apps like evince were still quite sluggish. now with vm.swappines=10 everything is kept in ram and all applications are directly available.

vlad

Offline

#10 2007-12-27 01:42:31

osc~
Member
From: brazil
Registered: 2007-07-06
Posts: 117
Website

Re: System booster.

i just added

#System booster
vm.swappiness=1
vm.vfs_cache_pressure=50

lets see if it works
i hope it does tongue

Offline

#11 2007-12-27 15:49:42

nDray
Member
From: Portugal
Registered: 2007-01-21
Posts: 143
Website

Re: System booster.

I haven't search for it yet, but I started wondering now if it is possible to change the kernel timer during runtime, instead oh having to compile it with different values... Arch defaults to 300Hz, if my memory doesn't fail... 1Khz would be a good thing for desktop users, but people advise to bear in mind that this decreases battery lifetime for laptops, and is also not a good thing for old computers.... 300Hz is a good value, but can we change it without compiling?

Offline

#12 2009-04-11 11:27:01

matiit
Member
From: Poland
Registered: 2007-04-13
Posts: 141
Website

Re: System booster.

I want to know too... sorry for archeologing (;

Offline

#13 2010-04-07 16:52:51

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: System booster.

Here is my system:

Linux Galicja 2.6.33.2-ARCHMOD #1 PREEMPT Fri Apr 2 13:44:32 CEST 2010 x86_64 Genuine Intel(R) CPU 575 @ 2.00GHz GenuineIntel GNU/Linux

I've just added the following to /etc/sysctl.conf:

# Prevent the kernel from swapping memory pages

vm.swappiness = 0


# Kernel will aggressively reclaim the memory which is used for caching of directory and inode objects, hence dentries and inodes

vm.vfs_cache_pressure = 1000


Result: Impact is positive. System is fast and responsive, nothing gets written out to swap, and everything is done with current physical RAM.

Last edited by ejmarkow (2010-04-07 16:56:17)

Offline

#14 2010-04-07 17:21:44

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: System booster.

ejmarkow wrote:

Here is my system:

Linux Galicja 2.6.33.2-ARCHMOD #1 PREEMPT Fri Apr 2 13:44:32 CEST 2010 x86_64 Genuine Intel(R) CPU 575 @ 2.00GHz GenuineIntel GNU/Linux

I've just added the following to /etc/sysctl.conf:

# Prevent the kernel from swapping memory pages

vm.swappiness = 0


# Kernel will aggressively reclaim the memory which is used for caching of directory and inode objects, hence dentries and inodes

vm.vfs_cache_pressure = 1000


Result: Impact is positive. System is fast and responsive, nothing gets written out to swap, and everything is done with current physical RAM.

the thread is from 2007... that's quite the necro ejmarkow

but just to clarify before this gets closed - vm.vfs_cache_pressure is an integer from 0 to 200 - closer to 0 favors inode/dentry cache (which is usually quite small) and 100 is default behavior

inodes/dentries caching only takes up 200-300MB for me if EVERYTHING is cached (use "find / > dev/null" to get it all cached)

for a desktop you want those caches more than IO/page caches - otherwise your file management, etc. slows to a crawl because the inode caches get pushed out of ram by IO cache (moving 4GB to a USB drive, etc)

if you don't want to use swap you could just get rid of your swap file/partition (unless you use suspend to disk)

Last edited by thestinger (2010-04-07 17:29:05)

Offline

#15 2010-04-07 18:48:01

ejmarkow
Member
From: Siemiechów, Poland
Registered: 2008-09-02
Posts: 84
Website

Re: System booster.

thestinger wrote:

the thread is from 2007... that's quite the necro ejmarkow

If you read carefully, the last comment on this thread, prior to mine, was on 2009-04-11 07:27:01. Not quite the 'necro'.

thestinger wrote:

but just to clarify before this gets closed - vm.vfs_cache_pressure is an integer from 0 to 200 - closer to 0 favors inode/dentry cache (which is usually quite small) and 100 is default behavior

Incorrect. The integer limit to vm.vfs_cache_pressure isn't 200. It ranges from 0 to beyond. Here is an example from:

http://www.kernel.org/pub/linux/kernel/ … ning.patch

----------

Some people want the dentry and inode caches shrink harder, others want them
shrunk more reluctantly.

The patch adds /proc/sys/vm/vfs_cache_pressure, which tunes the vfs cache
versus pagecache scanning pressure.

- at vfs_cache_pressure=0 we don't shrink dcache and icache at all.

- at vfs_cache_pressure=100 there is no change in behaviour.

- at vfs_cache_pressure > 100 we reclaim dentries and inodes harder.


The number of megabytes of slab left after a slocate.cron on my 256MB test
box:

vfs_cache_pressure=100000   33480
vfs_cache_pressure=10000    61996
vfs_cache_pressure=1000     104056
vfs_cache_pressure=200      166340
vfs_cache_pressure=100      190200
vfs_cache_pressure=50       206168

Of course, this just left more directory and inode pagecache behind instead of
vfs cache.  Interestingly, on this machine the entire slocate run fits into
pagecache, but not into VFS caches.

----------



Here is a quote from the documentation file /usr/src/linux-2.6.33.2/Documentation/sysctl/vm.txt :

----------

vfs_cache_pressure:

Controls the tendency of the kernel to reclaim the memory which is used for
caching of directory and inode objects.

At the default value of vfs_cache_pressure=100 the kernel will attempt to
reclaim dentries and inodes at a "fair" rate with respect to pagecache and
swapcache reclaim.  Decreasing vfs_cache_pressure causes the kernel to prefer
to retain dentry and inode caches. When vfs_cache_pressure=0, the kernel will
never reclaim dentries and inodes due to memory pressure and this can easily
lead to out-of-memory conditions. Increasing vfs_cache_pressure beyond 100
causes the kernel to prefer to reclaim dentries and inodes.

----------

It states nothing about a 200 upper limit, only 'beyond 100'.

My file management hasn't slowed to a crawl at all. Everything is working quite fast. I'm happy with the parameters I am now using.

Last edited by ejmarkow (2010-04-07 19:04:46)

Offline

Board footer

Powered by FluxBB