菜单

QCA9533 shadowsocks 性能测试(附测试脚本)

2019年4月7日 - 智能硬件 & IOT

注:本文仅测试shadowsocks的速率,使用ss-redir作为透明代理时速率会更低些。

Client: MagicBox AC750 – MIPS 24Kc – QCA9533 @ 650MHz– OpenWrt master-190406

Server: PC – x86 – Intel E3-1231 v3 @ 3.4GHz – Arch Linux rolling

均使用官方软件源中的shadowsocks-libev软件,测试结果(仅常用算法):

 # old ciphers
 rc4-md5                  39.5 Mbits/sec
 aes-128-cfb              26.7 Mbits/sec
 aes-192-cfb              25.0 Mbits/sec
 aes-256-cfb              23.7 Mbits/sec
 salsa20                  34.4 Mbits/sec
 chacha20                 37.1 Mbits/sec

 # new ciphers
 aes-128-gcm              16.9 Mbits/sec
 aes-192-gcm              16.1 Mbits/sec
 aes-256-gcm              15.6 Mbits/sec
 chacha20-ietf-poly1305   29.5 Mbits/sec
 xchacha20-ietf-poly1305  28.9 Mbits/sec

以下脚本应在两台机器上分别执行来模拟实际环境,在同一台设备上使用会造成ss-server + ss-tunnel双倍的cpu使用量。

ss-bench-client.sh

#!/bin/sh

# Copyright (c) 2019 SiYu Wu <wu.siyu@hotmail.com>
# simple shadowsocks benchmark script
# Usage: ss-bench-client.sh <server> <encrypt_method>

if [ "$#" -ne 2 ]; then
  echo "Usage: $0 <server> <encrypt_method>" >&2
  exit 1
fi

ss-tunnel -s $1 -p 5050 -m $2 -k test -L 127.0.0.1:5201 -l 5051 &
pid=$!
echo "ss-tunnel started, pid=$pid"

sleep 1
iperf3 -c 127.0.0.1 -p 5051 -R

kill $pid &> /dev/null

ss-bench-server.sh

#!/bin/sh

# Copyright (c) 2019 SiYu Wu <wu.siyu@hotmail.com>
# simple shadowsocks benchmark script
# Usage: ss-bench-server.sh <encrypt_method>

if [ "$#" -ne 1 ]; then
  echo "Usage: $0 <encrypt_method>" >&2
  exit 1
fi

ss-server -s 0.0.0.0 -p 5050 -m $1 -k test &
pid=$!
echo "ss-server started, pid=$pid"

iperf3 -s

kill $pid &> /dev/null

0

发表评论

电子邮件地址不会被公开。 必填项已用*标注