Re: [babel] RFT: Babel RTT extension in Bird

Ondrej Zajicek <santiago@crfreenet.org> Tue, 26 April 2022 16:00 UTC

Return-Path: <santiago@crfreenet.org>
X-Original-To: babel@ietfa.amsl.com
Delivered-To: babel@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C8550C14F73F for <babel@ietfa.amsl.com>; Tue, 26 Apr 2022 09:00:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MvmebGb3iavc for <babel@ietfa.amsl.com>; Tue, 26 Apr 2022 09:00:46 -0700 (PDT)
Received: from mail.crfreenet.org (varda.crfreenet.org [185.133.240.16]) by ietfa.amsl.com (Postfix) with ESMTP id 1439AC14F6E6 for <babel@ietf.org>; Tue, 26 Apr 2022 09:00:42 -0700 (PDT)
Received: from finarfin (slizka.chapadla.cz [93.99.228.74]) by mail.crfreenet.org (Postfix) with ESMTP id 895AA1F8438; Tue, 26 Apr 2022 18:00:38 +0200 (CEST)
Date: Tue, 26 Apr 2022 18:00:37 +0200
From: Ondrej Zajicek <santiago@crfreenet.org>
To: Juliusz Chroboczek <jch@irif.fr>
Cc: Toke Høiland-Jørgensen <toke@toke.dk>, bird-users@network.cz, babel-users@alioth-lists.debian.net, babel@ietf.org
Message-ID: <YmgXJcC9O3Xg7/MJ@finarfin>
References: <87y1zyf15t.fsf@toke.dk> <YmLLO1sZMpg+SM/N@feanor.crfreenet.org> <87tualat7j.wl-jch@irif.fr>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <87tualat7j.wl-jch@irif.fr>
X-Operating-System: Debian GNU/Linux
Archived-At: <https://mailarchive.ietf.org/arch/msg/babel/ZDVXkvEIREG7vdKdUmuSH1HNqR4>
Subject: Re: [babel] RFT: Babel RTT extension in Bird
X-BeenThere: babel@ietf.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: "A list for discussion of the Babel Routing Protocol." <babel.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/babel>, <mailto:babel-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/babel/>
List-Post: <mailto:babel@ietf.org>
List-Help: <mailto:babel-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/babel>, <mailto:babel-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 26 Apr 2022 16:00:47 -0000

On Fri, Apr 22, 2022 at 08:06:24PM +0200, Juliusz Chroboczek wrote:
> > Did not yet checked the code how smoothing is done here, but seems to me
> > that considering:
> > 
> > 1) There is baseline RTT from distance / speed of propagation
> > 2) There is one-side noise from congestion
> > 3) The metric should be based on 1) and suppress effects of 2)
> > 
> > It would make sense to use something like running minimum instead of
> > running average.
> 
> Yes, it would make sense.  The reason why we calculate an exponential
> average is that it is cheaper to compute, and works quite well in
> practice.  The goal here is not to compute an accurate metric, it is to
> reliably choose the best route: the metric only needs to be accurate
> enough to ensure that the right route is being picked.

I guess that how much that works in practice depends on many circumstances.

For example, consider this case: a mobile device connected by wifi to
local AP, with VPNs to two endpoints, one local (< 1ms base latency), one
in different town (~10ms base latency), but the communication is subject
to wifi latency, which is noisy (mostly ~1ms, but in <5% cases there is
100-1000ms spike). Then both exponencial running averages are random
variables with expected value shifted by 10 ms, but with big enough
variance than it may often come out in reverse.

(that is, btw, the real use case how i would use it)

It is true that exponential running average is nice and elegant
algorithm, so perhaps instead of using running minimum over many values,
one could just use minimum over small number of latest values (say 8-16)
as a pre-filter and use exponential average on result. I think that
computational cost is negligible for such change and it would suppress
effect of latency spikes common in wifi networks.


> > But RTT-based cost have applications that are unrelated to tunnels.
> 
> I'd be very interested if you could give me some examples, in case
> I decide to revive the paper above.


IMHO base-RTT-based cost make sense as a reasonable initial choice for
regular IGP on regular (wired) links for a geographically spread out
network (e.g. ISP backbone) in the absence of an explicit policy.

Also, it would make sense to use RTT as an AIGP metric in public BGP, as
it does not require coordination on metric scale and would eliminate some
routing oddities.

But in both these case one would probably suffice with static rtt
measurement during adjacency establishment instead of continuous
measurement.

-- 
Elen sila lumenn' omentielvo

Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org)
OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net)
"To err is human -- to blame it on a computer is even more so."