After using pm2 to turn on node multithreading, the performance has not improved but has decreased?

  node.js, question

At present, Alibaba Cloud has 2 ESC’s with 5M bandwidth of 8 stone 16G memory and 2 RDS’s. All ESC servers are simply installed with node4.2.4(64-bit) and have not been configured.

Using PM2, test the official website NODE example:

const http = require('http');
 const hostname = '127.0.0.1';
 const port = 1337;
 http.createServer((req, res) => {
 res.writeHead(200, { 'Content-Type': 'text/plain' });
 res.end('Hello World\n');
 }).listen(port, hostname, () => {
 console.log(`Server running at http://${hostname}:${port}/`);
 });

Start a single thread using PM2:
┌──────────┬────┬──────┬──────┬────────┬─────────┬────────┬────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├──────────┼────┼──────┼──────┼────────┼─────────┼────────┼────────────┼──────────┤
│ test │ 0 │ fork │ 3431 │ online │ 0 │ 0s │ 5.031 MB │ disabled │
└──────────┴────┴──────┴──────┴────────┴─────────┴────────┴────────────┴──────────┘
Using stress tests, the concurrent results are:
webbench -c100 -t5http://localhost:1337/
The test results are:
Benchmarking: GEThttp://localhost:1337/
100 clients, running 5 sec.
Speed=259200 pages/min, 434191 bytes/sec.
Requests: 19211 susceed, 0 failed.

Using PM2 to Start 8 Threads and Monitor 1337 Port Service at the Same Time:
┌──────────┬────┬─────────┬──────┬────────┬─────────┬────────┬─────────────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ memory │ watching │
├──────────┼────┼─────────┼──────┼────────┼─────────┼────────┼─────────────┼──────────┤
│ test │ 0 │ cluster │ 3694 │ online │ 0 │ 0s │ 20.605 MB │ disabled │
│ test │ 1 │ cluster │ 3699 │ online │ 0 │ 0s │ 20.648 MB │ disabled │
│ test │ 2 │ cluster │ 3704 │ online │ 0 │ 0s │ 18.617 MB │ disabled │
│ test │ 3 │ cluster │ 3715 │ online │ 0 │ 0s │ 18.656 MB │ disabled │
│ test │ 4 │ cluster │ 3724 │ online │ 0 │ 0s │ 18.664 MB │ disabled │
│ test │ 5 │ cluster │ 3733 │ online │ 0 │ 0s │ 20.582 MB │ disabled │
│ test │ 6 │ cluster │ 3742 │ online │ 0 │ 0s │ 17.852 MB │ disabled │
│ test │ 7 │ cluster │ 3751 │ online │ 0 │ 0s │ 14.590 MB │ disabled │
└──────────┴────┴─────────┴──────┴────────┴─────────┴────────┴─────────────┴──────────┘

webbench -c100 -t5http://localhost:1337/
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GEThttp://localhost:1337/
100 clients, running 5 sec.

Speed=226704pages/min, 427094 bytes/sec.
Requests: 18892 susceed, 0 failed.

Stress test results improved but decreased, Why is this?

I recommend that you use another machine to test the local environment. When testing the local environment, the testing software will also take up system resources.