Home > Backend Development > PHP Problem > What is the maximum concurrency of a single tomcat?

What is the maximum concurrency of a single tomcat?

hzc
Release: 2023-03-01 15:00:01
Original
16116 people have browsed it

What is the maximum concurrency of a single tomcat?

What is the maximum concurrency of a single tomcat?

Tomcat The maximum number of requests configured by default is 150, also That is to say, it supports 150 concurrencies at the same time. Of course, it can also be increased.
When an application has more than 250 concurrencies, the cluster of application servers should be considered.
The specific number of concurrency it can carry depends on the hardware configuration. The more CPU , the higher the performance. The more memory allocated to JVM , the higher the performance, but it will also Increase the burden on GC.
The operating system has certain restrictions on the number of threads in a process:
Windows The number of threads in each process is not allowed to exceed 2000
Linux Each process The number of threads in Java is not allowed to exceed 1000
In addition, every time a thread is started in Java, it consumes 1MB of JVM memory space for the thread stack.
TomcatThe maximum number of concurrencies can be configured. In actual application, the maximum number of concurrencies has a great relationship with hardware performance and the number of CPUs. Better hardware and more processors will enable Tomcat to support more concurrency.
Tomcat The default HTTP implementation uses blocking Socket communication, and each request needs to create a thread for processing. The amount of concurrency in this mode is limited by the number of threads, but for Tomcat there are almost no BUG .
Tomcat You can also configure the NIO method of Socket communication, which is higher in performance than blocking, and each request does not need to create a thread. The processing and concurrency capabilities are higher than the former. But there is no blocked maturity.
This concurrency capability is also closely related to the logic of the application. If the logic is complex and requires a lot of calculations, the concurrency capability will inevitably decrease. If each request contains many database operations, the performance of the database will also be very high.
For a single database server, the number of client connections allowed is limited.
Concurrency issues involve the entire system architecture and business logic.
The system environment is different, the Tomcat version is different, the JDK version is different, and the modified setting parameters are different. The difference in concurrency is quite large.

The above is the detailed content of What is the maximum concurrency of a single tomcat?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template