Score:0

Nginx Downloads Slow From Browser - CURL/WGET Are Fine

es flag

I'm trying to serve large files (50-800mb) from a VPS using Nginx to host map files for a game server. Oddly, when downloading map files in game or in a browser I'm hitting only ~15mbps. When downloading via CURL or WGET on a separate machine (same network) I'm hitting 60mbps (my maximum). I have tried a variety of settings (sendfile on, max_chunk_size, directio, etc) without any change in behavior between them. Here is my configuration as it stands now:

user  www-data;
worker_processes  2;

error_log  /var/log/nginx/error.log notice;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/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  /var/log/nginx/access.log  main;

    access_log off;

    keepalive_timeout  65;

    #gzip  on;
    #gzip_types application/octet-stream;

    include /etc/nginx/conf.d/*.conf;
}

server {
    listen       80;
    server_name  localhost;

    #access_log  /var/log/nginx/host.access.log  main;

    access_log off;
    root /var/www/home;
    index index.html;

    location / {
    }

    location ^~ /kf2 {
        alias /var/www/kf2;
        autoindex on;
    }

    location ^~ /img {
        alias /var/www/img;
    }
}

I currently have sendfile removed for testing, but having it enabled made no difference anyways. Running a download to localhost with WGET reaches speeds over 200mbps, so I don't think this is a disk I/O limitation. I'm at a loss here and can't explain the discrepancy between curl/wget and downloading via a browser. Any help is appreciated.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.