Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Wall clock time vs CPU time  RSS feed

 
Prasanna Sankar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I highly depend on jprofiler to analyze the middle tier performance in peak load. But have not been able to figure out how to correlate the CPU spike (Processor(_Total)/%Processor time 70-90%) with jprofiler data. In CPU profiling the default mode is wall clock time which is end to end time a method execution take including time taken for data to be fetched from DB. The wall clock times for each method is added up if executed by more than one thread. How does CPU time help, if wall clock time includes the CPU times by all CPU's. If I do have to get what happened in peak load. I just have to switch my thread view to runnable in my profiling session and I can get the time actually method has spent in execution.

Is my undestanding incorrect?

Thanks
Prasanna

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36406
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prasanna Sankar wrote:How does CPU time help, if wall clock time includes the CPU times by all CPU's. If I do have to get what happened in peak load.


Prasanna,
Wall clock time isn't just that match. Suppose you have two CPUs and the following happens:
  • 10:00:00 - CPU 1 starts processing
  • 10:00:05 - CPU 2 starts processing
  • 10:00:05 - CPU 1 breaks to run a virus check
  • 10:00:07 - CPU 2 breaks to respond to user input
  • 10:00:08 - CPU 2 resumes
  • 10:00:09 - CPU 2 completes task


  • The CPU time spent is 8 seconds (5 seconds for CPU 1 and 2 seconds followed by 1 second for CPU 2). The wall clock time is 9 seconds.
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!