Tomcat configuration of memory and connections

Source: Internet
Author: User

If it is started using Catalina. Sh (Linux) or Catalina. BAT (WIN:
Modify the two files and add the following sentence:
Set catalina_opts =-xms64m-xmx128m

If you use the WINNT service to start:
Open C:/winnt/system32/regedt32.exe and go to HKEY_LOCAL_MACHINE --> Software --> Apache Software Foundation --> process runner 1.0 --> tomcat5 --> Parameters
Modify attributes:
-Xms64m
-Xmx128m

It is recommended that the value of XMS is the same as that of xmx, which can speed up memory recovery.

Increase Tomcat connections:

In the configuration in the tomcat configuration file server. XML, the parameters related to the number of connections include:
Minprocessors: Minimum number of idle connection threads to improve system processing performance. The default value is 10.
Maxprocessors: Maximum number of connection threads, that is, the maximum number of concurrent requests. The default value is 75.
Acceptcount: Maximum number of connections allowed. It must be greater than or equal to maxprocessors. The default value is 100.
Enablelookups: whether to check the domain name. The value is true or false. Set to false to improve processing capability.
Connectiontimeout: the network connection times out. Unit: milliseconds. If it is set to 0, it indicates that the request Never times out. This setting has potential risks. Generally, it can be set to 30000 ms.

The parameters related to the maximum number of connections are maxprocessors and acceptcount. To increase the number of concurrent connections, increase these two parameters at the same time.

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

 

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.