All Products
Search
Document Center

Application Real-Time Monitoring Service:Thread pool and connection pool monitoring

Last Updated:Jun 03, 2024

You can use the thread pool and connection pool monitoring feature to view metrics of the thread pool and connection pool of an application that is monitored by Application Real-Time Monitoring Service (ARMS). The provided metrics include the number of core threads, number of existing threads, maximum number of allowed threads, number of active threads, number of submitted tasks, and maximum number of tasks allowed in the task queue.

Prerequisites

Your application is monitored by ARMS. For more information, see Overview.

Important

Only Application Monitoring Pro Edition supports the thread pool and connection pool monitoring feature.

Enable thread pool and connection pool monitoring

The ARMS agent earlier than V2.7.1.3 does not support thread pool and connection pool monitoring. Upgrade the agent version to 2.7.1.3 or later. For more information, see Upgrade the ARMS agent.

  • By default, thread pool and connection pool monitoring is enabled for the ARMS agent V2.7.3.5 and later.

  • If you are using the ARMS agent V2.7.1.3 or later, perform the following operations to manually enable thread pool and connection pool monitoring:

  1. Log on to the ARMS console. In the left-side navigation pane, choose Application Monitoring > Applications.

  2. On the Applications page, select a region in the top navigation bar and click the name of the application that you want to manage.

    Note

    If the Java图标 icon is displayed in the Language column, the application is connected to Application Monitoring. If a hyphen (-) is displayed, the application is connected to Managed Service for OpenTelemetry.

  3. In the left-side navigation pane, click Application Settings.

  4. Click the Custom Configuration tab. On the Custom Configuration tab, turn on Thread pool, connection pool monitoring in the Advanced Settings section.

View metrics

After you enable the thread pool and connection pool monitoring feature, you can view the metrics on the Thread pool monitoring and Connection pool monitoring tabs of the Application Details page.

Figure 1. Thread pool monitoring线程池监控

Figure 2. Connection pool monitoring连接池监控

Frameworks supported by thread pool monitoring

Thread pool monitoring supports the Apache Tomcat, High-speed Service Framework (HSF), Apache Dubbo, Vert.x, and Undertow frameworks. The ARMS agent V3.1.x and earlier supports Undertow V1.x and V2.x, whereas the ARMS agent V3.2.x and later supports all Undertow versions.

The following metrics are collected.

Metric description

Metric

Number of core threads in a thread pool

arms_threadpool_core_size

Maximum number of threads in a thread pool

arms_threadpool_max_size

Number of active threads in a thread pool

arms_threadpool_active_size

Thread pool queue size

arms_threadpool_queue_size

Current size of a thread pool

arms_threadpool_current_size

Thread pool monitoring supports the SchedulerX framework. The following metric is collected.

Metric description

Metric

Number of active threads in a thread pool

arms_threadpool_active_size

Frameworks supported by connection pool monitoring

Connection pool monitoring supports the OkHttp2 and OkHttp3 frameworks. The following metrics are collected.

Metric description

Metric

Number of active connections in a connection pool

arms_threadpool_active_size

Number of current connections in a connection pool

arms_threadpool_current_size

Connection pool monitoring supports the Apache HttpClient framework. The following metrics are collected.

Metric description

Metric

Number of current connections in a connection pool

arms_threadpool_current_size

Maximum number of connections in a connection pool

arms_threadpool_max_size

Number of waiting queues in a connection pool

arms_threadpool_queue_size

Connection pool monitoring supports the Apache Druid framework. The following metrics are collected.

Metric description

Metric

Number of active connections in a connection pool

arms_threadpool_active_size

Maximum number of connections in a connection pool

arms_threadpool_max_size

Connection pool monitoring supports the HikariCP framework. The following metrics are collected.

Metric description

Metric

Number of active connections in a connection pool

arms_threadpool_active_size

Maximum number of connections in a connection pool

arms_threadpool_max_size