1827520 Members
2687 Online
109965 Solutions
New Discussion

performance monitoring

 
VINU
Frequent Advisor

performance monitoring

Hello Friends,

How to identify the performance bottlenecks ( cpu,memory,disk,user actvity) using commands top,vmstat,sar.
I tried these commands,but normally it is very difficult to pin point the issue.

Please provide easy & brief solution but pls avoid suggesting any documentation


Thanks & Regards
Vinu
14 REPLIES 14
A. Clay Stephenson
Acclaimed Contributor

Re: performance monitoring

Since you don't want to bother learning, I suggest that you purchase Glance and look at the pictures.
If it ain't broke, I can fix that.
RAC_1
Honored Contributor

Re: performance monitoring

It is not that fast. You execute some commands and it gives you what the problem is. You need to understand the system to decide what the bottleneck is?

I would advise starting with understanding your system and reading some documents on performance monitorinig.

Search the forum for performnace monitoring and you will get many docs.

It is combination of system commands, use of glance or any thirdy part tools that will give you what the problem is.

Anil
There is no substitute to HARDWORK
Ian Dennison_1
Honored Contributor

Re: performance monitoring

Look for whatever is "out of the ordinary" and investigate that component.

To know what each component is and how it interacts, you will need to consult the documentation of both HP-UX and the tools that interrogate it, plus have many weeks/months of practice, re-inforcement and mental agility.

Sorry to break the bad news to you, but if it was "easy" then they wouldn't be paying me so much to do it!

Share and Enjoy! Ian
Building a dumber user
VINU
Frequent Advisor

Re: performance monitoring

Hello Anil , Clay Stephenson & other friends,

I like to know how to judge the performance using the commands ( top,sar,vmstat) to the extent possible , nothing than that.Pls give more concrete inputs.

Thanks & Regards
Vinu
Jim Schelling
Occasional Advisor

Re: performance monitoring

Try this
man sar
man top
man vmstat
Its for fun. I put it there for fun
A. Clay Stephenson
Acclaimed Contributor

Re: performance monitoring

Sorry when you said you didn't want to read any documentation, I pretty much assumed this was not a serious request. People spend years learning how to do performance tuning well --- there is no 60-second course. Again, use Glance or Perfview and then you only need to know "Red Bad; Green Good".

On the other-hand, if you are at least semi-serious aboout learning any of this then this is a very good (and brief) place to start:
http://h21007.www2.hp.com/dspp/files/unprotected/devresource/Docs/TechPapers/UXPerfCookBook.pdf


If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor

Re: performance monitoring

I wish i could live without reading documentation.

Regds
Hazem Mahmoud_3
Respected Contributor

Re: performance monitoring

You're best approach would be to use Glance, or Lund Performance Solutions (www.lund.com). Lund allows you to keep track of history so that you can go back and see where the bottlenecks occurred using things like workloads, etc. I had to pretty much read the entire manual to get that tweaked to the way I want it.
Glance, is relatively easier to use than Lund and also more powerfule than the HP-UX native tools (ie: top, vmstat, sar). Also, depending on your system, they may not be that useful. I believe top has difficulty interpretting information on multi-processor systems.
Summary: Glance is probably what you need. And I believe that comes on most HP-UX distributions now. Just type the following at the prompt and the rest is pretty straight forward:
# glance

Hope that helps!

-Hazem
I.Delic
Super Advisor

Re: performance monitoring

Hi Vinu,

It is difficult to explain but i wil try.

Check sar command

sar 1 10 if you have wio more than 10 % you have an bottlenack. It could be evrything.
If you want to check is your memory maybe the bottlenack than you kan use vmstat 1 1o. If the colums PI PO more than 10 you have a problem with your memory. Check your swap device with swapinfo. Wat do you see ? High use of your swap device maybe ? Check your application. Do you have any databse on your host. Check share memory segment.
With top you can check your cpu use. You can check how much proccess you have on your box. Maybe to much. You have to check al those information

It is not bad idea to read some documentation.

succes

Idriz
Shaikh Imran
Honored Contributor

Re: performance monitoring

Hi,
Normally i analyze this way:
CPU & disk :
#sar -u 10 100
This will give per 10 second and 100 counts
at the end u will get a summary like
%usr user mode
%sys system mode
%wio idle with some process waiting for I/O (only block I/O,
pageins/swapins indicated);
%idle otherwise idle.
===
1)If % idle is more then cpu is not overloaded
2)If wio (=wait for io) is more than the bottleneck is IO ( i.e the cpu is waiting for io resources to be free otherwise it would have been idle).Then the disk is the bottleneck ( this includes the disk,disk interface[scsi,fc,]
++++++++++++++++++++++++++++++++++++++++++++
To calculate the throughput of the Disk :
#iostat -t 10 100
This will give per 10 second and 100 counts
for all the disks.

the output will be
device Device name
bps Kilobytes transferred per second
sps Number of seeks per second
msps Milliseconds per average seek

Where bps is the throughput
+++++++++++++++++++++++++++++++++++++++++++++

For Memory :
i normaly see that paging is happening or not with
#vmstat -s
If the O/P is
0 swap ins
0 swap outs
0 pages swapped in
0 pages swapped out
Then Memory is enough since no paging is happening.
+++++++++++++++++++++++++++++++++++++++++++++

User Activity :
Normaly i use top for tracking this and also with the combination of ps -aef

#top
this will give which user-using which command and what amount of memory used by it.

Hope this helps,

Regards

I'll sleep when i am dead.
Tim D Fulford
Honored Contributor

Re: performance monitoring

Hi

I've spent the last 3.5 years trying to do what you have asked.... after 0.5 years I started to use MeasureWare and can now say that I can, on occasions, spot some performance bottlenecks. There really is no substitute for the following
o Knowledge of your system's daily ups and downs... what is "normal" (MeasureWare can plot the historical usage)
o Knowledge of how your system responds to loading. The systems I look at (and there are only 3 products/applications on a variety of different H/W platforms), usually respons linearly to a main driving load (I'm VERY lucky in this)..
o I'm an undying fan of MeasureWare & only slightly less of an undying fan of glance [because it is immidiate and not historical & so it is difficult to compare say network results with CPU stats & determin a link/corolation, if any] - If you are serious about performance then spend the $$$ and some time, the rewards are worth it.

The above said.... here is a whistle stop tour

sar -d
look at service times of the disks (last column) this will give you a clue if the disks are turning around IO efficiently. anything over about 10ms is poor and above 20ms is really quite serious... This would imply the disks are thrashing.. Also look at %util, this gives you an ide how much %age wise disks are being used.. so a high service time and low % util may suggest a broken disk, where as high service time & high %util would suggest high IO load..

sar -u
generally people like to see low %wio compared to %usr & %sys.. This is a bit of a fudge as there is no real CPU usage for wait on IO. It is an estimate.. That said if %wio >= (%usr+%sys) you may be suffering from IO bottleneck (LAN, disk, memeory etc).
Also %usr >= 2* %sys. %sys is system calls and generally this is kernel stuff, a high %sys may imply excessive system calls... this MAY be normal, but usually a process is spinning or something!!

sar -v
The ov's should never be > 0!

top
Excellent tool for 1-8 cpu box, after that you tend to run out of screen!

lsof, tusc, lanadmin, lanscan, ioscan, iostat, netstat, swlist, swapinfo, bdf, du, find, ps, cfg2html, ls ... these are generally ignored tools, useul in there own right, but not so general as sar, top (and these are free).

Good luck on the "quest"

Regards

Tim
-
VINU
Frequent Advisor

Re: performance monitoring

Dear Friends ,

Thanks for ur valuable inputs

Thanks & Regards
Vinu
Ted Buis
Honored Contributor

Re: performance monitoring

I suggest you purchase a copy of HP-UX Performance and Tuning by Robert Sauers. He has just release a second edition (I have my copy on order). I thought the first was a worthwhile overview of the tools. It is available at amazon.com.
Mom 6
Paula J Frazer-Campbell
Honored Contributor

Re: performance monitoring

Hi to all
There are some new courses coming up soon.

Diffential calculas by picture, and hp-ux admin by osmosis.

Aplicants please apply to:--

;^0 - :^) - 8-(


Paula
If you can spell SysAdmin then you is one - anon