|
Home > Archive > Unix Programming > March 2007 > Is CPU Usage > 100% possible ? --Really strange.!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Is CPU Usage > 100% possible ? --Really strange.!
|
|
| Sheth Raxit 2007-03-16, 7:28 am |
| Hi,
I am hainvg gr8 debugging stuff this week, one of my friend show me
why am i debugging the process eating (nearer) to 100% cpu,
I told him, cpu is a resource, OS kernel is resource schedular, when
any process tries to consume more resource, OS kernel will kill the
process, and if kernel is not able to handle this then anything wrong
can happen...while i am arguing with him, he has done top on one
system and shows that some process eating more than 100% cpu ( in %cpu
usage) process name was Java and oracle,
PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
1551 <deletedbyme> 100 0 10 453M 334M cpu 22:41 126% java
6834 oracle 1 10 0 733M 377M cpu 270:04 99.01% oracle
17730 oracle 11 59 0 279M 274M sleep 0:13 36.48% oracle
some other process.
I am sure,
1. it is the actual output of top command not any dummy binary.
2. I am not sure is it bug in top or in OS or what,
OS Details
SunOS 5.10 sparc SUNW,Sun-Fire-880
bash-3.00$ isainfo -v
64-bit sparcv9 applications
vis2 vis
32-bit sparc applications
vis2 vis v8plus div32 mul32
I want to know is this technically possible to eat more cpu than
100% ????
--Raxit Sheth
| |
| Jens Thoms Toerring 2007-03-16, 7:28 am |
| Sheth Raxit <raxitsheth2000@yahoo.co.in> wrote:
> I told him, cpu is a resource, OS kernel is resource schedular, when
> any process tries to consume more resource, OS kernel will kill the
> process,
No, a process will never get more CPU time than there is (how should
it be able to get more?), so it won't be killed but just will have
to wait.
> and if kernel is not able to handle this then anything wrong
> can happen...
Then the kernel is buggy.
> while i am arguing with him, he has done top on one
> system and shows that some process eating more than 100% cpu ( in %cpu
> usage) process name was Java and oracle,
> PID USERNAME LWP PRI NICE SIZE RES STATE TIME CPU COMMAND
> 1551 <deletedbyme> 100 0 10 453M 334M cpu 22:41 126% java
Looks like a multi-threaded program on a machine with more than
one CPU, the CPU field of top being the sum of the CPU time per-
centages for all processors the program is running on.
Regards, Jens
--
\ Jens Thoms Toerring ___ jt@toerring.de
\__________________________ http://toerring.de
| |
| Casper H.S. Dik 2007-03-16, 1:19 pm |
| "Sheth Raxit" <raxitsheth2000@yahoo.co.in> writes:
>I told him, cpu is a resource, OS kernel is resource schedular, when
>any process tries to consume more resource, OS kernel will kill the
>process, and if kernel is not able to handle this then anything wrong
>can happen...while i am arguing with him, he has done top on one
>system and shows that some process eating more than 100% cpu ( in %cpu
>usage) process name was Java and oracle,
The newer version of top no longer agrees with the rest of Solaris on
CPU: it computes it and doesn't use the values provided by the kernel
and it says 1 CPU == 100%; Solaris tools have always said: 100%=all CPUs.
I think it's broken they changed it; the tool should follow Solaris.
It does explain >100% CPU for one process as long as it has more than
1 thread.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
| |
| Sheth Raxit 2007-03-21, 1:34 am |
| On Mar 16, 4:20 pm, j...@toerring.de (Jens Thoms Toerring) wrote:
> Sheth Raxit <raxitsheth2...@yahoo.co.in> wrote:
>
> No, a process will never get more CPU time than there is (how should
> it be able to get more?), so it won't be killed but just will have
> to wait.
It depends,
>
>
> Then the kernel is buggy.
Its SunOS 10.0 .! I dont think so (I may be wrong), Some Mismatch or
misunderstanding or ...
>
>
> Looks like a multi-threaded program on a machine with more than
> one CPU,
Yes, It is
>the CPU field of top being the sum of the CPU time per-
> centages for all processors the program is running on.
>
Any other (tool/script) way to get correct info about cpu usage, for
OS Admin and for developer
> Regards, Jens
> --
> \ Jens Thoms Toerring ___ j...@toerring.de
> \__________________________ http://toerring.de
--Raxit
| |
| Sheth Raxit 2007-03-21, 1:34 am |
| On Mar 16, 8:17 pm, Casper H.S. Dik <Casper....@Sun.COM> wrote:
> "Sheth Raxit" <raxitsheth2...@yahoo.co.in> writes:
>
> The newer version of top no longer agrees with the rest of Solaris on
> CPU: it computes it and doesn't use the values provided by the kernel
> and it says 1 CPU == 100%; Solaris tools have always said: 100%=all CPUs.
I am not expert but i think Solaris tools favor me.
>
> I think it's broken they changed it; the tool should follow Solaris.
>
> It does explain >100% CPU for one process as long as it has more than
> 1 thread.
any other (userful) tool for admin?
I am having SunOS 10, with multiple cpu. (sparc)
>
> Casper
> --
> Expressed in this posting are my opinions. They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.
--Raxit
| |
| Casper H.S. Dik 2007-03-21, 7:24 am |
| "Sheth Raxit" <raxitsheth2000@yahoo.co.in> writes:
>any other (userful) tool for admin?
>I am having SunOS 10, with multiple cpu. (sparc)
prstat.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
| |
| Sheth Raxit 2007-03-26, 1:36 am |
| On Mar 16, 8:17 pm, Casper H.S. Dik <Casper....@Sun.COM> wrote:
> "Sheth Raxit" <raxitsheth2...@yahoo.co.in> writes:
>
> The newer version of top no longer agrees with the rest of Solaris on
> CPU: it computes it and doesn't use the values provided by the kernel
> and it says 1 CPU == 100%; Solaris tools have always said: 100%=all CPUs.
>
> I think it's broken they changed it; the tool should follow Solaris.
>
I Think Good Tool to ( April ) Fool the programmer -- 
Show some programmer, his program is eating more cpu, using top, and
ask him to repair the program. !
anyway, prstat onlyshowing (Max 20% cpu, in few case) I think it is
fine, and I dont need to worry about eating cpu !
(i.e. never goes near 90%).
> It does explain >100% CPU for one process as long as it has more than
> 1 thread.
>
> Casper
> --
> Expressed in this posting are my opinions. They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.
--raxit
| |
| Sheth Raxit 2007-03-26, 1:36 am |
| On Mar 16, 8:17 pm, Casper H.S. Dik <Casper.Dik@Sun.COM> wrote:
> "Sheth Raxit" <raxitsheth2000@yahoo.co.in> writes:
>
> The newer version of top no longer agrees with the rest of Solaris on
> CPU: it computes it and doesn't use the values provided by the kernel
> and it says 1 CPU == 100%; Solaris tools have always said: 100%=all CPUs.
>
> I think it's broken they changed it; the tool should follow Solaris.
Dear Casper,
really appreciating for this ,
any publically available (official) bug-list to convey my Admin.
Its very difficult to instruct the change, as top is seems to be his/
her friendly tool since long. !
--Raxit
>
> It does explain >100% CPU for one process as long as it has more than
> 1 thread.
>
> Casper
> --
> Expressed in this posting are my opinions. They are in no way related
> to opinions held by my employer, Sun Microsystems.
> Statements on Sun products included here are not gospel and may
> be fiction rather than truth.
|
|
|
|
|