diff --git a/crates/fib/src/kernel.rs b/crates/fib/src/kernel.rs index 9f35304..5e14cab 100644 --- a/crates/fib/src/kernel.rs +++ b/crates/fib/src/kernel.rs @@ -34,8 +34,11 @@ use crate::routes::KernelRoutes; use crate::topology::Topology; use crate::{Fib, FibConfig, FibError, Stop}; -/// How many best routes are taken from the routing table at a time. -const BATCH: usize = 1024; +/// How many best routes are taken from the routing table at a time. A +/// poll of the table costs two binary searches and a lock in every shard, +/// however few events it brings back; with a few hundred shards, a batch +/// of a thousand had that overhead for every eight events a shard. +const BATCH: usize = 16384; /// How many requests are sent to the kernel in one write. const WRITE_BATCH: usize = 512;