Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

What is WCPU in top command?

Posted on 2006-07-03
5
Medium Priority
?
7,149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 240 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 260 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

722 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