vmstat reports zero swpd

Craig I. Hagan hagan at cih.com
Tue Nov 19 18:27:01 CST 2002


On Tue, 19 Nov 2002, Clark, Eugene wrote:

> I have a PowerEdge 1650, dual 1400Mhz PIII, Perc 3/Di, RAID 1.
> It is running RedHat 7.3, kernel 2.4.18-17.7.x custom
> 
> When I run vmstat, it reports that the swpd value is zero.
> In /proc/meminfo, the used amount is near the total available.
> Both report a high 'cache' value and there is no swap activity reported
> anywhere.
> 
> Can someone please explain to me what these stats mean? 
> And how I can, if possible, get more accurate memory stats.

your memory looks to be accurate. The "catch" is that the OS is using free
memory to fund its caches. When applications need some ram it prunes the caches
to feed them. The advantage of this is that one need not play the balancing act
of tuning the % of memory set aside for apps/caches.

> 
> # vmstat 2
>    procs                      memory    swap          io     system
> cpu
>  r  b  w   swpd   free   buff  cache  si  so    bi    bo   in    cs  us  sy
> id
>  1  0  0      0  13508  78808 632872   0   0    25    25  270   108   3   1
> 96
>  1  1  0      0  13516  78808 632880   0   0     4   984  766   676  46   1
> 53
>  1  0  0      0  13508  78808 632892   0   0     0   184  587   347  51   1
[snip]

you've one process running, about 13M free, and it is apparently writing some
data to disk. You have some context switches (interesting with one process)

> 
> # cat /proc/meminfo  
>         total:    used:    free:  shared: buffers:  cached:
> Mem:  1056432128 1043079168 13352960        0 75939840 653910016

The large buffers/cached is fine. This is the OS using ram to cache and/or
buffer various odds and ends (e.g. frequently used files/directory structures,
disk/net io buffers, and so on). 

Unless the system is behaving poorly, and it doesn't sound like it is, then you
are seeing an example of the OS taking advantage of all of the memory you
purchased rather than leaving it idle when no application needs it.


> Swap: 1077469184        0 1077469184
> MemTotal:      1031672 kB
> MemFree:         13040 kB
> MemShared:           0 kB
> Buffers:         74160 kB
> Cached:         638584 kB
> SwapCached:          0 kB
> Active:         628936 kB
> Inact_dirty:    145496 kB
> Inact_clean:    199320 kB
> Inact_target:   194748 kB
> HighTotal:      131008 kB
> HighFree:         1024 kB
> LowTotal:       900664 kB
> LowFree:         12016 kB
> SwapTotal:     1052216 kB
> SwapFree:      1052216 kB
> Committed_AS:   443840 kB
> 
> 
> -----------------------------
> Eugene Clark
> Best Software SPD
> 
> _______________________________________________
> Linux-PowerEdge mailing list
> Linux-PowerEdge at dell.com
> http://lists.us.dell.com/mailman/listinfo/linux-poweredge
> Please read the FAQ at http://lists.us.dell.com/faq or search the list archives at http://lists.us.dell.com/htdig/
> 

-- 



	  .-    ... . -.-. .-. . -    -- . ... ... .- --. .

			    Craig I. Hagan
			   hagan(at)cih.com







More information about the Linux-PowerEdge mailing list