Re: CPU increasing slowly up to 100%
From: Paul Lutus (nospam_at_nosite.zzz)
Date: 10/18/04
- Next message: Rico: "Re: DOM parsing - Document root element is missing."
- Previous message: John Harlow: "Re: Am I the only one who questions JSTL, Struts Tags, XSL Tags?"
- In reply to: SLL: "Re: CPU increasing slowly up to 100%"
- Next in thread: Tony Morris: "Re: CPU increasing slowly up to 100%"
- Reply: Tony Morris: "Re: CPU increasing slowly up to 100%"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 17 Oct 2004 22:53:42 -0700
SLL wrote:
/ ...
> Any ideas for further investigation?
After my first post, I thought about this some more and realized two other
possibilities.
1. I think you should look for examples of one process waiting for another
to complete, but waiting in inefficient ways.
Generic example:
while(otherProcessNotComplete);
Sometimes people think if this sort of wait is placed in a thread, there's
no harm in it -- but this sort of wait can eat CPU time like crazy.
Alternative:
while(otherProcessNotComplete) {
Thread.sleep(1000);
}
I hope this is not too terribly obvious. I raise it because of your report
that if you kill off one JVM, the problem goes away. This made me think of
various kinds of time-eaters and deadlocks.
2. On the topic of deadlocks, and again at the risk of saying the obvious,
never stop a thread externally. If you must stop a thread, set a flag that
is visible to the thread, have the thread's code detect the state of the
flag and exit on its own.
This is also a classic way to create the kind of problem you are seeing, and
it is also possibly entirely too obvious.
I apologize in advance if these are simply not sophisticated enough to rank
as possibilities in your situation.
-- Paul Lutus http://www.arachnoid.com
- Next message: Rico: "Re: DOM parsing - Document root element is missing."
- Previous message: John Harlow: "Re: Am I the only one who questions JSTL, Struts Tags, XSL Tags?"
- In reply to: SLL: "Re: CPU increasing slowly up to 100%"
- Next in thread: Tony Morris: "Re: CPU increasing slowly up to 100%"
- Reply: Tony Morris: "Re: CPU increasing slowly up to 100%"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|