Slow Downloads, Tried everything

I am kinda at my wits end here not sure what else to try. I have the latest docker install, on a threadripper server, on a disk array that can read/write at multiple GB/s (yes GB not Gb) even 4krand is mesured in hundreds of MB/s. the network is 2.5Gbps FTTH and i have used iperf3 to confirm the connection between the server and the remote side is pushing over 1Gbps. I am using nginx reverse proxy and have optimized the hell out of it as best as i can. I use this same config for immich, same machine, same network path, same Nginx reverse proxy. And i can max out my friends line at 28MB/s when i share a large video for them to download. Meanwhile Seafile struggles to push 1MB/s. Same video even just for sanity.

Here is the nginx config.

server {
listen 443 ssl;
listen 443 quic;
listen [::]:443 ssl;
listen [::]:443 quic;

http2 on; 
http3 on; 
server_name redacted

ssl_certificate redact
ssl_certificate_key redact
ssl_protocols TLSv1.2 TLSv1.3; 
add_header Alt-Svc 'h3=":443"; ma=86400'; 

# Required for Seafile to generate correct internal links 
proxy_set_header Host $host; 
proxy_set_header X-Real-IP $remote_addr; 
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
proxy_set_header X-Forwarded-Proto https;  

# 1. Main UI and API 
location / { 
    proxy_pass         http://10.159.4.4:8090; 
    proxy_read_timeout 1200s; 
    client_max_body_size 0; 
} 

# 2. Optimized File Server (buffer) 
location /seafhttp { 
    proxy_pass         http://10.159.4.4:8090; 
    client_max_body_size 0; 
      
    proxy_buffering off; 
    proxy_request_buffering off; 
    proxy_max_temp_file_size 0; 
      
    # Keep connection open for Range requests/seeking 
    proxy_http_version 1.1; 
    proxy_set_header Connection ""; 

    proxy_connect_timeout  3600s; 
    proxy_read_timeout     3600s; 
    proxy_send_timeout     3600s; 

    sendfile           off; 
    tcp_nopush         on; 
    tcp_nodelay        on; 

    access_log      /var/log/nginx/seahub.access.log; 
    error_log       /var/log/nginx/seahub.error.log; 

} 

}

Ive spent hours on this trying anything i can think of and performance in seafile is just abysmal. There is no hardware or network along the chain that is a bottleneck, the server has 128GB of ram that it hardly touches, and as stated both iperf3 and other software like immich show no issues getting full bandwidth.

It appears your Nginx configuration is more complex than necessary for a Seafile Docker deployment (especially for versions 12.0 and 13.0), and some settings may be directly causing the performance bottleneck.

In the Seafile Docker image, there is an internal Nginx that already handles the routing for /seafhttp (the file server) and /media. When you use an external reverse proxy, it is recommended to pass all traffic through a single location / block and let the internal Nginx handle the rest. Your current setup involves “double proxying” with specific overrides in the /seafhttp block that might be conflicting.

I went ahead and did that, sadly no change in performance. only had it split like that so that i could apply the no buffering to just that part but yeah even as one single pass. (tried removing proxy buffer config as well) same limited performance.

Strangely enough i tried disabling HTTP/3 and dropped to HTTP/2 and performance improved somewhat, it slowly climbs to 8-10MB/s now but still a far cry from what iperf3/immich are pushing. not sure why HTTP/3 is worse with seafile (immich is using it fine for example) maybe something to do with how it streams files i know seafile breaks things into tiny blocks for whatever reason.

I additionally made sure my config was using the go fileserver, increased the db connections, these made it reach towards 10MB/s a little faster but still seems to be hitting a bottleneck i cant explain

Can you try to remove these lines?

Done, and restarted both nginx and seafile for good measure. Seems to have helped slightly i can get almost 20MB/s now. So still lagging behind but usable now at least. To test if it was fixed with these changes i re-enabled HTTP/3 but that just dropped right back down to sub 1MB/s so seems seafile and HTTP/3 really dont get along for some reason.

Seafile client and server don’t support http3 yet. This is because a few main third-party libraries we use don’t support http3 in the main version yet, e.g. Qt, libcurl and OpenSSL. We’ll keep an eye on it in the future.