All Products
Search
Document Center

Enterprise Distributed Application Service:Configure JVM and Tomcat parameters for applications in an ECS cluster

Last Updated:Dec 27, 2023

You can appropriately configure Java virtual machine (JVM) parameters and Tomcat parameters for your application in an Elastic Compute Service (ECS) cluster. This helps improve the performance and throughput of your application and reduce response latency. This topic describes how to configure the JVM parameters and Tomcat parameters for an application that is deployed in an ECS cluster.

Procedure

You can configure JVM parameters, Tomcat parameters, and mount scripts for an application or its instance groups. Settings for an instance group precede settings for the application. If an instance group does not contain the relevant settings, the settings of the application are used for the instance group.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, choose Application Management > Applications. In the top navigation bar, select a region. In the upper part of the Applications page, select a microservices namespace from the Microservices Namespace drop-down list. Then, click the name of the application that you want to manage.

  3. Go to the application settings or group settings page.

    • If you go to the application settings page, perform the following operations:

      In the Application Settings section of the Basic Information tab, configure JVM Parameters, Basic Information, or Mount Script.

    • If you go to the group settings page, perform the following operations:

      1. Click the Instance Information tab. On the tab that appears, move the pointer over Group Settings next to the group whose settings you want to configure.

      2. Select JVM, Tomcat, or Mount Script from the Group Settings drop-down list.

Configure JVM parameters

  1. In the Application Settings section of the Basic Information tab, click Edit next to JVM Parameters.

  2. Click Memory Configuration, Application, GC Policy, Tool, and Custom to configure the relevant parameters.

  3. Click Configure JVM Parameters to complete the configuration.

    Note

    If the preceding parameter types and specific parameters cannot meet your requirements, click Custom and configure custom parameters in the field next to Custom Parameters.

  4. Restart the application for the JVM parameters to take effect.

Configure Tomcat parameters

  1. In the Application Settings section, click Edit next to Application Settings to configure Tomcat parameters.

    Parameter

    Description

    Application Port

    Port numbers range from 1024 to 65535. You must have root permissions to configure port numbers less than 1024, while you only need to have Admin permissions to configure a container. Therefore, we recommend that you set the port number to 1024 or higher. If this parameter is not configured, the default value 8080 is used.

    Tomcat Context

    Select an application access path:

    • If you select Package Name, you do not need to configure the Custom Path parameter. The access path of the application is the name of the WAR package.

    • If you select Root Directory, you do not need to configure the Custom Path parameter. The access path of the application is /.

    • If you select Custom, you must specify a value for the Custom Path parameter. If you do not configure this parameter, the default access path of the application is the name of the WAR package that is used to deploy the application.

    Maximum Threads

    Specify the maximum number of connections in the connection pool, which corresponds to the maxThreads parameter. The default value is 400. This parameter greatly affects the application performance. We recommend that you configure this parameter under professional guidance.

    Tomcat Encoding

    Select an encoding format for Tomcat. Valid values include UTF-8, ISO-8859-1, GBK, and GB2312. Default value: ISO-8859-1.

  2. Click Configure Tomcat to complete the configuration.

Modify the name of an application

In the Application Settings section, click Basic Information, reconfigure the Application Name and Application Description parameters based on your business requirements, and then click Modify.