Although threads and processes are already very light compared to each other, for highly concurrent Internet-level applications, mass production of threads still requires attention ~
Therefore, I would like to ask the elder, under the actual scenario, what are the defects of the current jvm for a large number of concurrent threads?
Of course, NIO may be a better choice ~ ~ but I still stubbornly want to know the answer to the above question ~
To sort out the previous comments:
You can’t know the result without actually measuring your application scenario.
The workload of each thread can be large or small. There may or may not be dependencies between threads. Threads may be Central Processor-intensive or I/O-intensive. With different scenarios, the performance of the system may vary from day to day. How can you generalize without actual application scenarios? In extreme cases, 1,000 low-priority sleep threads have little impact on system performance, but 10 high-priority Central Processor busy-cycle threads can keep your computer close to death.
So, run your business and find a pressure measuring tool to try.