Skip to content

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)

  1. The client opens 3000 connections to the server through the proxy. On each connection, the client sends a random 1KB~16KB packet to the server every 2 seconds, and the server sends a random 1KB~16KB packet to the client every 1 second
  2. Each connection stays open for a random 30~120 seconds and then closes; a new connection is opened immediately after each one closes, keeping the total number of active connections constant
  3. Run for 10 minutes, idle for 5 minutes, run for another 5 minutes, then idle for 10 minutes, for a total test time of 30 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

v2ray monitoring

xray Monitoring Chart ​

xray monitoring

soga Monitoring Chart ​

soga monitoring

Test Data Summary ​

ProgramPeak Memory UsageMemory Usage at EndAvg CPU Usage (Peak Period)Avg CPU Usage (Idle Period)
v2ray-core(v4.45.2), 16KB connection buffer1079MB565MB33.62%1.45%
xray-core(v1.5.9), 16KB connection buffer1084MB553MB31.74%1.43%
soga(v2.7.7), default 16KB connection buffer, v2ray_reduce_memory not enabled (memory can be even lower when enabled)604MB276MB21.25%1.58%