Performance test report of the ARMS agent for Node.js

Updated at:

The Application Real-Time Monitoring Service (ARMS) agent for Node.js instruments your application at runtime for application performance management, which introduces some performance overhead. This report simulates real-world usage scenarios and measures the overhead of the ARMS agent for Node.js under different levels of service traffic. Use this report to evaluate the performance impact before you connect your Node.js application to Application Monitoring.

Test scenario

The following figure shows the overall architecture.

image

The test architecture consists of a load generator, a Node.js application built on the Express framework, and two backend services: MySQL and Redis. The workload splits requests into two types: requests that access MySQL and requests that access Redis. Each type accounts for 50% of the QPS.

Test environment

  • The load generator is provided by Alibaba Cloud Performance Testing (PTS).

  • The Node.js application is deployed in an ACK Pro cluster. The node instance type is ecs.c7.2xlarge (8 vCPUs, 16 GiB of memory), and the operating system of the nodes is Alibaba Cloud Linux 3.

  • The pod resources of the Node.js application are 2 cores and 2 GiB of memory, with 4 replicas.

  • The backend dependencies are ApsaraDB RDS for MySQL and ApsaraDB for Redis. Both are accessed over the VPC internal network.

  • The ARMS agent for Node.js uses @loongsuite/cms_node_sdk version 1.0.8 and is loaded by using the --import option.

  • All basic features of ARMS Application Monitoring for Node.js (including metrics and traces) and all plug-in features are enabled during the tests.

Test procedure

  1. Without the ARMS agent for Node.js installed, run stress tests at three QPS levels: 500, 1,000, and 2,000. Each test runs for 3 minutes. The results serve as the baseline performance metrics.

  2. Install the ARMS agent for Node.js, set the sampling policy to a fixed sampling rate of 10%, and repeat the tests in step 1. Compare the differences in CPU overhead, memory overhead, and response time (RT) of the Node.js application.

  3. Install the ARMS agent for Node.js, set the sampling policy to a fixed sampling rate of 100%, and repeat the tests in step 1. Compare the differences in CPU overhead, memory overhead, and RT of the Node.js application.

Baseline performance (without agent)

The following table lists the baseline performance metrics of the Node.js application without the ARMS agent for Node.js.

Item

CPU

Memory

RT

500 QPS

3.5%

2.8%

34.4 ms

1,000 QPS

6.3%

2.9%

34.7 ms

2,000 QPS

12.7%

3.2%

36.6 ms

Note
  • CPU indicates the percentage of CPU used by the pod out of the total CPU.

  • Memory indicates the percentage of memory used by the pod out of the total memory.

  • RT indicates the average response time of requests, in milliseconds.

Performance with the ARMS agent

The following table lists the performance metrics of the Node.js application with the ARMS agent for Node.js installed, at fixed sampling rates of 10% and 100%.

Item

CPU at 10% sampling rate

Memory at 10% sampling rate

RT at 10% sampling rate

CPU at 100% sampling rate

Memory at 100% sampling rate

RT at 100% sampling rate

500 QPS

6.1%

5.2%

34.8 ms

8.5%

5.6%

36.1 ms

1,000 QPS

10.9%

5.4%

35.8 ms

15.5%

5.5%

38.6 ms

2,000 QPS

18.6%

5.1%

38.5 ms

27.8%

6.1%

42.0 ms

Performance overhead

The following table lists the performance overhead of the ARMS agent for Node.js compared with the baseline.

Item

CPU at 10% sampling rate

Memory at 10% sampling rate

RT at 10% sampling rate

CPU at 100% sampling rate

Memory at 100% sampling rate

RT at 100% sampling rate

500 QPS

+2.6%

+2.4%

+0.4 ms

+5.0%

+2.8%

+1.7 ms

1,000 QPS

+4.6%

+2.5%

+1.1 ms

+9.2%

+2.6%

+3.9 ms

2,000 QPS

+5.9%

+1.9%

+1.9 ms

+15.1%

+2.9%

+5.4 ms

Summary

  • At a fixed sampling rate of 10%, the ARMS agent for Node.js adds at most 5.9% CPU overhead and 2.5% memory overhead.

  • At a fixed sampling rate of 100%, the ARMS agent for Node.js adds at most 15.1% CPU overhead and 2.9% memory overhead.

  • The ARMS agent for Node.js has little impact on RT (request response time). At 2,000 QPS, a fixed sampling rate of 10% increases RT by 1.9 ms, and a fixed sampling rate of 100% increases RT by 5.4 ms.