Skip to content

v6.1.0 - Optimising Route Server Configuration Generation

Compare
Choose a tag to compare
@barryo barryo released this 15 Sep 18:25
· 389 commits to master since this release
f3db682

run-fast

We've known for sometime that the generation time for router configurations was sub-optimal and looking at that has been on the todo list. A regression in v6.0.0 in the move to Eloquent caused an increased latency in the process and explained well by @ichilton in #732.

This release resolves that issue and provides a significant speed increase for generating router configuration - especially where you have members which huge prefix lists.

This is a minor version bump rather than a patch release as we want highlight that if you have skinned the router configuration templates you may need to update your own versions also. Details below. And a reminder - at @inex we use the stock templates always so these are already in production.

Release Summary

git --no-pager diff --shortstat v6.0.1 release-v6
 18 files changed, 174 insertions(+), 36 deletions(-)

Upgrade Instructions

The official upgrade instructions can be found here.

The changes in this release are all code based. There are no database changes or other complexities. Upgrading should be straight-forward. If you have skinned the router configuration templates then see the details below.

You can prime the cache in advance if you like by running the following (these run via the cronjob anyway and the cache would be primed on the first route server config pull):

php artisan irrdb:update-prefix-db -v
php artisan irrdb:update-asn-db -v

Route Server Optimisation

In commit b852c1f through the use of serialising IRRDB prefixes at the time of fetching them from IRRDB databases, we've gotten the speed / usage down as follows:

Iteration Generation Time Memory Usage (Real)
v6.0.0 99.5 secs 1,362 MB (1,551 MB)
1st Pass - Query Optimisation 32.0 secs 501 MB (576 MB)
2nd Pass - Add Caching 1.3 secs 210 MB (212 MB)

NB: this is on @barryo's development laptop with local MySQL and webserver. YMMV for production environments but the speed up should be proportional.

Skin Updates

NB: if you have skinned route server configuration templates then you should review the changes in commit c83f8e4 and update your skins.

This commit moves the collection of neighbour prefixes from "all on one go" to a per neighbour processing basis. This has no immediate win but it will allow for future optimisations.

Bug Fixes

  • Broken URLs for click-to-search for prefixes in the master[46] table of routers in the looking glass 1b650ad