Want to subscribe to topics you're interested in?
Become a Member

Slow SFTP Downloads

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Jimmy, Nov 14, 2018.

  1. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    Please fill in any relevant information that applies to you:
    • CentOS Version: CentOS 7 64bit
    • Centmin Mod Version Installed: 123.09beta01
    My ISP recently changed my IP address coming into my home. The old IP was what I used to setup my servers / VPS w/ centmin mod.

    I was getting great SFTP download speeds from both my OVH dedicated server and SSDNodes VPS server pre IP switch. Ever since the IP change (I believe) my download speed from ONLY OVH has taken a huge dip - was about 5MB/s and now I'd be lucky to see 1.2MB/s.


    Both the SSDNodes and OVH servers are using cloudflare and cloudflare is setup the same for both servers. Since I'm accessing the server via IP, cloudflare really shouldn't be an issue here, right?

    OVH does have its own firewall which was on before and after the IP change. I did switch it off and tested it and the results were the same.

    I added my new IP to the csf.allow file and that didn't seem to change anything.

    That leads me to the server. Both centmin mod installs were done at the same time and pretty much have the same setup. I didn't modify the nginx.conf file on either server. I didn't see anything in the nginx.conf which would limit the speed of the connection.

    Since I don't modify a lot of files on any centmin mod setup, not sure what is happening or what got changed to limit my download speed.

    If anyone has an idea where I might look next, I'd be much appreciative. :)
     
  2. eva2000

    eva2000 Administrator Staff Member

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    1:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    if you put a test download file to /home/nginx/domains/yourdomain.com/public web root and download directly from yourdomain.com/testfile do you get any faster speeds ? could just be your ISP ?
     
  3. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    Basically that's what I'm doing. I'm using my download script from my Linux desktop here to download tar.gz files from a backup folder. I have separate scripts for each machine. SSDNodes is 5MB/s all day every day. OVH is 1.2MB/s use to be 5MB/s.

    Speed test on my IP is 350Mbps solid.
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    1:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    i thought you said using SFTP ?? downloading via SFTP doesn't involve nginx but putting files in /public and downloading via HTTP/HTTPS is via nginx web server so different method and non-SFTP. Nginx has it's own tweaks for serving downloads due to Nginx file buffering.
     
  5. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    I can't imagine my router is firewalling just OVH... I'm going to turn off my router FW and see what happens.
     
  6. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    My bad, had sftp in my head for some reason. Yes, I'm downloading them via ssh via a script.
     
  7. eva2000

    eva2000 Administrator Staff Member

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    1:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Download via ssh is same as sftp. Or you mean download via HTTP/HTTPS ?

    If downloading via public web root and HTTP/HTTPS then Nginx has it's own tweaks for serving downloads due to Nginx file buffering and depending on size of your download will run into Nginx buffering which may slow downloads down unless you tweak your settings. You can see clues for such tweaks in centmin mod 123.09beta01 latest installs' /usr/local/nginx/conf/staticfiles.conf include file for known download extensions having these directives set here centminmod/centminmod
    Code (Text):
          sendfile off;
          sendfile_max_chunk 1m;
    
     
  8. eva2000

    eva2000 Administrator Staff Member

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    1:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    both same location ? SSDnodes has Dallas and Canada while OVH has lots of locations.
     
  9. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    OVH Canada. SSDNodes Dallas.

    SSH only via script using rsync. Tested with filezilla using sftp and got the same speed for OVH.
     
  10. eva2000

    eva2000 Administrator Staff Member

    54,389
    12,198
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,763
    Local Time:
    1:24 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    then that is SSH/SFTP/Rsync and nothing to do with Nginx so is speed of the server itself in relation to your location/ISP
     
  11. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    It's weird because I didn't change anything on the servers. The download script I'm using is the same for both servers. Something changed between my house and the OVH server.
     
  12. Jimmy

    Jimmy Well-Known Member

    1,788
    390
    83
    Oct 24, 2015
    East Coast USA
    Ratings:
    +990
    Local Time:
    10:24 AM
    Maybe it has something to do with the IPV6 issue I had before. I'll have to take a look at what is going to with that and maybe that'll lead to this issue.