Tomcat performance optimization server -- Connector

Source: Internet
Author: User

This element can be used for Tomcat 6.0.11 and later versions.

You can configure a shared thread pool for all conneins of a service. This process is useful when multiple ctor INS are running, and each connector must set a maxthread value, however, the maximum number of threads that a tomcat instance can use concurrently is always the same as the total number of maxthreads for all connectors.

This is because the processing requires too much hardware resources. Instead, you can use the executor element to configure a shared thread pool, and all connector ctor can share this thread pool.

Warning to allow the connector to use the executor thread pool, executor must be listed before connector in the server. xml file.

The executor attributes are shown below.

Attribute:ClassnameDescription: fully qualified Java class name and default value of executor: org. Apache. Catalina. Core. standardthread-executor.

Attribute:DaemonMeaning: determines whether the executor thread should be a background thread. If all other non-Background threads in the JVM end, the background thread ends.

For more information about background threads, see Java 1.5 (and later) javadoc web page of Java. Lang. thread. Default Value: false.

Attribute:NameDescription: name of the shared thread pool. This is the name that connector wants to reference for the shared thread pool. The name must be unique and the default value is none. The required parameter.

Attribute:NameprefixMeaning: on JVM, each running thread can have a name string. This attribute sets a prefix for the name string of each thread in the thread pool. Tomcat will append the thread number to the end of this prefix. The default value is tomcat-Exec -.


Attribute:MaxidletimeMeaning: duration (in milliseconds) of Idle threads allowed before Tomcat closes an idle thread ). Only when the number of currently active threads is greater than the value of minsparethread can Idle threads be disabled. Default Value: 60000 (one minute ).

Attribute:MaxthreadsDescription: Maximum number of threads that the thread pool can accommodate. Default Value: 200.

Attribute:MinsparethreadsDescription: Minimum number of inactive threads that Tomcat should always open. Default Value: 25.

Attribute:ThreadpriorityInteger: indicates the priority of all threads in the thread pool.

For more information about thread priority, see Java 1.5 (and later) javadoc web page of Java. Lang. thread. Default Value: thread. norm_priority.

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.