[mosh-devel] How high can we set the mosh keepalive interval ?

Keith Winstein keithw at MIT.EDU
Tue Jun 4 11:54:09 EDT 2013


Hi Seth et al.,

I had a chance to test this out. Yes, you can set the ACK_INTERVAL as
high as you want -- it just means Mosh will take longer to recover if
the client's IP address changes out from under it and nothing is being
typed.

Here is a patch that will get you very low bandwidth use, at the cost
of a somewhat less-responsive UI. This should save you at least a
packet per keystroke, and probably more if you are typing multiple
letters in succession:
https://github.com/keithw/mosh/commit/979c2a1cb7e61998f2b6ffec0b019167bd2be616

You can checkout the "lowbandwidth" branch on
https://github.com/keithw/mosh to get this. Best if used on client and
server.

(Background: Normally, in SSH a single keystroke causes three packets
to be sent -- the keystroke from client to server, the echo and ack
from server to client, and the ack from client to server. In Mosh,
it's normally four packets -- the keystroke, the echo/ack, the "late
echo veto" from server to client, which helps the accuracy of the
predictive local echo, and the ack from client to server. These
timings will get rid of the "echo veto" and make Mosh more like SSH,
and then we further slow down the frame rate to consolidate multiple
keystrokes and ACKs into a single packet when possible. So it should
be even more bandwidth-efficient than SSH.)

Cheers and good luck,
Keith

On Tue, Jun 4, 2013 at 5:19 AM, Seth Teller <teller at csail.mit.edu> wrote:
>
> Hello mosh'ers,
>
> We are running mosh over a metered network as part of a robotic
> competition.   We found that a quiet mosh session (open shell,
> no typing) uses tens of bytes per second.  We'd like to drop that
> to zero, or as close to zero as possible, so that we pay for bits
> only when we absolutely have to type something in the shell.
>
> One way to do this, as per Hari, would be to increase the keepalive
> interval (in transportsender.h) past its default value of 3 seconds:
>
>      const int ACK_INTERVAL = 3000; /* ms between empty acks */
>
> Can we disable keepalive and still have a working shell?  If not,
> how high can we set ACK_INTERVAL without breaking mosh?
>
> Thanks.
>
>
>
>
>
> _______________________________________________
> mosh-devel mailing list
> mosh-devel at mit.edu
> http://mailman.mit.edu/mailman/listinfo/mosh-devel



More information about the mosh-devel mailing list