🎉 Start developing!
This commit is contained in:
@@ -1,85 +0,0 @@
|
||||
# Benchmark
|
||||
|
||||
This result is design for test the performance of the roadsign.
|
||||
Welcome to contribute more tests of others reverse proxy software!
|
||||
|
||||
## Platform
|
||||
|
||||
All tests are running on my workstation:
|
||||
|
||||
```text
|
||||
..' littlesheep@LittleSheepdeMacBook-Pro
|
||||
,xNMM. ------------------------------------
|
||||
.OMMMMo OS: macOS Sonoma 14.1 23B2073 arm64
|
||||
lMM" Host: MacBook Pro (14-inch, Nov 2023, Three Thunderbolt 4 ports)
|
||||
.;loddo:. .olloddol;. Kernel: 23.1.0
|
||||
cKMMMMMMMMMMNWMMMMMMMMMM0: Uptime: 2 days, 1 hour, 16 mins
|
||||
.KMMMMMMMMMMMMMMMMMMMMMMMWd. Packages: 63 (brew), 4 (brew-cask)
|
||||
XMMMMMMMMMMMMMMMMMMMMMMMX. Shell: zsh 5.9
|
||||
;MMMMMMMMMMMMMMMMMMMMMMMM: Display (Color LCD): 3024x1964 @ 120Hz (as 1512x982) [Built-in]
|
||||
:MMMMMMMMMMMMMMMMMMMMMMMM: DE: Aqua
|
||||
.MMMMMMMMMMMMMMMMMMMMMMMMX. WM: Quartz Compositor
|
||||
kMMMMMMMMMMMMMMMMMMMMMMMMWd. WM Theme: Multicolor (Dark)
|
||||
'XMMMMMMMMMMMMMMMMMMMMMMMMMMk Font: .AppleSystemUIFont [System], Helvetica [User]
|
||||
'XMMMMMMMMMMMMMMMMMMMMMMMMK. Cursor: Fill - Black, Outline - White (32px)
|
||||
kMMMMMMMMMMMMMMMMMMMMMMd Terminal: iTerm 3.4.22
|
||||
;KMMMMMMMWXXWMMMMMMMk. Terminal Font: MesloLGMNFM-Regular (12pt)
|
||||
"cooc*" "*coo'" CPU: Apple M3 Max (14) @ 4.06 GHz
|
||||
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
|
||||
|
||||
The tests are run in the order `nginx -> roadsign without prefork -> roadsign with prefork`. There is no reason why nginx performance should be affected by hardware temperature.
|
||||
|
||||
### Nginx
|
||||
|
||||
```shell
|
||||
go-wrk -c 60 -d 120 http://localhost:8001
|
||||
# => Running 120s test @ http://localhost:8001
|
||||
# => 60 goroutine(s) running concurrently
|
||||
# => 515749 requests in 1m59.953302003s, 245.92MB read
|
||||
# => Requests/sec: 4299.58
|
||||
# => Transfer/sec: 2.05MB
|
||||
# => Avg Req Time: 13.954846ms
|
||||
# => Fastest Request: 0s
|
||||
# => Slowest Request: 410.6972ms
|
||||
# => Number of Errors: 0
|
||||
```
|
||||
|
||||
### RoadSign
|
||||
|
||||
```shell
|
||||
go-wrk -c 60 -d 120 http://localhost:8000
|
||||
# => Running 120s test @ http://localhost:8000
|
||||
# => 60 goroutine(s) running concurrently
|
||||
# => 8905230 requests in 1m56.215762709s, 3.52GB read
|
||||
# => Requests/sec: 76626.70
|
||||
# => Transfer/sec: 30.98MB
|
||||
# => Avg Req Time: 783.016µs
|
||||
# => Fastest Request: 28.542µs
|
||||
# => Slowest Request: 46.773083ms
|
||||
# => Number of Errors: 0
|
||||
```
|
||||
|
||||
### RoadSign w/ Prefork
|
||||
|
||||
```shell
|
||||
go-wrk -c 60 -d 120 http://localhost:8000
|
||||
# => Running 120s test @ http://localhost:8000
|
||||
# => 60 goroutine(s) running concurrently
|
||||
# => 4784308 requests in 1m59.100307178s, 1.89GB read
|
||||
# => Requests/sec: 40170.41
|
||||
# => Transfer/sec: 16.24MB
|
||||
# => Avg Req Time: 1.493636ms
|
||||
# => Fastest Request: 34.291µs
|
||||
# => Slowest Request: 8.727666ms
|
||||
# => Number of Errors: 0
|
||||
```
|
3
test/data/.gitignore
vendored
3
test/data/.gitignore
vendored
@@ -1,3 +0,0 @@
|
||||
/ssr
|
||||
/spa
|
||||
/congress
|
@@ -1,12 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Hello, World!</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>Hello, there!</p>
|
||||
<p>Here's the roadsign vs. nginx benchmarking test data!</p>
|
||||
</body>
|
||||
</html>
|
@@ -1,117 +0,0 @@
|
||||
|
||||
#user nobody;
|
||||
worker_processes 1;
|
||||
|
||||
#error_log logs/error.log;
|
||||
#error_log logs/error.log notice;
|
||||
#error_log logs/error.log info;
|
||||
|
||||
#pid logs/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
# '$status $body_bytes_sent "$http_referer" '
|
||||
# '"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
#access_log logs/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
#keepalive_timeout 0;
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
server {
|
||||
listen 8001;
|
||||
server_name localhost;
|
||||
|
||||
#charset koi8-r;
|
||||
|
||||
#access_log logs/host.access.log main;
|
||||
|
||||
location / {
|
||||
root ../data;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
#error_page 404 /404.html;
|
||||
|
||||
# redirect server error pages to the static page /50x.html
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root html;
|
||||
}
|
||||
|
||||
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# proxy_pass http://127.0.0.1;
|
||||
#}
|
||||
|
||||
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
|
||||
#
|
||||
#location ~ \.php$ {
|
||||
# root html;
|
||||
# fastcgi_pass 127.0.0.1:9000;
|
||||
# fastcgi_index index.php;
|
||||
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
|
||||
# include fastcgi_params;
|
||||
#}
|
||||
|
||||
# deny access to .htaccess files, if Apache's document root
|
||||
# concurs with nginx's one
|
||||
#
|
||||
#location ~ /\.ht {
|
||||
# deny all;
|
||||
#}
|
||||
}
|
||||
|
||||
|
||||
# another virtual host using mix of IP-, name-, and port-based configuration
|
||||
#
|
||||
#server {
|
||||
# listen 8000;
|
||||
# listen somename:8080;
|
||||
# server_name somename alias another.alias;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
|
||||
# HTTPS server
|
||||
#
|
||||
#server {
|
||||
# listen 443 ssl;
|
||||
# server_name localhost;
|
||||
|
||||
# ssl_certificate cert.pem;
|
||||
# ssl_certificate_key cert.key;
|
||||
|
||||
# ssl_session_cache shared:SSL:1m;
|
||||
# ssl_session_timeout 5m;
|
||||
|
||||
# ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
# ssl_prefer_server_ciphers on;
|
||||
|
||||
# location / {
|
||||
# root html;
|
||||
# index index.html index.htm;
|
||||
# }
|
||||
#}
|
||||
|
||||
}
|
@@ -1,8 +0,0 @@
|
||||
name: Example Site
|
||||
rules:
|
||||
- host: ["localhost:8000"]
|
||||
path: ["/"]
|
||||
upstreams:
|
||||
- id: example
|
||||
name: Benchmarking Data
|
||||
uri: files://../data/spa?fallback=index.html
|
@@ -1,26 +0,0 @@
|
||||
debug:
|
||||
print_routes: false
|
||||
hypertext:
|
||||
sideload_ports: [":81"]
|
||||
sideload_secured_ports: []
|
||||
certificate:
|
||||
sideload_key: ./cert.key
|
||||
sideload_pem: ./cert.pem
|
||||
key: ./cert.key
|
||||
pem: ./cert.pem
|
||||
limitation:
|
||||
max_body_size: 536870912
|
||||
max_qps: -1
|
||||
ports:
|
||||
- :8000
|
||||
secured_ports: []
|
||||
paths:
|
||||
configs: ./config
|
||||
performance:
|
||||
request_logging: false
|
||||
network_timeout: 3000
|
||||
prefork: false
|
||||
security:
|
||||
sideload_trusted_proxies:
|
||||
- localhost
|
||||
credential: e81f43f32d934271af6322e5376f5f59
|
@@ -1,12 +0,0 @@
|
||||
name: Example Site
|
||||
rules:
|
||||
- host: ["localhost:8000"]
|
||||
path: ["/"]
|
||||
upstreams:
|
||||
- id: example
|
||||
name: Benchmarking Data
|
||||
uri: http://localhost:3000
|
||||
processes:
|
||||
- id: nuxt-ssr
|
||||
workdir: ../data/ssr
|
||||
command: ["node", ".output/server/index.mjs"]
|
@@ -1,26 +0,0 @@
|
||||
debug:
|
||||
print_routes: false
|
||||
hypertext:
|
||||
sideload_ports: [":81"]
|
||||
sideload_secured_ports: []
|
||||
certificate:
|
||||
sideload_key: ./cert.key
|
||||
sideload_pem: ./cert.pem
|
||||
key: ./cert.key
|
||||
pem: ./cert.pem
|
||||
limitation:
|
||||
max_body_size: 536870912
|
||||
max_qps: -1
|
||||
ports:
|
||||
- :8000
|
||||
secured_ports: []
|
||||
paths:
|
||||
configs: ./config
|
||||
performance:
|
||||
request_logging: false
|
||||
network_timeout: 3000
|
||||
prefork: false
|
||||
security:
|
||||
sideload_trusted_proxies:
|
||||
- localhost
|
||||
credential: e81f43f32d934271af6322e5376f5f59
|
@@ -1,8 +0,0 @@
|
||||
name: Example Site
|
||||
rules:
|
||||
- host: ["localhost:8000"]
|
||||
path: ["/"]
|
||||
upstreams:
|
||||
- id: example
|
||||
name: Benchmarking Data
|
||||
uri: files://../data
|
@@ -1,26 +0,0 @@
|
||||
debug:
|
||||
print_routes: false
|
||||
hypertext:
|
||||
sideload_ports: [":81"]
|
||||
sideload_secured_ports: []
|
||||
certificate:
|
||||
sideload_key: ./cert.key
|
||||
sideload_pem: ./cert.pem
|
||||
key: ./cert.key
|
||||
pem: ./cert.pem
|
||||
limitation:
|
||||
max_body_size: 536870912
|
||||
max_qps: -1
|
||||
ports:
|
||||
- :8000
|
||||
secured_ports: []
|
||||
paths:
|
||||
configs: ./config
|
||||
performance:
|
||||
request_logging: false
|
||||
network_timeout: 3000
|
||||
prefork: true
|
||||
security:
|
||||
sideload_trusted_proxies:
|
||||
- localhost
|
||||
credential: e81f43f32d934271af6322e5376f5f59
|
@@ -1,8 +0,0 @@
|
||||
name: Example Site
|
||||
rules:
|
||||
- host: ["localhost:8000"]
|
||||
path: ["/"]
|
||||
upstreams:
|
||||
- id: example
|
||||
name: Benchmarking Data
|
||||
uri: files://../data
|
@@ -1,26 +0,0 @@
|
||||
debug:
|
||||
print_routes: false
|
||||
hypertext:
|
||||
sideload_ports: [":81"]
|
||||
sideload_secured_ports: []
|
||||
certificate:
|
||||
sideload_key: ./cert.key
|
||||
sideload_pem: ./cert.pem
|
||||
key: ./cert.key
|
||||
pem: ./cert.pem
|
||||
limitation:
|
||||
max_body_size: 536870912
|
||||
max_qps: -1
|
||||
ports:
|
||||
- :8000
|
||||
secured_ports: []
|
||||
paths:
|
||||
configs: ./config
|
||||
performance:
|
||||
request_logging: false
|
||||
network_timeout: 3000
|
||||
prefork: false
|
||||
security:
|
||||
sideload_trusted_proxies:
|
||||
- localhost
|
||||
credential: e81f43f32d934271af6322e5376f5f59
|
Reference in New Issue
Block a user