Skip to content

Commit 2745afb

Browse files
authored
docs: add benchmarking result (#92)
1 parent cbdbbdb commit 2745afb

File tree

2 files changed

+130
-0
lines changed

2 files changed

+130
-0
lines changed

docs/benchmark.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
English | [中文](benchmark.zh_CN.md)
2+
3+
# Benchmark
4+
5+
## Environment
6+
7+
* Tencent Cloud Standard SA2 CVM, equipped with an AMD EPYC™ Rome processor
8+
* uname -a
9+
* Linux VM-0-13-centos 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
10+
* cat /proc/cpuinfo
11+
* Refer to the appendix (8 cores, 2.60GHz)
12+
* Memory: 16GB
13+
* Network environment: The average ping latency between the calling and called machines is around 0.2ms
14+
* Go version used during compilation: 1.21.2
15+
* Server-side: Bound to 8 cores (taskset -c 0-7)
16+
* Logic: Using the trpc protocol to echo the string "hello"
17+
* Corresponding packet length for sending: 122
18+
* Corresponding packet length for receiving: 27
19+
* Client-side: Bound to 8 cores (taskset -c 0-7)
20+
* Using eab and a load testing script
21+
* The load testing feature of eab involves maintaining a fixed number of long connections to the server and concurrently sending and receiving packets on these connections
22+
* The built-in tnet is enabled by default
23+
* Number of pollers enabled for tnet: 4
24+
* Client-side timeout: Set to 2 seconds by eab
25+
* Server-side timeout: Set to 1 second through framework configuration
26+
27+
## Scenario
28+
29+
Throughput Testing: When the P99 latency of the caller is around 10ms, measure the QPS (Queries Per Second) of the service.
30+
31+
32+
|Mode| Connections| QPS/w| Avery Latency/ms| P90 Latency/ms| P99 Latency/ms| P999 Latency/ms|
33+
|-|-|-|-|-|-|-|
34+
|Synchronous| 100| 486652| 2.67| 4.22 |10.24 |16.76|
35+
|Asynchronous| 100| 404355| 2.61| 4.33 |10.34 |16.07|
36+
37+
## Appendix
38+
39+
```shell
40+
vendor_id : AuthenticAMD
41+
cpu family : 23
42+
model : 49
43+
model name : AMD EPYC 7K62 48-Core Processor
44+
stepping : 0
45+
microcode : 0x1000065
46+
cpu MHz : 2595.124
47+
cache size : 512 KB
48+
physical id : 0
49+
siblings : 8
50+
core id : 11
51+
cpu cores : 8
52+
apicid : 7
53+
initial apicid : 7
54+
fpu : yes
55+
fpu_exception : yes
56+
cpuid level : 13
57+
wp : yes
58+
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm art rep_good nopl extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext rsb_ctxsw ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 arat
59+
bogomips : 5190.24
60+
TLB size : 1024 4K pages
61+
clflush size : 64
62+
cache_alignment : 64
63+
address sizes : 48 bits physical, 48 bits virtual
64+
power management:
65+
```

docs/benchmark.zh_CN.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
[English](benchmark.md) | 中文
2+
3+
# 性能测试
4+
5+
## 测试环境
6+
7+
* 腾讯云标准型 SA2 CVM,处理器型号 AMD EPYC™ Rome
8+
* uname -a
9+
* Linux VM-0-13-centos 3.10.0-1160.92.1.el7.x86_64 #1 SMP Tue Jun 20 11:48:01 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
10+
* cat /proc/cpuinfo
11+
* 见附录(8 核,2.60GHz)
12+
* 内存:16GB
13+
* 网络环境:主调和被调机器间 ping 平均延迟为 0.2ms 左右
14+
* 编译时使用的 Go 版本:1.21.2
15+
* 服务端:绑 8 核(taskset -c 0-7)
16+
* 逻辑:使用 trpc 协议 echo "hello" 字符串
17+
* 对应的发包包长 122
18+
* 对应的收包包长 27
19+
* 客户端:绑 8 核(taskset -c 0-7)
20+
* 使用 eab 以及压测脚本
21+
* 压测特点是 eab 会向服务端维持固定数量的长连接,然后在这些长连接上并发收发包
22+
* 默认都是启用的内置 tnet
23+
* 启用 tnet 的 poller 个数: 4
24+
* 客户端超时时间:由 eab 设置 2s
25+
* 服务端超时时间:通过框架配置设置为 1s
26+
27+
## 测试场景
28+
29+
吞吐测试:调用方的 P99 延时在 10ms 左右时,测量服务的 QPS
30+
31+
|模式| 连接数| QPS/w| 平均时延/ms| P90时延/ms| P99时延/ms| P999时延/ms|
32+
|-|-|-|-|-|-|-|
33+
|同步| 100| 486652| 2.67| 4.22 |10.24 |16.76|
34+
|异步| 100| 404355| 2.61| 4.33 |10.34 |16.07|
35+
36+
## 附录
37+
38+
```shell
39+
vendor_id : AuthenticAMD
40+
cpu family : 23
41+
model : 49
42+
model name : AMD EPYC 7K62 48-Core Processor
43+
stepping : 0
44+
microcode : 0x1000065
45+
cpu MHz : 2595.124
46+
cache size : 512 KB
47+
physical id : 0
48+
siblings : 8
49+
core id : 11
50+
cpu cores : 8
51+
apicid : 7
52+
initial apicid : 7
53+
fpu : yes
54+
fpu_exception : yes
55+
cpuid level : 13
56+
wp : yes
57+
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm art rep_good nopl extd_apicid eagerfpu pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw topoext rsb_ctxsw ibpb vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 arat
58+
bogomips : 5190.24
59+
TLB size : 1024 4K pages
60+
clflush size : 64
61+
cache_alignment : 64
62+
address sizes : 48 bits physical, 48 bits virtual
63+
power management:
64+
```
65+

0 commit comments

Comments
 (0)