2024-11-18 22:51:54 +04:00
|
|
|
# sing-box vs xray
|
|
|
|
|
|
|
|
An attempt on benchmarking these two multi-protocol proxying frameworks.
|
|
|
|
It's reproducible, configs are not redacted, I even uploaded self-signed TLS cert+key,
|
|
|
|
client commands are shown in `bench_*.txt` files.
|
|
|
|
All you need is iperf3 on client and server, hyperfine on client,
|
|
|
|
xray and sing-box binaries (take from "Releases" or compile by yourself) placed on client and server.
|
|
|
|
|
|
|
|
Results in a nutshell: (TODO)
|
|
|
|
|
|
|
|
## hyperfine, curl, direct outbound
|
|
|
|
|
2024-11-18 22:58:22 +04:00
|
|
|
File: `bench_curl_direct.txt`
|
|
|
|
|
2024-11-18 22:51:54 +04:00
|
|
|
Measurement of execution time of curl.
|
|
|
|
Shows overhead of a proxying software.
|
|
|
|
|
|
|
|
Proxies are set up to accept requests by SOCKSv5 and forward directly to net.
|
|
|
|
|
|
|
|
units: ms (less is better)
|
|
|
|
|
|
|
|
### ~1.5M binary file over https from dc09.ru
|
|
|
|
|proxy|min|avg|max|
|
|
|
|
|:----|:-:|:-:|:-:|
|
|
|
|
|no proxy|383.3|477.2|697.7|
|
|
|
|
|sing-box|376.4|478.6|681.2|
|
|
|
|
|xray|374.2|467.7|662.8|
|
|
|
|
|
|
|
|
### 162 bytes HTML over plain http from dc09.ru
|
|
|
|
|proxy|min|avg|max|
|
|
|
|
|:----|:-:|:-:|:-:|
|
|
|
|
|no proxy|51.0|60.5|81.7|
|
|
|
|
|sing-box|49.1|62.2|69.9|
|
|
|
|
|xray|51.2|61.6|76.4|
|
|
|
|
|
|
|
|
### ~150K HTML over https from github.com
|
|
|
|
|proxy|min|avg|max|
|
|
|
|
|:----|:-:|:-:|:-:|
|
|
|
|
|no proxy|365.3|402.1|449.8|
|
|
|
|
|sing-box|338.6|390.5|445.5|
|
|
|
|
|xray|342.3|390.8|426.0|
|
|
|
|
|
|
|
|
## iperf3, proxied outbound
|
|
|
|
|
|
|
|
Measurement of bandwidth with iperf3.
|
|
|
|
Shows processing speed of a proxying software.
|
|
|
|
|
|
|
|
Client proxy (sing-box or xray, specified by a table column) is connected to SOCKSv5, Trojan or VLESS inbound on dc09.ru;
|
|
|
|
server proxy on dc09.ru is either sing-box or xray (heading before a table), accepts requests on all 3 inbounds;
|
|
|
|
iperf3 server is on the same host as a server proxy.
|
|
|
|
|
|
|
|
units: Mbit/s (more is better)
|
|
|
|
|
|
|
|
### no proxy - `bench_iperf_direct.txt`
|
2024-11-18 22:58:22 +04:00
|
|
|
File: `bench_iperf_direct.txt`
|
|
|
|
|
2024-11-18 22:51:54 +04:00
|
|
|
**sender** 93.7 Mbit/s (**receiver** 91.4 Mbit/s)
|
|
|
|
|
2024-11-18 22:58:22 +04:00
|
|
|
### server is sing-box
|
|
|
|
File: `bench_sb_*.txt`
|
|
|
|
|
2024-11-18 22:51:54 +04:00
|
|
|
|protocol|sing-box|xray client|
|
|
|
|
|:-------|:------:|:---------:|
|
|
|
|
|SOCKSv5|102.0 (91.3)|102.0 (91.3)|
|
|
|
|
|Trojan|101.3 (91.0)|100.5 (90.6)|
|
|
|
|
|VLESS|101.3 (91.3)|101.5 (90.7)|
|
|
|
|
|
|
|
|
### server is xray - `bench_xray_*`
|
2024-11-18 22:58:22 +04:00
|
|
|
File: `bench_xray_*.txt`
|
|
|
|
|
2024-11-18 22:51:54 +04:00
|
|
|
|protocol|sing-box|xray client|
|
|
|
|
|:-------|:------:|:---------:|
|
|
|
|
|SOCKSv5|101.5 (91.3)|103.0 (91.4)|
|
|
|
|
|Trojan|100.1 (90.0)|100.5 (90.6)|
|
|
|
|
|VLESS|99.6 (91.1)|102.0 (91.1)|
|