How to set the appropriate thread number for my server side thread pool?

I just want to ask a rookie question: how to set the appropriate thread number for my server side thread pool?

  • Are there any general rules or formulas that I can follow?
  • What problems should I consider? For example, the number of network requests per second, the number of processor cores, the frequency of CPU and memory usage in my application, the hardware that I use on my server, etc.
+3
source share
1 answer

, , , , 4 ( HyperThreading), 4. hyperthreading 8.

, , , : , , (, 8 , , 10 , ).

, , , , (, ) .

, : ? , , / .. (, ..), , ( , ).

​​ Google, , : ", concurrency, , - java, ".

+1

All Articles