Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Numinex10867yI 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.
-
Voxera115857yWell. 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 ;) -
donuts238487yYou 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 -
donuts238487y@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" -
Voxera115857y@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.
Related Rants
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
undefined
threads
fail