伊莉討論區's Archiver

boypisces 發表於 2007-9-13 12:11 PM

Linux 下meminfo 介紹

cat /proc/meminfo
root: total:                         used:                       free:                                          shared:                    buffers:                    cached:
Mem:  1055760384 1041887232 13873152 0 100417536 711233536
Swap: 1077501952  8540160 1068961792

MemTotal: 1031016 kB
MemFree: 13548 kB
MemShared: 0 kB
Buffers: 98064 kB
Cached: 692320 kB
SwapCached: 2244 kB
Active: 563112 kB
Inact_dirty: 309584 kB
Inact_clean: 79508 kB
Inact_target: 190440 kB
HighTotal: 130992 kB
HighFree: 1876 kB
LowTotal: 900024 kB
LowFree: 11672 kB
SwapTotal: 1052248 kB
SwapFree: 1043908 kB
Committed_AS: 332340 kB
------------------------------------------------------------------------------------------------------------------------------------------------------------            
High-Level StatisticsDetailed Level Statistics - VM StatisticsVM splits the cache pages into "active" and "inactive" memory. The idea is that if you need memory and some cache needs to be sacrificed for that, you take it from inactive since that is expected to be not used. The VM checks what is used on a regular basis and moves stuff around.
When you use memory, the CPU sets a bit in the pagetable and the VM checks that bit occasionally. Based on that, it can move pages back to active. Within active, there is an order of "longest ago not used" (roughly - it is a little more complex in reality). The longest-ago used ones can get moved to inactive. Inactive is split into two in the above kernel (2.4.18-24.8.0). Some have it three.
Memory Statistics

Artemis@ET 發表於 2007-9-17 12:04 AM

我一般只用:

# free

不知現在的人裝 Linux 時 swap 會設多少?

kaic 發表於 2007-9-17 03:02 PM

通常我都設在 2GB, 其實都用不著那麼多, 但是想在run LAMP, 2GB 也差不多吧

jack6038 發表於 2007-11-13 10:25 PM

swap size = physical memory * 2

mb3720 發表於 2008-12-19 12:54 PM

謝謝版大的分享!
讓我的電腦知識又多增長了一點!好東西就是要和大家一起分享!

頁: [1]

Powered by Discuz! Archiver 7.0.0  © 2001-2009 Comsenz Inc.