📝 Update benchmark
All checks were successful
release-nightly / build-docker (push) Successful in 1m59s

This commit is contained in:
LittleSheep 2023-11-30 22:35:46 +08:00
parent 9f9ccedbc7
commit ef0464234a
5 changed files with 51 additions and 40 deletions

View File

@ -20,11 +20,13 @@ We use roadsign and nginx to host a same static file, and test them with [go-wrk
Here's the result: Here's the result:
| **Software** | Total Requests | Requests per Seconds | Transfer per Seconds | Avg Time | Fastest Time | Slowest Time | Errors Count | | **Software** | Total Requests | Requests per Seconds | Transfer per Seconds | Avg Time | Fastest Time | Slowest Time | Errors Count |
|:---------------------:|----------------|:--------------------:|:--------------------:|:-----------:|:------------:|:------------:|:------------:| |:---------------------:|:--------------:|:--------------------:|:--------------------:|:-----------:|:------------:|:------------:|:------------:|
| _Nginx_ | 515749 | 4299.58 | 2.05MB | 13.954846ms | 0s | 410.6972ms | 0 | | _Nginx_ | 515749 | 4299.58 | 2.05MB | 13.954846ms | 0s (Cached) | 410.6972ms | 0 |
| _RoadSign_ | 3256820 | 27265.90 | 12.27MB | 2.20055ms | 0s | 56.8726ms | 0 | | _RoadSign_ | 8905230 | 76626.70 | 30.98MB | 783.016µs | 28.542µs | 46.773083ms | 0 |
| _RoadSign w/ Prefork_ | 2188594 | 18248.45 | 8.21MB | 3.287951ms | 0s | 121.5189ms | 0 | | _RoadSign w/ Prefork_ | 4784308 | 40170.41 | 16.24MB | 1.493636ms | 34.291µs | 8.727666ms | 0 |
As result, roadsign undoubtedly is the fastest one. As result, roadsign undoubtedly is the fastest one.
It can be found that the prefork feature makes RoadSign more stable in concurrency. We can see this from the **Slowest Time**. At the same time, the **Fastest Time** is affected because reusing ports requires some extra steps to handle load balancing. Enable this feature at your own discretion depending on your use case.
More details can be found at benchmark's [README.md](./test/benchmark/README.md) More details can be found at benchmark's [README.md](./test/benchmark/README.md)

View File

@ -13,11 +13,12 @@ hypertext:
max_body_size: -1 max_body_size: -1
max_qps: -1 max_qps: -1
ports: ports:
- :80 - :8000
secured_ports: [] secured_ports: []
paths: paths:
configs: ./config configs: ./config
performance: performance:
request_logging: true
network_timeout: 3000 network_timeout: 3000
prefork: false prefork: false
security: security:

View File

@ -8,25 +8,31 @@ Welcome to contribute more tests of others reverse proxy software!
All tests are running on my workstation: All tests are running on my workstation:
```text ```text
.., LittleSheep@PEROPERO-WORKSTATION ..' littlesheep@LittleSheepdeMacBook-Pro
....,,:;+ccllll -------------------------------- ,xNMM. ------------------------------------
...,,+:; cllllllllllllllllll OS: Windows 10 Pro x86_64 .OMMMMo OS: macOS Sonoma 14.1 23B2073 arm64
,cclllllllllll lllllllllllllllllll Host: LENOVO 82TF lMM" Host: MacBook Pro (14-inch, Nov 2023, Three Thunderbolt 4 ports)
llllllllllllll lllllllllllllllllll Kernel: 10.0.19045 .;loddo:. .olloddol;. Kernel: 23.1.0
llllllllllllll lllllllllllllllllll Uptime: 1 hour, 22 mins cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 2 days, 1 hour, 16 mins
llllllllllllll lllllllllllllllllll Shell: pwsh 7.4.0 .KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 63 (brew), 4 (brew-cask)
llllllllllllll lllllllllllllllllll Resolution: 2560x1600 XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9
llllllllllllll lllllllllllllllllll DE: Aero ;MMMMMMMMMMMMMMMMMMMMMMMM: Display (Color LCD): 3024x1964 @ 120Hz (as 1512x982) [Built-in]
WM: Explorer :MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
llllllllllllll lllllllllllllllllll WM Theme: Custom .MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
llllllllllllll lllllllllllllllllll Terminal: Windows Terminal kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Multicolor (Dark)
llllllllllllll lllllllllllllllllll CPU: 12th Gen Intel i7-12700H (20) @ 2.690GHz 'XMMMMMMMMMMMMMMMMMMMMMMMMMMk Font: .AppleSystemUIFont [System], Helvetica [User]
llllllllllllll lllllllllllllllllll GPU: Caption 'XMMMMMMMMMMMMMMMMMMMMMMMMK. Cursor: Fill - Black, Outline - White (32px)
llllllllllllll lllllllllllllllllll GPU: NVIDIA GeForce RTX 3070 Laptop GPU kMMMMMMMMMMMMMMMMMMMMMMd Terminal: iTerm 3.4.22
`'ccllllllllll lllllllllllllllllll GPU ;KMMMMMMMWXXWMMMMMMMk. Terminal Font: MesloLGMNFM-Regular (12pt)
`' \*:: :ccllllllllllllllll Memory: 7318MiB / 16192MiB "cooc*" "*coo'" CPU: Apple M3 Max (14) @ 4.06 GHz
````''*::cll GPU: Apple M3 Max (30) [Integrated]
`` Memory: 18.45 GiB / 36.00 GiB (51%)
Swap: Disabled
Disk (/): 72.52 GiB / 926.35 GiB (8%) - apfs [Read-only]
Local IP (en0): 192.168.50.0/24 *
Battery: 100% [AC connected]
Power Adapter: 96W USB-C Power Adapter
Locale: zh_CN.UTF-8
``` ```
## Results ## Results
@ -54,13 +60,13 @@ go-wrk -c 60 -d 120 http://localhost:8001
go-wrk -c 60 -d 120 http://localhost:8000 go-wrk -c 60 -d 120 http://localhost:8000
# => Running 120s test @ http://localhost:8000 # => Running 120s test @ http://localhost:8000
# => 60 goroutine(s) running concurrently # => 60 goroutine(s) running concurrently
# => 3256820 requests in 1m59.446620043s, 1.43GB read # => 8905230 requests in 1m56.215762709s, 3.52GB read
# => Requests/sec: 27265.90 # => Requests/sec: 76626.70
# => Transfer/sec: 12.27MB # => Transfer/sec: 30.98MB
# => Avg Req Time: 2.20055ms # => Avg Req Time: 783.016µs
# => Fastest Request: 0s # => Fastest Request: 28.542µs
# => Slowest Request: 56.8726ms # => Slowest Request: 46.773083ms
# => Number of Errors: 0 # => Number of Errors: 0
``` ```
### RoadSign w/ Prefork ### RoadSign w/ Prefork
@ -68,12 +74,12 @@ go-wrk -c 60 -d 120 http://localhost:8000
```shell ```shell
go-wrk -c 60 -d 120 http://localhost:8000 go-wrk -c 60 -d 120 http://localhost:8000
# => Running 120s test @ http://localhost:8000 # => Running 120s test @ http://localhost:8000
# => 60 goroutine(s) running concurrently # => 60 goroutine(s) running concurrently
# => 2188594 requests in 1m59.933175915s, 985.16MB read # => 4784308 requests in 1m59.100307178s, 1.89GB read
# => Requests/sec: 18248.45 # => Requests/sec: 40170.41
# => Transfer/sec: 8.21MB # => Transfer/sec: 16.24MB
# => Avg Req Time: 3.287951ms # => Avg Req Time: 1.493636ms
# => Fastest Request: 0s # => Fastest Request: 34.291µs
# => Slowest Request: 121.5189ms # => Slowest Request: 8.727666ms
# => Number of Errors: 0 # => Number of Errors: 0
``` ```

View File

@ -17,6 +17,7 @@ hypertext:
paths: paths:
configs: ./config configs: ./config
performance: performance:
request_logging: false
network_timeout: 3000 network_timeout: 3000
prefork: true prefork: true
security: security:

View File

@ -17,6 +17,7 @@ hypertext:
paths: paths:
configs: ./config configs: ./config
performance: performance:
request_logging: false
network_timeout: 3000 network_timeout: 3000
prefork: false prefork: false
security: security: