LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 12-09-2008, 11:16 AM   #1
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Rep: Reputation: 36
Question Tweak Page Cache in Ubuntu Linux


Hi all,


to what extent the how to given here is accurate

http://www.ubuntu-unleashed.com/sear...piness%20tweak

will it give significant performance improvement ?
 
Old 12-09-2008, 12:39 PM   #2
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
I don't think it is very accurate, nor is tweaking that feature likely to create a significant improvement.

It is NOT managing a trade off of use of the disk vs. use of RAM. It is managing a trade off of use of ram to reduce disk I/O to the swap file, vs. use of ram to reduce disk I/O to other files.

Usually the defaults are best and changing it will reduce performance.

Depending on how you use your Linux system, there may be an interesting trade off of responsiveness vs. performance. If you have a low priority program doing a lot of file I/O while a high priority program is idle waiting for user input or for network packets, the default settings will heavily use memory to speed up the low priority program, and may use so much that it makes the high priority program unresponsive (slow to come up to speed again after whatever it was waiting for happens).

In that case, lower swapiness could reduce total performance (slow down the low priority program far more than it speeds up the high priority program) but be a good thing because it improves responsiveness.

But most people don't run the mix of programs where even that trade off exists. Most of us have various non UI programs sitting around waiting for events that won't happen anytime soon. Meanwhile our UI programs are reading, writing and mapping various files. If you reduce swapiness, those non UI programs may consume ram they don't really need (instead of being kicked out to swap space where they belong) while the file I/O is slowed for the programs actually in use, reducing both performance and responsiveness.

Unfortunately, Linux (at least ordinary distributions) doesn't have direct priority controls on RAM use. Indirect controls (type of ram use rather than priority of ram use) at best let you shift ram use only sort of in the right direction, and then only when you have specific mixes of applications and a good understanding of how those applications might respond.
 
Old 12-10-2008, 12:09 AM   #3
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Original Poster
Rep: Reputation: 36
Question

but the important thing is that there is no vm.swappiness entry in my

/etc/sysctl.conf file

the command cat /etc/sysctl.conf | grep vm.swappiness gave me nothing
should i add vm.swappiness to this file ?
 
Old 12-10-2008, 12:23 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,164

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
"cat /proc/sys/vm/swappiness"
 
Old 12-10-2008, 02:36 AM   #5
sulekha
Member
 
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324

Original Poster
Rep: Reputation: 36
Question

Quote:
Originally Posted by syg00 View Post
"cat /proc/sys/vm/swappiness"
when i gave this command i got o/p as 60, now how to change this value via sysctl.conf file ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between page cache and buffer cache Nayaka Linux - Kernel 5 09-28-2011 08:23 AM
Safe ubuntu tweak? Mr.Carioca Ubuntu 5 09-14-2008 11:53 PM
What Do You Think About This Tweak Guide 4 Ubuntu? taurusx5 Linux - Software 3 02-24-2008 11:11 AM
LXer: Tweaking Hidden Ubuntu Settings With Ubuntu Tweak LXer Syndicated Linux News 0 01-27-2008 05:50 PM
Where is page cache? zdz97 Linux - Hardware 2 09-16-2003 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration