Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: The problem with "The Problem with Threads"

by sundialsvc4 (Abbot)
on Jul 21, 2014 at 14:37 UTC ( #1094509=note: print w/replies, xml ) Need Help??

in reply to Re^2: The problem with "The Problem with Threads"
in thread The problem with "The Problem with Threads"

Well, that would be just a collective waste of time, don’t you think?

Threading is an important and useful technique, and yet it is misused by people who equate “thread” with “unit of work.”   You cannot control (much ...) how units-of-work may be introduced into your system, but you can – and must – control how the system goes about doing it.   Any mechanism must have a governor, and a throttle.

The best example I encountered of this, decades ago, was with an engineering computer at our college.   This machine could do a mechanical-engineering analysis job in about a minute and a half, if one person at a time was doing it, and if absolutely nothing else was going on.   With three such interactive sessions, the time jumped to five minutes.   With four, nineteen.   With six, it took five hours.   With nine, thirteen.   (And all of this assuming that the machine was never doing anything else, which was not a valid assumption.)   A classroom full of engineering students could not do their homework, nor could anyone else do anything at all.   Even as IBM salivated at the thought of up-selling to a much bigger box, a very simple solution was found:   run the program in a batch system that never tried to run more than three of these jobs at one time.   Also, set tuning-rules in the batch monitor to represent (and enforce) a service-level commitment with regards to this (dedicated) class of job.   Problem solved.   The performance curve had exhibited the classic, elbow-shaped, “hit the wall” curve indicative of thrashing, and the solution was to constrain the workload to stay back from that elbow.   We could commit to a “less than five minutes” promise, and keep it.   IBM never got to sell us more hardware, and a few years later it all was replaced with a VAX.

If you look back upon the archives here, or at any forum, you will find frequent questions from people who are trying to run “large” work ... district-wide reports, say ... directly from a web-page.   Even when the CGI time is set to “never time-out,” the lack of a governor or a throttle causes this design to topple-over in production.   Any system is doomed to try to do whatever it is asked to do, even when it can’t.

My points are valid, and they don’t dispute your interesting and thorough essay, which by the way I upvoted.

  • Comment on Re^3: The problem with "The Problem with Threads"

Replies are listed 'Best First'.
Re^4: The problem with "The Problem with Threads"
by BrowserUk (Pope) on Jul 21, 2014 at 16:02 UTC
    The best example I encountered of this, decades ago

    That sums up your "knowledge"! Outdated, misunderstood, regurgitated, parrot learnt garbage.

    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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1094509]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2019-10-19 16:02 GMT
Find Nodes?
    Voting Booth?