Monitor and plot RSS and CPU usage during index builds of non-qlever engines - #327
Draft
tanmay-9 wants to merge 11 commits into
Draft
Monitor and plot RSS and CPU usage during index builds of non-qlever engines#327tanmay-9 wants to merge 11 commits into
tanmay-9 wants to merge 11 commits into
Conversation
…t new engines can reuse existing code
…o share-resource-usage-plot-and-monitor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #305 , the QLever binaries sample their own RSS and CPU usage and write the resource-usage log themselves, so the python-side sampler was removed. The other engines do not write such a log, and need a universal python-side sampler.
With this change, an index build of any engine records RSS and CPU usage over time and renders the same kind of plot as
qlever indexdoes: memory and CPU on two axes, one shaded band per build phase, and a subtitle with the settings the build ran with. The bands and the subtitle are the only engine-specific parts and are provided per engine; everything else is shared. For an engine that builds its index in several runs, the runs land in one continuous log, and a run that fails does not leave its samples behind.The log and the plot files of a non-QLever engine are prefixed
<dataset>.<engine>, so that it is clear which engine a file belongs to. QLever keeps the plain<dataset>prefix, since its own binaries write that log.NOTE: The log written on the client side has only the columns that the index build and its plot need, not the full format of the log that the QLever binaries write. The plot also still needs
numpyandmatplotlib(pip install qlever[plot]).