high cpu and parallelism

  • Hi Everyone,

    I was just doing a read-up upon high-cpu and CXPACKET wait/parallelism.

    One thing, which is over my reach is below statement.

    "worker time is greater than its elapsed time is a great indication of parallelism"

    Can anyone please explain an example how could it be possible cpu> total elapsed time. How this is possible? Again i am just learner and I wanted to know who this can happen in real time?

    Looking for brief explanation on this.

    Thanks in Advance

  • Query parallels, spends 10 seconds executing on 4 CPUs. Elapsed time, 10 seconds. CPU time used 10 seconds * 4 CPUs = 40 seconds.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • You no longer MCM?!

    ---------------------------------------------------------

    It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
    David Edwards - Media lens[/url]

    Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
    Howard Zinn

  • Thanks Gila for quick response.

    one more clarification, in that case, SQL doesn't SUM up all the execution times for all the CPU's as it is one query which is splitted into parallel threads and will be the Total elapsed time of the actual query?

  • Elapsed time is literally that. It's the actual, real time that elapsed while the query was running. Measured by taking the actual real time that the query started, the actual, real time that the query finished and taking the difference.

    If a query started executing at 10:00:02 and completed at 10:00:05, then it took 3 seconds to run, the elapsed time is 3 seconds. If that query paralleled 4 ways (ran on 4 CPUs) for all 3 of those seconds, then the total CPU time used by that query was 12 seconds

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Got it. Brilliant stuff.

    Thank you very much Gila.

  • Abu Dina (9/2/2013)


    You no longer MCM?!

    They're cancelling the MCM cert.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply