# VMess 协议测试

## VMess 协议测试

### 测试内容

添加`10000`名用户，模拟大量用户同时使用`VMess 协议`的情况

### 测试说明

服务端同时支持`VMess+MD5`+`VMessAEAD`认证，客户端使用`VMessAEAD`进行连接，`websocket`传输模式，`10000`名用户，alterId 为`0`

### 测试环境

Ubuntu 20.04，4核8G，无 swap

### 测试方法

`客户端`->`代理程序`->`服务端(模拟网站)`

1. 使用客户端通过代理建立`3000`条连接至服务端，客户端在每条连接中每`2`秒随机发送`1KB~16KB`的数据包至服务端，服务端在每条连接中每`1`秒随机发送`1KB~16KB`的数据包至客户端
2. 每条连接随机持续`30~120`秒后关闭，每关闭一条连接后会立刻建立新连接，保持正在运行的连接总数不变
3. 保持运行`10分钟`，再静置`5分钟`，继续运行`5分钟`，最后静置`10分钟`，总共测试`30分钟`，记录 CPU、内存、连接数、网速情况

### v2ray 监控图

> CPU 间歇上升是因为 VMess 协议每隔 10 秒会为所有用户生成新的验证信息，需要占用 CPU，VMess 协议特性，以下 xray 和 soga 也是同理

![](/files/fmklL7XQzvB9y0xYk0Mj)

### xray 监控图

![](/files/a9V4YoLG4j4I0NMqO4ag)

### soga 监控图

![](/files/C2UTWsIPRQAdjUvBzgk2)

### 测试数据汇总

<table><thead><tr><th>程序</th><th width="150">最高内存占用</th><th width="150">结束时内存占用</th><th width="150">高峰时段 CPU 平均占用率</th><th>闲置时段 CPU 平均占用率</th></tr></thead><tbody><tr><td>v2ray-core(v4.45.2)，设置<code>16KB</code>连接缓存</td><td>1079MB</td><td>565MB</td><td>33.62%</td><td>1.45%</td></tr><tr><td>xray-core(v1.5.9)，设置<code>16KB</code>连接缓存</td><td>1084MB</td><td>553MB</td><td>31.74%</td><td>1.43%</td></tr><tr><td>soga(v2.7.7)，默认<code>16KB</code>连接缓存，未开启<code>v2ray_reduce_memory</code>，开启后内存可更低</td><td>604MB</td><td>276MB</td><td>21.25%</td><td>1.58%</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://soga.yougotme.cc/test/vmess-test.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
