Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^3: dynamic number of threads based on CPU utilization

by sundialsvc4 (Abbot)
on Sep 26, 2012 at 18:15 UTC ( #995845=note: print w/replies, xml ) Need Help??

in reply to Re^2: dynamic number of threads based on CPU utilization
in thread dynamic number of threads based on CPU utilization

When a CPU runs in terms of literally billions of ops per second these days, and it is drawing its inputs from a large number of files, then ... it is I/O-bound because that’s what it is waiting on.   Nanoseconds vs. milliseconds.   The completion-time of this program, over the course of let us say one minute, will chiefly be regulated by its ability to perform input/output, not by the speed of the processor(s).   If you were to place the program onto a CPU that ran twice as fast, all other things being equal, such a program would not complete in half the time.   If it truly were CPU-bound, then it would not “slow down,” a-n-d drop out of CPU-utilization at the same time, as it is reported to be doing.

As you say in the (upvoted) earlier comment, this is a poorly thought-out program from the start.   I would further guess that the hash might well have become enormous by that time, and that quite possibly the program has descended into “thrashing hell.”   Something, and it can only be I/O, is utterly preventing the CPU from getting any work done during the second phase.   Thrashing is about the only culprit that exists to explain that.

  • Comment on Re^3: dynamic number of threads based on CPU utilization

Replies are listed 'Best First'.
Re^4: dynamic number of threads based on CPU utilization
by bulk88 (Priest) on Sep 27, 2012 at 03:03 UTC
    What kind of I/O? Mechanical disk I/O? SSD I/O? Ethernet I/O? DRAM I/O? L1 cache I/O?
Re^4: dynamic number of threads based on CPU utilization
by BrowserUk (Pope) on Sep 26, 2012 at 18:19 UTC

    Look you idiot. You are talking crap. SO DO SHUT THE F*** UP!

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

      Don't get personal, sir.   Neither “idiot,” nor “crap,” nor certainly “F***,” is appropriate language to use in this Monastery.   Addressed to anyone.   For any reason.   I will trouble you henceforth to remember that very simple rule of human etiquette.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995845]
[hippo]: Too true :)

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2018-06-22 09:58 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.