ngxway

Benchmark

This project comes with a performance testing script ngxway_benchmark that provides observation indicators such as QPS, time consumption, memory usage, and CPU usage.

Dependencies

1. Usage

在启动本项目后,使用以下命令即可开始性能测试。

bash bin/ngxway_benchmark api

2. Testing

When starting, ngxway_benchmark will perform the following 14 test cases by default on the current machine:

image

3. Report

After completing the test, the system will generate a test report file named {NGXWAY_BASE_PATH}/logs/benchmark.html in the logs folder of the project root directory.

When you operate on a Mac system, the system automatically opens the test report in the Chrome browser. If your system is not a Mac or the test report fails to open normally, you can open it manually to view.

image

4. Summary

On an 8C16G machine, without any additional optimizations, the QPS of the ngxway gateway service fluctuated between 30,000 to 60,000, with an average of 50,000.

5、Comparison

In addition to testing the performance of ngxway, several performance comparisons were also conducted, with the following conclusions: In addition to testing the performance of ngxway, multiple performance comparisons were conducted on three different clean versions (without any modifications or optimizations) of the “goserver”, “nginx”, and “openresty” services under the “/example/” directory. The following conclusions were mainly drawn.