Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sar -r help regarding reading info. 1

Status
Not open for further replies.

smacattack

Technical User
Jun 25, 2001
102
GB
When i call sar -r and get the relevant freemem / freeswap information.
How do you know what percentage of freemem pages is being used. How do you find what was available not what is left which is what sar -r shows you.
I am being told we are using alot of the memory but not the swap area. Do i need to upgrade the memory. How can i tell whether the information i am being advice is correct. I know the CPU % is ok. Just memory based.
How do you read these stats!!!!!!!
HELP! PLEASE !
 
Hello there,

Are you Solaris 2.6 ? Solaris8?

OK swap is easy "swap -s" tells you how much is used and what is available
also see swap -l

Free Memory:- how much do you have? see "prtconf | head"

run "sar -r 2 10" or "vmstat " (where 2 = at 2 secs intervals and 5 = how many times)
then compare.

Actually vmstat output will be very useful - sr (scan rates) - if continuously > 20 indicates memory heavily used, increases as free memory drops to as low as 500KB, if low values indicates Memory is running well;
procs (process arrival rate) r b w
w = swapped processes - if >5 not good, high number of swaps means shortage of physical memory
r = run queue indicates jobs queuing - if > 5 this means insufficient CPU power in the system
b = processes blocked waiting for disk, high block rate indicates need for more memory or faster

or try "/usr/ucb/ps -auv" to show which processes are taking % memory.

Tell us how it goes.

Bye



 
Memory = 768

vmstat output£ vmstat
procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 m0 m1 m2 in sy cs us sy id
0 0 9 3008 6824 2 3 117 18 122 0 15 0 1 1 1 389 242 80 1 1 98


sar -r 2 10 output
14:10:01 1691 4852391
14:20:00 1517 4854732
14:30:00 1574 4839927
14:40:00 1658 4835221
15:00:00 1655 4830703
15:10:00 1651 4833907
15:20:00 1650 4837110
15:30:00 1539 4839456


What do you think?

vmstat -sr result
£ vmstat -sr|pg
76 swap ins
69 swap outs
76 pages swapped in
413151 pages swapped out
16023468 total address trans. faults taken
11069937 page ins
10264009 page outs
69471416 pages paged in
10776130 pages paged out
9729949 total reclaims
9726277 reclaims from free list
0 micro (hat) faults
16023468 minor (as) faults
6449557 major faults
2340543 copy-on-write faults
2623153 zero fill page faults
74675089 pages examined by the clock daemon
785 revolutions of the clock hand
72924116 pages freed by the clock daemon
97512 forks
242 vforks
82647 execs
384413094 cpu context switches
2325363523 device interrupts
21400727 traps
1149495998 system calls
82546464 total name lookups (cache hits 89%)
1453213 toolong
6782538 user cpu
12589771 system cpu
897302290 idle cpu
32961085 wait cpu
Do we need more memory / cpu !!!




 
Your examples show that: -

swap looks pretty good
CPU is idling at 98% (doing very little) so this looks OK
The only worrying figure is vmstat / proc / w = 9 but is it continuously high?
also sr (scan rates) = 15 (acceptable); Both these parameters relate to Memory.
Please Note a sr of 200 over prolonged periods would mean seroius memory problems. I earlierv sais 20, this is a typing error.

Another example is one of our Systems = 512 MB Memory, ran sar -r 2 10
16:47:31 freemem freeswap
16:47:33 1084 3245596
16:47:35 1114 3261824
16:47:37 1099 3245596
16:47:39 1089 3245596
16:47:41 1085 3245596
16:47:43 1082 3245596

procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 m1 m2 m3 in sy cs us sy id

0 0 0 1631336 9304 0 1 0 0 0 0 0 0 0 0 0 173 17409 226 22 6 72

I'm happy with this. My advice would be to keep monitoring (vmstat) and keep an eye on the two memory parameters mentioned. If you want to see what processes are actually taking % memory, run the following

/usr/ucb/ps -auv

Solaris 8 - psrinfo is similar

From what you have displayed above, your physical memory is being "well utilized" but
doesn't appear in serious trouble. More data is required to judge this.
 
I have done more tests using vmstat, the swapped processes seems consistent at 17 !. The sr seems to go to 0 rather than the 15 as before.

procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr f0 m0 m1 m2 in sy cs us sy id
0 0 9 128 16 2 3 118 18 124 0 15 0 1 1 1 389 242 80 1 1 98
0 0 17 2454304 12208 6 4 11 42 42 0 0 0 0 0 0 453 8546 365 33 20 46
0 0 17 2454048 11928 7 2 18 56 63 0 0 0 1 1 1 509 9385 540 33 21 46
0 0 17 2454000 11904 8 2 30 65 96 0 4 0 1 1 1 541 9522 593 34 21 45
0 0 17 2453904 11912 5 0 10 40 47 0 1 0 0 0 0 435 8720 391 33 20 47


The stats shown are with a good number of users working. This is not the peak.
With all the stats shown does this now indicate we require more physical memory. Nobody seems to be complaining of slow response etc.!
What do you think?
Cheers for the reply earlier it was a great help!


 
I have also noted on some of our boxes that this w param is quite high on one box it is running at 65. Could the network cause such stats?
 
Please Note: always ignore first line of vmstat output after the headings. It doesn't show current resources available.

I see that your CPU is running OK with almost 50% idle, according to figures displayed you don't need extra CPU power. Swap is still plentiful.

vmstat show you have physical memory available approx. 12,000Kb and scan rates are perfect at 0, this means no serious problems. Most important there are no customer complaints!

As I said before it looks like your Memory is being fullly utilized but I would continue to monitor. it appears that the "17" figure is constant, funny enough we have an idle system that always has "22" under procs/w,
0 0 22 2312672 24816 0 0 0 0 0 0 0 0 0 0 0 407 114 80 0 0 100
0 0 22 2312632 24608 0 0 0 0 0 0 0 0 0 0 0 409 112 79 0 0 100
I would like to it have rebooted though to see if it clears the "22"

At present my advice would be to keep an eye on your system, if you had any spare memory why not slot it in, it wouldn't do any harm but overall your system seems OK.
If I find out anymore information on the proc/w I'll let you know. By the way what Solaris are you running and what type of machine?

Good Luck

Marrow
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top