Solved

What is WCPU in top command?

Posted on 2006-07-03
5
6,451 Views
Last Modified: 2013-12-06
On HP-UX, when I run the top command, there is a column for the WCPU (weighted CPU).  Can somebody tell me what this is?  Thanks.
0
Comment
Question by:mromeo
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Phreonx
ID: 17033523
Hello,
let me start off by mentioning the exact definition from the man page for top:

     "WCPU, when displayed, is the weighted cpu percentage."

Now a bit of explanation. %wcpu or weighted cpu percentage as I understand it, is an exponentially decaying, average percentage measured over the last few minutes, of the CPU time that was dedicated to a particular process. It has no real world value and it's value is totally controlled by the CPU scheduler. As you would expect, processes running for a short period of time the %wcpu should be very close to the actual %cpu.

Hope that helped ;)
0
 

Author Comment

by:mromeo
ID: 17033572
so, if the WCPU gets quite large (approx 80-90%), but the CPU % stays at about 50%, what is that indicating?
0
 

Author Comment

by:mromeo
ID: 17033579

This is what is happening when I try to compile some code w/ gcc.
0
 
LVL 4

Assisted Solution

by:Phreonx
Phreonx earned 60 total points
ID: 17033664
I'd suspect that 80-90% of the CPU time is dedicated to swapping processes in and out of the CPU scheduler whereas 50% of the CPU is used for actual process execution by the CPU.
0
 
LVL 6

Accepted Solution

by:
JJSmith earned 65 total points
ID: 17047424

%CPU give the utilization of the last sample period.

%WCPU looks at the same process over a longer period.

In summary;

A process of short duration (one top sample period) should show almost identical %WCPU and %CPU.

A process of longer duration (more than 1 top sample period) would start to show a widening 'gap' between %WCPU and %CPU.

If a longer process was maxing the CPU in the last sample period, then expect %CPU to be bigger than %WCPU.

If a longer process had been maxing CPU for a while but in the last sample period it had lightened up - then expect %CPU to be lower than %WCPU.

Hope that helps
Cheers
JJ
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now