[RDP] Internal Scheduler optimization

Alban Peignier alban at tryphon.eu
Wed Oct 8 04:26:06 EDT 2014

Hi all,

We made some benchmarks on rdlogmanager log generation, to especially
understand the reasons of the high CPU usage.

In fact ... the slowness is due to a bad choise of data structure in
SchedCardList. It uses arrays and the item removal is very expensive,
... but it's the first usage :(

This patch is refactoring SchedCardList by using a linked list of
SchedCard objects :

The logic is the same, but the generation time has changed :

Before :

rdlogmanager -g -s Grille_A -d 1
441.38s user 0.31s system 94% cpu 7:48.03 total

After :

rdlogmanager -g -s Grille_A -d 1
10.08s user 0.22s system 29% cpu 34.661 total

It's 13x faster :)

The patch contains 4 other commits to improve SQL queries performed by
generateLog (which saves few seconds).

We tested this patch on several customer databases. But it would be
great if several people could check it doesn't break one of the internal
scheduler logics.

Alban Peignier - alban at tryphon.eu

Tryphon : Radio, Web et Logiciels Libres

More information about the Rivendell-prog mailing list