35

noob misconception #378: during my first internship the summer after my freshman year, i was under the impression that if i used 1000 threads, my job would finish 1000 times faster. needless to say, my machine crashed in a second, and my manager thought i was an idiot when i was surprised it didn't work

Comments
  • 29
    I imagine somebody else ranting about how there was this one kid who thought that if he used 1000 threads it'd complete a 1000 times faster.
  • 2
    @Numinex this world is too small
  • 2
    If you run it in CUDA, sure!
  • 6
    Well. Multithreading is never clear cut case.

    For example, a two core hyper threading machine can only run 4 parallel threads.

    But one of out applications proved to have its best performance at slightly over 80 threads. This it through testing.

    It was doing smtp connections through a 3rd party component that blocked the thread ;)

    And around 80 connections the waiting time for database connections and remote servers evened out to optimal performance.

    Of cause, with a better component and more efficient design we could improve that with fewer threads but my point is that 1000 threads might be a solution to some problems if the threads are blocked.

    In best case a thread can loop over multiple jobs that need to wait but circumstances might prevent optimizations.

    A good manager would have gone over the setup and explained why a 1000 threads might not improve performance ;)
  • 1
    You just didn't have a big enough cluster..
    . I'm sure it would be fine at Google and you'd be a genius that was thinking ahead
  • 2
    @billgates clarification: the "machine" was a macbook 😬
  • 0
    @Voxera haha yeah she told me about scheduling and context switching and stuff
  • 0
    @DLMousey only companies like Google/Facebook/Amazon would have. Their dev environment prolly has that many.

    "You need to multithread ur app? No problem, just point it to the dev cluster that has 1000 nodes"
  • 1
    @billgates om the other hand, multi threading over a cluster is another thing entirely so unless you have wait considerations I would guess Cuda is the only platform supporting 1000 threads, and I believe those threads work differently than normal anyhow.
Add Comment