Re: Top command issue in kernel 2.6.16 and some kernel 2.4.16
- From: malc <malc@xxxxxxxxxxxxx>
- Date: Sun, 11 Feb 2007 22:40:04 +0000 (UTC)
John <nyrinwi@xxxxxxxxx> writes:
karnan wrote:
We have our application in user space and driver in kernel space.
There is block read to get the data from kernel space to user space.
When we use Top command to measure it show 0% for 60 seconds and 99%
for 30 seconds and it repeats. But my code should always take about
30% of CPU all the time because this works based on real time data
available from kernel driver. Can anybody help to understand why top
is showing 0% while I know that app should take about 30%. why is
showing 99%? Is there any area I need to look at for this 99%
occupancy?
We tested in both kernel 2.6 and 2.4. This issue happens in all
platform for kernel 2.6. In case of kernel 2.4, this happens only in
one platform. In other platform, tops shows correctly 30% all the
time.
Could anybody explain what could wrong here?
Hard to say without more details. What is your user space code doing
for these 60 seconds that top indicates 0%? If top says 0%, then I
would expect to find the user space code sleeping or blocking in a
driver call. gdb or strace should be able to tell you.
The fact that the overall numbers add up to what you expect (30 sec
active and 60 sec idle = 33% active) leads me to believe that top is
not broken. Instead, your application is not behaving the way you
thought it would.
This belief may also be quite wrong. The periodic loads (when load is
calculated via `/proc/uptime' or `/proc/stat') is something i have
witnessed quite often, basically the information kernel exports to
those files should not be used to accurately measure CPU utilization
for certain types of activity.
A sample of the user space code would help.
Indeed.
--
vale
.
- Follow-Ups:
- References:
- Prev by Date: Re: Top command issue in kernel 2.6.16 and some kernel 2.4.16
- Next by Date: negative response time with gettimeofday
- Previous by thread: Re: Top command issue in kernel 2.6.16 and some kernel 2.4.16
- Next by thread: Re: Top command issue in kernel 2.6.16 and some kernel 2.4.16
- Index(es):
Relevant Pages
|