From a8a3d95be5db1a8a7d5a17e2eb8e233417b1d8c7 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sat, 4 Jun 2022 17:34:57 +0200 Subject: [PATCH] Nest: Improve GC strategy for rtables Use timer (configurable as 'gc period') to schedule routing table GC/pruning to ensure that prune is done on time but not too often. Randomize GC timers to avoid concentration of GC events from different tables in one loop cycle. Fix a bug that caused minimum inter-GC interval be 5 us instead of 5 s. Make default 'gc period' adaptive based on number of routing tables, from 10 s for small setups to 600 s for large ones. In marge multi-table RS setup, the patch improved time of flushing a downed peer from 20-30 min to <2 min and removed 40s latencies. --- conf/conf.c | 1 + doc/bird.sgml | 15 ++++++++++++++ nest/config.Y | 4 +++- nest/route.h | 8 +++++--- nest/rt-table.c | 54 +++++++++++++++++++++++++++++++++++++++++-------- 5 files changed, 70 insertions(+), 12 deletions(-) diff --git a/conf/conf.c b/conf/conf.c index a2b01667..025c040e 100644 --- a/conf/conf.c +++ b/conf/conf.c @@ -140,6 +140,7 @@ config_parse(struct config *c) protos_preconfig(c); rt_preconfig(c); cf_parse(); + rt_postconfig(c); if (EMPTY_LIST(c->protos)) cf_error("No protocol is specified in the config file"); diff --git a/doc/bird.sgml b/doc/bird.sgml index 1580facd..326fc7a8 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -684,6 +684,21 @@ to set options. limit to the settle time from the initial ROA table change even if there are consecutive updates gradually renewing the settle time. Default: 20 s. + +