Bug 68158
Summary: | top showing incorrect CPU usage | ||
---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | Dan de Haan <zeron> |
Component: | procps | Assignee: | Alexander Larsson <alexl> |
Status: | CLOSED NOTABUG | QA Contact: | Brian Brock <bbrock> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | limbo | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i686 | ||
OS: | Linux | ||
URL: | http://gateway.dehaan.dhs.org/~dan/Screenshot.png | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-07-08 16:22:37 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 67218 |
Description
Dan de Haan
2002-07-07 06:40:30 UTC
Your screenshot doesn't appear to have top sorted by CPU, so it is hard to tell. At least glance it appears CPU sorted, but you have 0.0 cpu stuff before 0.1 cpu stuff. Can you include a CPU sorted top and a longer list? In the screenshot it looks like it's in the middle of updating the display, so that is why it's not looking sorted. Collecting these kinds of data are kind of racy though. Data is read from several sources, and the state could change between reading the global stats and the process list data. I'll take a look at what could be happening. Right, the screenshot was while it was being updated. The list was definatley being sorted by CPU usage. I watched top for about 10 mintures trying to figure out where all the CPU was going to. I will recreate this later in the day, and try to get a better screenshot. I know what's happening. You're compiling while running top, and the compilation starts several shortlived processes that use lots of cpu. These all show up in the CPU status field, because it looks at how many system-wide ticks were used up. The stuff in the list only shows the currently running processes though, and if the top refresh rate is long, a lot of processes that used time in between the updates have died. Say everyone but the last compilation finished, and the last compilation only has run for 1 second. The calculated %CPU for that compilation is then 1/5 == 20% (5 sec is the default delay). The rest of the CPU using processes are not in the list, because they already died. |