2 ms·
"""If you have control of all the pieces, and don't need to interface to things that block, there's no reason to use more threads than cpus IMHO""" I only part
by st3fan 19y ago
"""If you have control of all the pieces, and don't need to interface to things that block, there's no reason to use more threads than cpus IMHO"""
I only partially agree with this.
It certainly makes no sense to have many threads running if you're talking about very CPU intensive application. We (Polar Rose) do very intense image processing (Java combined with native C++ code) and never have more than NCPU worker threads running at the same time.
We do have a whole bunch of threads running around that for network services like JMS, JMX, etc. But you can basically ignore the overhead of that. It's like having idle UNIX processes. Or are you also saying that having more then NCPU processes running is sloppy?
S.