1832990 Members
2627 Online
110048 Solutions
New Discussion

CPU load

 
Ling_2
Occasional Advisor

CPU load

Hi

I would like to know the percentage of the cpu load shown in HP-UX TOP command. Currently, the CPU load shown can range from 3-20, so I am wondering if it has reached 100% utilization already or not? Therefore, is there a standard to identified how many percentage is being used when the CPU load show 3 or even higher? Thanks!
7 REPLIES 7
Alan Casey
Trusted Contributor

Re: CPU load

The LOAD valuse in top are the raw CPU load stats.
Top also displayd the %idle of each processor as well as the average, this gives the % utilisation. Is this not what you're looking for?
Ling_2
Occasional Advisor

Re: CPU load

Hi,

This is what I have from TOP, so how do I know how many percentage of the CPU has been used?

CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS
0 10.35 66.0% 8.9% 25.0% 0.0% 0.0% 0.0% 0.0% 0.0%
1 10.58 74.8% 7.2% 18.1% 0.0% 0.0% 0.0% 0.0% 0.0%

Animesh Chakraborty
Honored Contributor

Re: CPU load

Hi,
Instead try sar
# sar -M 1 10
Did you take a backup?
Paula J Frazer-Campbell
Honored Contributor

Re: CPU load

Hi

Your output from top shows 0.00% idle on your processors.

The load in top is only a guide, the general trend is 1 per processor for the server to be within optimum.

So for a 6 processor system loading below 6 is generally Ok and above problems can happen.

As I said this is only a guide.

Your output shows only two processors and if you are seeing from 3 to 30 then you have problems to solve as your load trend is two high.

Because the processors are showing 0% idle does not always mean that you require more processing power, if could be that you lack memory and are managing heavy swapping, you could have disk problems.

Tracing a heavy load is not always straightforward so :-

Install and use glance to monitor resources.

Also use sar, the following script can be started from cron - I start this at 05:00 daily.
---------------- cut here-----------------
#!/bin/sh

# 1 minute
period=${1:-"60"}

# 17 hours worth
iterations=${2:-"`expr 86400 / $period`"}


echo "sar: $iterations iterations at $period second intervals"
/usr/sbin/sar -A \
-o /var/adm/sa/sa`date +%d` \
$period \
$iterations > /dev/null
-------------------cut here ----------

Man sar will show the commands to view it output.

HTH

Paula

If you can spell SysAdmin then you is one - anon
Krishna Prasad
Trusted Contributor

Re: CPU load

I also noticed a very high amount of system time from your top output.

This usally means you have a problem with memory/swap, disk I/O, or cpu.

Also, 3 - 20 load on a system is a high load.
But, it looks like it maybe able to be fixed being that there is a lot of system time.

How much physical memory do you have in the box?
How much free memory do you have? You can use glance to see this if you have it.

Also, what is you dbc_max_pct set to? It should'nt be over 8 in most cases. This will limit the amount of buffer cache the system will use. Sometimes when this is to high it will the buffer cache will take large amounts of physicall memory.

What does swapinfo -ta show you. Are you using a lot of swap?

Also, what other Apps are running on the box?
Do they allocated there own memory pools? If so are they set correctly?
Positive Results requires Positive Thinking
Ling_2
Occasional Advisor

Re: CPU load

Thanks for all replies! So am i right to conclude that if i have 2 processor, then the CPU load should be below 2 in order not to reach 100%?

Currently, the dbc_max_pct value is being set to 7, so I supposed that it should be fine.

my swap info is should fine, ithe PCT used is just 23% when the CPU load is already 4.

How do i conclude the information that I got from sar -M 1 10 as shown below for the avg?

Average 0 37 10 9 44
Average 1 49 8 12 31
Average system 43 9 10 38

Many thanks!
Sridhar Bhaskarla
Honored Contributor

Re: CPU load

Hi Ling,

It's not a hard thumb rule that a load of 2 will make a two processor system 100%. What you should be looking at is sar while the system is running at 100%. You will get a very clear picture of what's happening if you have glance. Running glance itself will give stats of cpu,mem,disk and network seggregated into individual components. For ex., mem will be shown in terms of user usage, buffer cache usage etc., If you don't have glance, sar is the next best tool.

Do a sar 2 20 while the system is at 100%. If your %usr is at 70 above, then it is not uncommon to see %sys at 20-25%. If %sys is around 25-30 while %usr is low, then your system is doing a lot of work in kernel mode. This means either it is trying to do a lot of paging or doing disk activity. Though it is not a 100% metric, but %wio in sar will give a good idea of I/O activity. sar -d is the corresponding tool for disk utilization.
Your last stats show good numbers. If they are in the same ratio when you are seeing 0% idle, then I would believe you are running out of CPU power and may want to upgrade them or add more if you don't have unnecessary processes running on the system.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try