The number of memory and connection configurations for Tomcat servers detailed

Source: Internet
Author: User

If you are using the catalina.sh (Linux) or Catalina.bat (win) Startup:

Revise these two files, add the following sentence:

SET catalina_opts=-xms64m-xmx128m

If you are using the Winnt service to start:

Open C:winntsystem32egedt32.exe, in Hkey_local_machine-->software-->apache SOFTWARE foundation-->process Runner 1.0-->tomcat5-->parameters

To modify a property:

-xms64m

-xmx128m

It has been suggested that the value of XMS and xmx be as good as possible, and that the speed of memory recovery can be accelerated.

But without my verification. be interested to try.

Increase the number of Tomcat connections:

In the configuration in the Tomcat configuration file Server.xml, the parameters associated with the number of connections are:

Minprocessors: Minimum number of idle connection threads to improve system processing performance with default value of 10

Maxprocessors: Maximum number of connection threads, that is, the maximum number of requests that are processed concurrently, with a default value of 75

Acceptcount: Maximum number of connections allowed, should be greater than or equal to Maxprocessors, default is 100

Enablelookups: Whether to reverse the domain name, the value is: TRUE or false. To improve processing power, set to False

ConnectionTimeout: Network connection timeout, in milliseconds. A setting of 0 means never time out, and this setting is hidden. Typically, it can be set to 30000 milliseconds.

The parameters associated with the maximum number of connections are maxprocessors and Acceptcount. If you want to increase the number of concurrent connections, both of these parameters should be increased.

The maximum number of connections allowed by Web server is also subject to the kernel parameter settings of the operating system, typically Windows is 2000 or so, and Linux is about 1000.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.