scp speed (push v/s pull) - SSH

This is a discussion on scp speed (push v/s pull) - SSH ; I've noticed that scp file transfer speeds are significantly different depending on whether you're pushing a file to a remote machine or pulling a file from a remote machine. When I push a file to another machine, I get 800 ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: scp speed (push v/s pull)

  1. scp speed (push v/s pull)

    I've noticed that scp file transfer speeds are significantly different
    depending on whether you're pushing a file to a remote machine or
    pulling a file from a remote machine.

    When I push a file to another machine, I get 800 kB/s speed. When I
    pull the same file from another machine, I get 8500 kB/s. Why is the
    speed so different? Does it depend on some network setting or is it
    something inherent in the protocol?

    Thanks,
    Nash.


  2. Re: scp speed (push v/s pull)

    nash_rack1@yahoo.com writes:

    > I've noticed that scp file transfer speeds are significantly different
    > depending on whether you're pushing a file to a remote machine or
    > pulling a file from a remote machine.
    >
    > When I push a file to another machine, I get 800 kB/s speed. When I
    > pull the same file from another machine, I get 8500 kB/s. Why is the
    > speed so different? Does it depend on some network setting or is it
    > something inherent in the protocol?


    Not something you can attribute to scp I'm afraid.

    Describe the network connection of each side... what you're seeing is
    entirely consistent for instance with a cable modem service on the
    local side where download speeds are an order of magnitude faster than
    upload speeds.

    Best Regards,
    --
    Todd H.
    http://www.toddh.net/

  3. Re: scp speed (push v/s pull)

    wrote:
    >When I push a file to another machine, I get 800 kB/s speed. When I
    >pull the same file from another machine, I get 8500 kB/s.


    Do you think this is an SSH difference? My first guess would be a network
    difference, where you simply have different network characteristics in the two
    directions.

    >Why is the speed so different? Does it depend on some network setting or is
    >it something inherent in the protocol?


    There's nothing I can think of in the protocol that would matter. If the
    remote machine is way slower or more heavily loaded, it could be that it can
    decrypt faster than it can encrypt (and thus recieve faster than send data
    over SSH), but this should be a small effect on modern hardware.

    More likely your network itself is asymmetrical. If you want to track this
    down, try 2 things:
    1) see if similar behavior happens with other protocols.
    2) instead of comparing "push a->b vs pull b->a", make an SSH connection both
    directions, and try "pull a->b" vs "pull b->a".
    --
    Mark Rafn dagon@dagon.net

  4. Re: scp speed (push v/s pull)


    I'm testing on 2 identical linux machines connected using 100 mbps
    ethernet. I see the same issue on both machines.


    Todd H. wrote:

    >
    > Not something you can attribute to scp I'm afraid.
    >
    > Describe the network connection of each side... what you're seeing is
    > entirely consistent for instance with a cable modem service on the
    > local side where download speeds are an order of magnitude faster than
    > upload speeds.
    >
    > Best Regards,
    > --
    > Todd H.
    > http://www.toddh.net/



  5. Re: scp speed (push v/s pull)

    and these machines are on the same sub net.

    nash_ra...@yahoo.com wrote:
    > I'm testing on 2 identical linux machines connected using 100 mbps
    > ethernet. I see the same issue on both machines.
    >
    >



  6. Re: scp speed (push v/s pull)


    On machine A, push a->b is slow, pull b->a is fast
    On machine B, push b->a is slow, pull a->b is fast

    nash_ra...@yahoo.com wrote:
    > I'm testing on 2 identical linux machines connected using 100 mbps
    > ethernet. I see the same issue on both machines.
    >
    >



  7. Re: scp speed (push v/s pull)

    On Tue, 23 Jan 2007 10:01:31 -0800, nash_rack1 wrote:

    > I've noticed that scp file transfer speeds are significantly different
    > depending on whether you're pushing a file to a remote machine or
    > pulling a file from a remote machine.
    >
    > When I push a file to another machine, I get 800 kB/s speed. When I
    > pull the same file from another machine, I get 8500 kB/s. Why is the
    > speed so different? Does it depend on some network setting or is it
    > something inherent in the protocol?


    A possibility might be a difference in internal buffer size between
    client and server. When you push a file, it is the SSH client that
    underlies the scp command the one that decides how many bytes will be sent
    in one go, whereas when you pull a file it is the SSH server who decides
    that.

    I have played with implementations in which the client in box A would
    push files in 8 KB blocks, whereas the server in box B would send them in
    16 KB blocks. In such a situation, all other things (including networking)
    being equal, pulling a file from B to A was much faster than pushing it
    from A to B. I am pretty sure it was not one order of magnitude faster
    though, and therefore it is probably not the cause of what are you are
    observing. But, I thought you might like to keep it in mind.

  8. Re: scp speed (push v/s pull)

    nash_rack1@yahoo.com wrote:
    > I've noticed that scp file transfer speeds are significantly different
    > depending on whether you're pushing a file to a remote machine or
    > pulling a file from a remote machine.
    >
    > When I push a file to another machine, I get 800 kB/s speed. When I
    > pull the same file from another machine, I get 8500 kB/s. Why is the
    > speed so different? Does it depend on some network setting or is it
    > something inherent in the protocol?
    >
    > Thanks,
    > Nash.
    >


    Different network speed limitations? I see the same thing when I'm at
    work and scp'ing to/from my home PC. The reason is my FIOS connection
    can download at 5mb but can only upload at 2mb.

  9. Re: scp speed (push v/s pull)

    nash_rack1@yahoo.com wrote:
    > I've noticed that scp file transfer speeds are significantly different
    > depending on whether you're pushing a file to a remote machine or
    > pulling a file from a remote machine.
    >
    > When I push a file to another machine, I get 800 kB/s speed. When I
    > pull the same file from another machine, I get 8500 kB/s. Why is the
    > speed so different? Does it depend on some network setting or is it
    > something inherent in the protocol?


    Run ifconfig on both machines and see if you're getting ethernet
    collisions or errors, etc.

    Jeff Long

+ Reply to Thread