<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I just ran across this today over at <a class="moz-txt-link-abbreviated" href="http://www.linuxtoday.com">www.linuxtoday.com</a>.  I tried out
the following two settings on my K12LTSP 4.2EL box to see if they would
indeed speed up response time for desktop apps.<br>
<br>
/sbin/sysctl -w vm.swappiness=1    (default is 60)<br>
/sbin/sysctl -w vm.vfs_cache_pressure=50   (default is 100)<br>
<br>
These are, as you might've guessed from the "vm" in the name, virtual
memory settings for Linux (the kernel).<br>
<br>
So what the heck do these do?<br>
<br>
The first one tells Linux not to be so hasty to swap out applications
to disk in favor of data.  Normally Linux will swap out applications
that you've loaded to disk, especially if you're working with large
data sets (e. g. video editing on a large file).  That's great for a
server, where you've got a few tasks running all the time.  But it
*SUCKS* for a desktop, in which you want instant application response
time, and you're quickly switching between apps (I know I sure do!). 
It's even worse on an LTSP server w/ multiple users.  This setting
fixes that problem.<br>
<br>
The second one tells Linux not to be so hasty to swap out inode
(filesystem) info that it's cached.  You do a search on, say, your
homedir.  The inode info for that search, of course, gets cached.  Then
you go and sling around a huge file or two...or three.  Guess what? 
Not only did your app get swapped to disk (per the above), but also
your inode data cache in DRAM for your homedir got wiped out, too. 
That means the next time you've got to search your homedir, you've got
to go *back* to the disk instead of getting that info from cache! 
S-L-O-O-O-W-W-W.  Again, fine for certain servers, but bad for a
desktop.  This second setting reduces that tendency.<br>
<br>
After applying these two, my K12LTSP server is giving my much better
desktop app response than it ever has.  It's like night and day.<br>
<br>
The original source for this info, with a much better explanation by
its author, Manuel A. "Rudd-O" Briz, is here:<br>
<br>
<a class="moz-txt-link-freetext" href="http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that/">http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that/</a><br>
<br>
<div class="moz-signature">--TP<br>
_______________________________
<br>
Do you GNU!?
<br>
<a href="http://www.gnu.org/">Microsoft Free since 2003</a>--the
ultimate antivirus protection!
<br>
</div>
</body>
</html>