>>> Swap usage on Linux always seems a little tricky to me.  Should my
>>> goal on a web server be zero swap usage, meaning the attached graph
>>> should show no green lines at all if I'm doing it right?
>>>
>>
>> No.  You want things that aren't in use to be swapped, like memory
>> leaks and such.  You don't want things that will be used to be
>> swapped.
>
>
> Does this look OK?  It looks to me like heavy swapping in and out with
> plenty of free memory (minus buffers/cache).


Or put another way, how do I know when swapping is a problem?  I'm
running munin so I can look over graphs of my system's characteristics
but I'm not sure what to look for to determine if I'm swapping
excessively.

- Grant


> # vmstat 1 20
> procs -----------memory---------- ---swap-- -----io---- -system-- 
> ------cpu-----
>  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa 
> st
>  0  1 155308  71328  29200 2437260    1    0   127    63    0    0 48
> 1 50  1  0
>  0  1 155308  44444  29204 2465164    0    0 27772     0 1483 1236  1
> 1 74 24  0
>  2  2 155480  32904  29220 2476392    0  172 33684   172 4166 2790 44
> 2 30 24  0
>  4  0 155828  30332  29220 2479756    0  348 41388   348 5319 1884 76
> 2  1 21  0
>  1  1 156184  37668  29244 2470752    0  356 28960   424 5033 3299 53
> 2 15 29  0
>  0  2 156412  32912  29264 2477364    0  228 30976   252 2909 2516 14
> 2 56 29  0
>  2  5 156640  29372  29400 2480328    0  228 23180   344 3949 3156 32
> 2 35 31  0
>  1  4 157072  36372  29624 2469924    0  432 28032   488 4120 3289 50
> 2 10 37  0
>  2  4 157260  37372  29812 2466036    0  188 12188   316 3789 2540 54
> 1  7 38  0
>  2  3 157260  30236  29912 2467672    0    0 16372    48 3730 2077 57
> 2  8 34  0
>  2  3 157304  29684  28940 2459688   24   44 10892    44 4271 2808 44
> 2 11 43  0
>  5  2 157824  36448  28372 2440176    4  520 13036   620 4796 3185 56
> 2 10 33  0
>  2  3 157928  34552  28516 2437032    4  104 19620   148 4446 4108 48
> 3 15 35  0
>  2  6 157928  38620  28444 2385828  436    0  4808   136 4615 2851 39
> 5  6 51  0
>  3  5 157928  36936  28604 2377112  732    0  8072    84 4773 2970 64
> 2  0 34  0
>  5  7 157928  39068  28832 2375944   40    0  2040   492 4877 3341 71
> 2  1 26  0
>  3  4 157928  81820  28984 2376868  188    0 19320     0 5122 6990 66
> 5  0 30  0
>
> # free -h
>              total       used       free     shared    buffers     cached
> Mem:          3.9G       3.8G        41M        88M        20M       2.4G
> -/+ buffers/cache:       1.4G       2.4G
> Swap:         1.0G       154M       869M

Reply via email to