]> git.itanic.dy.fi Git - rrdd/commit
rrdtool: Reduce excess parallelism
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Thu, 12 Apr 2012 18:52:09 +0000 (21:52 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Thu, 12 Apr 2012 19:05:46 +0000 (22:05 +0300)
commit552fb2e9094b3d6c0142d4b78b4199a945ae8242
tree092cd8f43f2593f351762c5bce54055269550486
parentf2a60b37d6e3f24ac3f7de05f0751215fa59c165
rrdtool: Reduce excess parallelism

Right now all commands are run "as parallel as possible", up to the
point images are being drawn while the databases are still
updated. This leads to problems where the image drawing finishes
before databases are read, thus the image contains always the
information from the last update instead of current.

This patch modifies the behavior so that when the database is being
updated, the drawing does not beging before the update has
succeeded.

Furthermore, image drawings are not done fully parallel. If they were,
the temporary file would be always renamed before there was any chance
that the actual image rendering was finished. Instead, rename is
synchronized with the image drawing.

As a consequence total parallelism is greatly reduced. This obviously
slows down update and image drawing process greatly on machines that
have many CPUs, that would otherwise benefit greatly from being able
to all actions in parallel. The maximum number of parallel actions is
practically limited to the number of databases that are being operated
with. The correctness of the operations is however more important than
maximising parallelism.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
rrdtool.c