Thank you, Mr. Casper. That's very informative.
Just to satisfy my curiosity, I looked at man kstat. It doesn't look like giving us free memory. man kstat | grep -i free doesn't return anything.
It's interesting to know that freemem (you mean "free" under vmstat, right?) is trying to reach desfree. My netstat -k shows desfree 1967. I believe its unit is `pagesize`, so it's 1967*8192 = ca. 16MB. vmstat 2 5 => memory => free shows 3928, followed by 62032, 61976 etc. Not sure how to relate any of these numbers to 16MB desfree. Currently there's not much activity on the system (Solaris 2.6, no priority paging).
>[[ PLEASE DON'T SEND ME EMAIL COPIES OF POSTINGS ]]
>>Recently there was a discussion on an Oracle database mailing list regarding
>>how to measure memory pressure or shortage based on vmstat output. Some say
>>sr (scan rate) is the only accurate metric (if priority paging is not
>>enabled). Some say po (paging out) and sr together. I understand that sr is
>>determined by how much free memory is available relative to kernel tunables
>>LOTSFREE, DESFREE, MINFREE etc., which determines how often page scanner
>>daemon runs. My question is, if you use sr as the metric for memory
>>pressure, why not directly look at the free memory available? But I think
>>the problem is that the free memory the page scanner sees is not the number
>>under the "free" column of vmstat. Is that true? If yes, is the real free
>>memory externalized in any UNIX command or a system call for which I can
>>write a short C program? Thanks.
>There's no point in looking at free memory, especially not prior
>to Solaris 8. The system tries to keep freemem the same size
>The "sr" column is actually a good measure in that it tells you how
>many pages the system needs to examine in order to free sufficient
>memory. The higher sr, the higher the memory pressure.
>But prior to S8, "sr" could also mean that you have a lot of memory pressure
>due to filesystem I/O.
>"po" is a measure of I/O, not just paging because of memory shortage.
>There's no easy way to get this through C, though you could use
>the kstat interfaces.
>Expressed in this posting are my opinions. They are in no way related
>to opinions held by my employer, Sun Microsystems.
>Statements on Sun products included here are not gospel and may
>be fiction rather than truth.
Submitted via WebNewsReader of http://www.interbulletin.com