Re: How to limit bandwidth used by git over SSH ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2011-07-17 at 12:22 +0200, Ralph Seichter wrote:
> Hello list,
> 
> I'm not really sure if this is a git or SSH issue, but I haven't figured
> out a solution yet. To transfer my data between two machines, I use
> 
>   git-push ssh://machineB.tld/foo/proj.git master
> 
> from machineA. Unfortunately, the machines are connected by a very low-
> bandwidth connection, which is completely choked by git-push. From what
> I've read so far, I guess this is the result of SSH setting TOS to
> "minimize delay", which prevents almost all other traffic during the
> push operation. Not good.

A bit OT, but the situation where a link is chocked by a slow uplink
getting filled is most likely due to buffer bloat on your modem/router
which confuses TCP's congestion detection by buffering your packets too
aggressively. But that's neither here nor there, I just wanted to point
out it's not all ssh or git's fault.

> 
> I haven't yet found a way of telling git (or SSH) to use no more than a
> given maximum bandwidth, like I could do with "scp -l {limit}". Did I
> miss something in the documentation?

But coming back to SSH, scp knows it's going to do a file transfer, but
git uses the ssh client to do a "normal" connection to a remote machine,
to ssh, it's no different from a user typing really fast, which is
probably why it's not supported out of the box.

There is a tool called trickle which takes over the network functions
and can be used to limit upload and download speeds, so using it like

    trickle -u 20 git push ssh://machineB.tld/foo/proj.git master

should do the trick.

Cheers,
   cmn

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]