[X2Go-Dev] Traffic shaping nightmare - missing SSH TOS bits

John A. Sullivan III jsullivan at opensourcedevel.com
Tue Feb 21 20:19:25 CET 2012


On Tue, 2012-02-21 at 18:22 +0100, Mike Gabriel wrote:
> Hi John,
> 
> On Di 21 Feb 2012 17:09:57 CET "John A. Sullivan III" wrote:
> 
> > On Tue, 2012-02-21 at 10:11 +0100, Jan Engelhardt wrote:
> >> On Tuesday 2012-02-21 09:43, John A. Sullivan III wrote:
> >>
> >> >On Tue, 2012-02-21 at 09:30 +0100, Jan Engelhardt wrote:
> >> >> On Tuesday 2012-02-21 07:05, John A. Sullivan III wrote:
> >> >>
> >> >> >I've been working on a project to implement traffic shaping
> >> >> >to conform to 95th percentile billing including our X2Go virtual
> >> >> >desktops. One of the challenges is prioritizing the interactive X2Go
> >> >> >traffic (screen, keyboard, mouse) differently from bulk traffic like
> >> >> >local share transfers, printing, and possibly sound.  I thought this
> >> >> >would be trivial because of the SSH transport since SSH sets the
> >> >> >minimize-delay bit for interactive traffic and the maximize-throughput
> >> >> >bit for bulk transfers.
> >> >>
> >> >> If a user has his own machine, he can of course do whatever he wants.
> >> >> Second, if he can pass options to ssh, he can set the QOS type
> >> >> arbitrarily, and even where that is not available for control, one
> >> >> can still cause the openssh client to use interactive TOS marking for
> >> >> bulk transfers, since secondary ssh channels (e.g. tunnels) do not
> >> >> pass up the TOS mark.
> >> ><snip>
> >> >However, Windows and Mac clients may not be using OpenSSH.
> >>
> >> That too. All these reasons is why TOS is not a reliable characteristic
> >> to determine the question of bulk-or-interactive.
> >>
> >> >PS - out of curiosity, now does one set the QoS type in OpenSSH?
> >>
> >> ssh -o IPQoS={bulk|interactive|0x12345} ...
> >>
> >> ssh -L 2000:localhost:22 foohost &
> >> rsync -HPave 'ssh -p 2000' bulky.iso localhost:
> >>
> >> and in fact, wouldn't the output `ls -Rl /` in an interactive shell also
> >> best be count as bulk...
> > <snip>
> > Interesting.  Looks like that was introduced in 5.6.  Squeeze is running
> > 5.5 but it should default to 0x10/0x08 if not set.  I'm not seeing any
> > TOS bits set which is why I suspect it is the libssh call as I assume
> > that does not reference the openssh configuration.
> >
> > If someone can point out where the socket options are set, I can take a
> > look and see if I can figure out how to fix it but I don't know a thing
> > about socket programming.  I assume one has to make some kind of a call
> > to IP_TOS or perhaps it is part of setsockopts and SO_PRIORITY.  Thanks
> > - John
> 
> The sockets are probably created and configured in here...
> http://code.x2go.org/gitweb?p=x2goclient.git;a=blob;f=sshprocess.cpp
> 
> Mike
> 
<snip>
Thanks. What if it is the unusual case where they are not tunneling
through ssh? - John




More information about the x2go-dev mailing list