Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nginx configuration example produces slow requests #11285

Open
ChristianStornowski opened this issue Nov 14, 2023 · 1 comment
Open

nginx configuration example produces slow requests #11285

ChristianStornowski opened this issue Nov 14, 2023 · 1 comment

Comments

@ChristianStornowski
Copy link

ChristianStornowski commented Nov 14, 2023

I executed wrk on the same host where nginx is installed and serves https://nextcloud.example.com. I followed this guide https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html#nextcloud-in-the-webroot-of-nginx

wrk -t 1 -c 1 -d 60 https://nextcloud.example.com

 1 threads and 1 connections
   Thread Stats   Avg      Stdev     Max   +/- Stdev
     Latency    20.06ms    2.78ms  42.31ms   90.04%
     Req/Sec    49.83      5.20    60.00     73.00%
   2990 requests in 1.00m, 4.38MB read
Requests/sec:     49.80
Transfer/sec:     74.65KB

wrk -t 1 -c 1 -d 60 https://nextcloud.example.com/login

1 threads and 1 connections
   Thread Stats   Avg      Stdev     Max   +/- Stdev
     Latency    26.46ms    3.34ms  41.12ms   90.48%
     Req/Sec    37.80      4.19    40.00     78.17%
   2268 requests in 1.00m, 38.17MB read
Requests/sec:     37.77
Transfer/sec:    650.96KB

wrk -t 1 -c 1 -d 60 https://nextcloud.example.com/dist/core-common.js

   1 threads and 1 connections
   Thread Stats   Avg      Stdev     Max   +/- Stdev
     Latency     9.91ms    1.15ms  17.53ms   90.53%
     Req/Sec   101.24      8.46   111.00     49.75%
   6059 requests in 1.00m, 87.51GB read
Requests/sec:    100.82
Transfer/sec:      1.46GB

Using

location / {
                 try_files $uri /index.php$request_uri;
         }

instead of

location / {
                 try_files $uri $uri/ /index.php$request_uri;
         }

increased performance.

@SystemKeeper
Copy link
Contributor

Can you show which performance exactly increased for you? Adding $uri / only checks if a directory exists, but I fail to see right now which performance is increased?
For reference see also https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/#front-controller-pattern-web-apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants