[K12OSN] How to DRASTICALLY speed up app response on K12LTSP

"Terrell Prudé Jr." microman at cmosnetworks.com
Fri Oct 5 07:29:36 UTC 2007


I just ran across this today over at www.linuxtoday.com.  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.

/sbin/sysctl -w vm.swappiness=1    (default is 60)
/sbin/sysctl -w vm.vfs_cache_pressure=50   (default is 100)

These are, as you might've guessed from the "vm" in the name, virtual
memory settings for Linux (the kernel).

So what the heck do these do?

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.

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.

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.

The original source for this info, with a much better explanation by its
author, Manuel A. "Rudd-O" Briz, is here:

http://rudd-o.com/archives/2007/10/02/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that/

--TP
_______________________________
Do you GNU!?
Microsoft Free since 2003 <http://www.gnu.org/>--the ultimate antivirus
protection!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/k12osn/attachments/20071005/bed66631/attachment.htm>


More information about the K12OSN mailing list