[Nginx/QUIC] Solution for slow transfer speed / poor bandwidth

Dear Nextcloud community,

Recently I switched to Nginx new QUIC feature, that uses HTTP/3 as L7 and UDP as L4 protocol.

I observed very slow transfer speed while uploading/downloading files on my Nextcloud instance, through WebDAV, around 2.5 MB/s.

That problem was not already documented, and since it is not a bug from Nextcloud or Nginx, I give you here my solution :slight_smile:

I just adjusted the following buffer in the http context of my Nginx configuration (you can also do it in the server context if you run multiple vHosts) :

http3_stream_buffer_size 1m;

I have now a throughput of around 10.5-11 MB/s. It stills not really high but I prefer to avoid setting it too big, since the default value is 64k. I saw people who set it to 16m, fell free to do it, but for any file transferred through QUIC it will allocate a buffer of 16 MB inside your RAM, even for small files.

If you want high transfer rate, the best practice for my opinion is still to disable QUIC on your Nextcloud Nginx vHost configuration.

Official Nginx documentation :

https://nginx.org/en/docs/http/ngx_http_v3_module.html#http3_stream_buffer_size

Hope this helps :grinning:

5 Likes