Why is SSH a LOT faster than File Sharing?

Discussion in 'macOS' started by TheSpaz, Nov 21, 2007.

  1. TheSpaz macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #1
    I used to use File Sharing on my mac pro so I could connect to it from work. The problem is, browsing my Mac Pro in the Finder from work is PAINFULLY slow and often times it will hang up the Finder for minutes at a time, which was really annoying. Just today, I decided to use Panic's Transmit app to connect to my Mac Pro via SFTP and browsing and copying is a LOT faster. The Finder told me 10 hours to copy 200MB but, Transmit said only 3 hours.... hmm. Also, when I'm browsing my Mac with Transmit, it's blazing fast and even huge lists pop right up immediately. This is the way to go for me but, why is the Finder so slow when using remote file access?
     
  2. Nugget macrumors 65816

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #2
    What type of files are you transmitting? If they're compressible, that might be it. SFTP is using SSH as the transport mechanism, and SSH is compressing the data as its sent. If the files are easily compressed this can yield much faster transfer times.
     
  3. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #3
    The particular file I am transferring is an iTunes H.264 MPEG-4 file. I did not know that SSH compresses the files as it transfers, that's really cool! I also like how fast browsing is.... and it won't make my Finder hang... there's nothing worse than when the Finder hangs and you want to get at some local files but, you can't because of the file server bogging everything down.
     
  4. Nugget macrumors 65816

    Nugget

    Joined:
    Nov 24, 2002
    Location:
    Houston Texas USA
    #4
    Hrm, well, that shoots my theory out the window. An H.264 file is already going to be compressed about as much as it can be, so any speed gains from SFTP aren't coming from additional compression.


    Are you on Leopard yet? This is one of the areas where Leopard is tremendously improved over Tiger.
     
  5. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #5
    I'm on Leopard at home but, at work I'm on 10.4.11 Tiger.
     
  6. Amdahl macrumors 65816

    Joined:
    Jul 28, 2004
    #6
    File Sharing protocols like AFP or SMB, and Finder browsing in particular, are not optimized for long-delay links. Compared to the speed of your hard disk, or a local LAN, any Internet connection can be considered high delay.

    Internet protocols are designed for the delay; they make a single large request (all files in directory) and then receive the response in one continous stream. SMB and the like are dumb; they make a request for one file's info, wait for the response, request the next file info, etc. Copies are similar; they request the file in blocks, rather than just asking for the whole file to be sent.
     
  7. TheSpaz thread starter macrumors 604

    TheSpaz

    Joined:
    Jun 20, 2005
    #7
    Awesome! I think I'll be using SSH for now on. I can't believe I didn't know about this sooner!
     

Share This Page