Ubuntu This forum is for the discussion of Ubuntu Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-09-2008, 11:16 AM
|
#1
|
Member
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324
Rep:
|
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 ?
|
|
|
12-09-2008, 12:39 PM
|
#2
|
LQ Guru
Registered: Dec 2007
Distribution: Centos
Posts: 5,286
|
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.
|
|
|
12-10-2008, 12:09 AM
|
#3
|
Member
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324
Original Poster
Rep:
|
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 ?
|
|
|
12-10-2008, 12:23 AM
|
#4
|
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,391
|
"cat /proc/sys/vm/swappiness"
|
|
|
12-10-2008, 02:36 AM
|
#5
|
Member
Registered: Dec 2004
Location: India
Distribution: ubuntu 10.04 , centos 5.5 , Debian lenny, Freenas
Posts: 324
Original Poster
Rep:
|
Quote:
Originally Posted by syg00
"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 ?
|
|
|
All times are GMT -5. The time now is 03:20 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|