I am writing a server, and I send each action of into a separate thread when the request is received. I do this because almost every request makes a database query. I am usi
As Pax rightly said, measure, don't guess. That what I did for DNSwitness and the results were suprising: the ideal number of threads was much higher than I thought, something like 15,000 threads to get the fastest results.
Of course, it depends on many things, that's why you must measure yourself.
Complete measures (in French only) in Combien de fils d'exécution ?.