[doc] Linux Memory Management

Dedicated for Linux & related opensource software

[doc] Linux Memory Management

文章 #1  未閱讀文章PoP » 2007-03-24 01:36

Linux Memory Management or 'Why is there no free RAM?'
Revision 2.3
Copyright 2004 sapphirecat. The text of this post is licensed under a Creative Commons License.

Sections

1. Overview of memory management
2. The mysterious 880 MB limit on x86
3. The difference among VIRT, RES, and SHR in top output
4. The difference between buffers and cache
5. Swappiness (2.6 kernels)

Source: http://forums.gentoo.org/viewtopic-t-175419.html
頭像
PoP
 
文章: 13617
註冊時間: 2006-12-06 03:42

文章 #2  未閱讀文章PoP » 2007-03-24 01:39

Useful tunning tips:

5. Swappiness (2.6 kernels)

[code]# sysctl -w vm.swappiness=30

or



default for Gentoo is 60
頭像
PoP
 
文章: 13617
註冊時間: 2006-12-06 03:42

文章 #3  未閱讀文章PoP » 2007-03-24 02:18

Swap partition



The size is whatever you made it when partitioning your harddisk at the install of your system, so if it's 3gigs: blame your crappy distribution, not the kernel.

In the old days the 'rule of thumb' was swapsize == 2x installed RAM ,but never larger than 128mb. I find that alof of people new to Linux are not aware of the second half of the rule. This made sense when you had computers with <=64 mb RAM installed. On top of that, the kernel didn't even support larger swapsizes than 128mb anyway, even if you made partition that was larger than that (you could only circumvent that by adding more swappartitions). If you have a regular modern system, you basically have to eyeball the swapsize and adjust it to whatever you think you want to have as extra 'breathingspace'. I usally reserve between 128 and 512mb. I would recommend to always have at least some swapspace. Actually, historically some parts of the system had issues with the swapsize being zero, so I guess it's also good way to avoid any of those issues that may linger.



If you wish to run a lighter desktop, try use other windowmanagers like windowmaker, fvwm2, fluxbox etc., which have a significantly smaller memory footprint.
頭像
PoP
 
文章: 13617
註冊時間: 2006-12-06 03:42


回到 Linux

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron