Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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.


In reply to Re^3: The problem with "The Problem with Threads" by sundialsvc4
in thread The problem with "The Problem with Threads" by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others perusing the Monastery: (6)
    As of 2019-09-17 00:16 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The room is dark, and your next move is ...












      Results (199 votes). Check out past polls.

      Notices?