Skip to content

Instant Data Structures via Shared Memory#

Roman Janota (CESNET)

  • Why: A small systems idea with an outsized, verified result — and it generalizes well beyond network tooling.
  • What: The boot-up bottleneck of network management systems: every tool re-parses hundreds of device configuration files to build its structural map of the network, serially, on every start. CESNET's answer: parse once, share the result. The first program to start builds the data structure, publishes a handle ("link") to it in a shared-memory region; every subsequent program checks for an existing link and skips parsing entirely. Changes (e.g. a new node) are published by generating a new link to the changed structure and atomically replacing the old one, with consumers checking for a newer link on access — a copy-on-write publication pattern.
  • How: Plain shared memory plus handle indirection; no exotic infrastructure. Benchmarks show boot-up times up to 400×+ faster than re-parsing, with the gap so large the improved bars are barely visible on the charts.
  • Where applicable: General technique for any tool family that re-derives the same large, mostly-static data structure from source files at startup — network inventory, config linting, query engines. Linux-centric; the pattern is cheap to adopt.