LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   CPU usage drop during halfway calculation (https://www.linuxquestions.org/questions/linux-newbie-8/cpu-usage-drop-during-halfway-calculation-712663/)

rabbit00 03-18-2009 08:11 PM

CPU usage drop during halfway calculation
 
Hi I'm new in linux.

Have face a problem regarding xw8200 workstation. ( Redhat 3 update 7 ).

During the workstation performing the calculation, if we did not physically interrupt the workstation for about 60sec, the CPU usage will drop from 60% to 5% ( seem like go to sleep mode / idle ) for about 10sec before it resume calculation.

But if we interrupt it with moving the mouse. It will be OK for about 30~60 sec.

Try following but the condition still same.
- interrupt with keyboard
- disable the screen saver
- add a looping program

PS ; the same calculation ( program ) is working fine at xw4400 workstation

Please help.

sundialsvcs 03-20-2009 09:44 AM

I don't know of any particular way to diagnose a problem like this "from a distance." Plainly, this program has some kind of dependency upon the user-interface, and it grinds to a halt because it's waiting for that resource.

One strategy that sometimes works is to spin the calculations off to a child-thread. This thread has no interaction whatsoever with the user interface: it is simply a computational loop.

But... if it "works fine on one workstation but not another," that is quite strange. Perhaps, though, the fact that "it works just fine over here" is, well, coincidence. Maybe the program's present design is vulnerable to this sort of problem, and "for some happy reason it doesn't happen over here."

If you can spin the calculations off to a purely CPU-bound child thread, then (any...) operating system dispatcher will quickly recognize it to be "a CPU-bound thread" that never waits on anything, and it ought to be given cycles no matter what the user-interface may be doing at any particular time.

Finally, I'm going to assume that the two workstations have a comparable amount of memory and so-forth ... that there are no "memory leaks," no resource-bugs of that sort ... that it is, in fact, "a good, clean program" that you can have confidence in.

rabbit00 03-22-2009 09:54 PM

The both workstation memory size ( 3.91 GB )and memory usage ( about 50% ) are the same. But the CPU type is different. xw8200 [ Intel(R) Xeon(TM) CPU @ 3.8GHz ] ; xw4400 [ Inter(R) Core(TM) 2 CPU 6700 @ 2.66GHz ).

In fact, after we replace the problem workstation from xw8200 to xw4400 ( 2 units ), the problem all can be resolved.
But still have 3 units yet to replace due to budget constain.

As per our finding recently, the problem did not happen again if we use other workstation to vnc ( with open system monitor ) over to the xw8200 workstation [ Anyway the problem will persist if the system monitor screen is been minimized ]

We found this problem is quite strange.
Wonder whether the root cause is related to xlib which used by both mouse pointer and vnc.

Please help to suggest the possible root cause and solution if possible. Thanks...


All times are GMT -5. The time now is 10:47 PM.