Skip to content

Commit f2ad384

Browse files
committed
update benchmark
1 parent dd76bc1 commit f2ad384

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

benchmarks.md

+115
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,118 @@ Requests/sec: 4936.25
5757
Transfer/sec: 2.74MB
5858
```
5959

60+
fpm.conf
61+
```conf
62+
[www]
63+
listen = 127.0.0.1:9000
64+
listen.backlog = -1
65+
listen.allowed_clients = 127.0.0.1
66+
listen.owner = www-data
67+
listen.group = www-data
68+
listen.mode = 0666
69+
security.limit_extensions = .php
70+
user = www-data
71+
group = www-data
72+
pm = static
73+
pm.max_children = 32
74+
pm.max_requests = 1024
75+
request_terminate_timeout = 100
76+
request_slowlog_timeout = 3
77+
slowlog = /var/log/php-slow.log
78+
```
79+
80+
php.ini
81+
```ini
82+
max_execution_time = 10
83+
max_input_time = 60
84+
max_input_vars=4096
85+
post_max_size=8M
86+
upload_max_filesize=8M
87+
expose_php=off
88+
display_errors=0
89+
display_startup_errors=1
90+
opcache.enable = 1
91+
;opcache.preload_user=www-data
92+
;opcache.preload=/var/www/demo/var/cache/prod/App_KernelProdContainer.preload.php
93+
```
94+
95+
96+
nginx.conf
97+
```conf
98+
worker_processes 8;
99+
events {
100+
worker_connections 1024;
101+
}
102+
http {
103+
include mime.types;
104+
default_type application/octet-stream;
105+
charset utf-8;
106+
sendfile on;
107+
sendfile_max_chunk 512k;
108+
tcp_nopush on;
109+
tcp_nodelay on;
110+
server_tokens off;
111+
keepalive_timeout 12s 12s;
112+
keepalive_requests 10240;
113+
server {
114+
listen 0.0.0.0:88 default;
115+
root /var/www/demo/public;
116+
server_name _;
117+
location / {
118+
try_files $uri /index.php$is_args$args;
119+
}
120+
location ~ ^/index\.php(/|$) {
121+
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
122+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
123+
include fastcgi.conf;
124+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
125+
fastcgi_param DOCUMENT_ROOT $realpath_root;
126+
internal;
127+
}
128+
location ~ \.php$ {
129+
return 404;
130+
}
131+
}
132+
server {
133+
listen 0.0.0.0:80;
134+
root /var/www/demo/public;
135+
server_name pve;
136+
location / {
137+
try_files $uri /index.php$is_args$args;
138+
}
139+
location ~ ^/index\.php(/|$) {
140+
fastcgi_pass php;
141+
fastcgi_split_path_info ^(.+\.php)(/.*)$;
142+
include fastcgi.conf;
143+
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
144+
fastcgi_param DOCUMENT_ROOT $realpath_root;
145+
internal;
146+
}
147+
location ~ \.php$ {
148+
return 404;
149+
}
150+
}
151+
}
152+
```
153+
154+
sysctl.conf
155+
```conf
156+
net.core.rmem_max = 67108864
157+
net.core.wmem_max = 67108864
158+
net.core.rmem_default = 65536
159+
net.core.wmem_default = 65536
160+
net.core.netdev_max_backlog = 64436
161+
net.core.somaxconn = 65536
162+
net.ipv4.tcp_syncookies = 0
163+
net.ipv4.tcp_tw_reuse = 1
164+
net.ipv4.tcp_fin_timeout = 30
165+
net.ipv4.tcp_keepalive_time = 1200
166+
net.ipv4.ip_local_port_range = 10000 65000
167+
net.ipv4.tcp_max_syn_backlog = 32768
168+
net.ipv4.tcp_max_tw_buckets = 72768
169+
net.ipv4.tcp_fastopen = 3
170+
net.ipv4.tcp_rmem = 32768 87380 67108864
171+
net.ipv4.tcp_wmem = 32768 65536 67108864
172+
net.ipv4.tcp_mtu_probing = 1
173+
net.ipv4.ip_local_port_range = 40000 65000
174+
```

0 commit comments

Comments
 (0)