VMess Protocol Test
VMess Protocol Test
What Was Tested
Add 10000 users to simulate a large number of users using the VMess protocol at the same time
Test Description
The server supports both VMess+MD5 and VMessAEAD authentication; the client connects using VMessAEAD over websocket transport, with 10000 users, alterId 0
Test Environment
Ubuntu 20.04, 4 cores, 8 GB RAM, no swap
Test Method
Client->Proxy program->Server (simulated website)
- The client opens
3000connections to the server through the proxy. On each connection, the client sends a random1KB~16KBpacket to the server every2seconds, and the server sends a random1KB~16KBpacket to the client every1second - Each connection stays open for a random
30~120seconds and then closes; a new connection is opened immediately after each one closes, keeping the total number of active connections constant - Run for
10 minutes, idle for5 minutes, run for another5 minutes, then idle for10 minutes, for a total test time of30 minutes, recording CPU, memory, connection count, and network throughput
v2ray Monitoring Chart
The periodic CPU spikes occur because the VMess protocol regenerates authentication info for all users every 10 seconds, which consumes CPU. This is inherent to the VMess protocol, and the same applies to xray and soga below

xray Monitoring Chart

soga Monitoring Chart

Test Data Summary
| Program | Peak Memory Usage | Memory Usage at End | Avg CPU Usage (Peak Period) | Avg CPU Usage (Idle Period) |
|---|---|---|---|---|
v2ray-core(v4.45.2), 16KB connection buffer | 1079MB | 565MB | 33.62% | 1.45% |
xray-core(v1.5.9), 16KB connection buffer | 1084MB | 553MB | 31.74% | 1.43% |
soga(v2.7.7), default 16KB connection buffer, v2ray_reduce_memory not enabled (memory can be even lower when enabled) | 604MB | 276MB | 21.25% | 1.58% |