Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
A test bench to conduct performance measurement series.
Outfitted especially to determine runtime behaviour of the Scheduler and associated parts of the Lumiera Engine through systematic execution of load scenarios.
The point of departure for any stress testing is to show that the subject will break in controlled ways only. For the Scheduler this can easily be achieved by overloading until job deadlines are broken. Much more challenging however is the task to find out about the boundary of regular scheduler operation. This realm can be defined by the ability of the scheduler to follow and conform to the timings set out explicitly in the schedule. Obviously, short and localised load peaks can be accommodated, yet once a persistent backlog builds up, the schedule starts to slip and the calculation process will flounder.
A method to determine such a »breaking point« in a systematic way is based on building a synthetic calculation load and establish the timings of a test schedule based on a simplified model of expected computation expense. By scaling and condensing these schedule timings, a loss of control can be provoked, and determined by statistical observation: since the process of scheduling contains an essentially random component, persistent overload will be indicated by an increasing variance of the overall runtime, and a departure from the nominal runtime of the executed schedule.
Another, complimentary observation method is to inject a defined and homogeneous load peak into the scheduler and then watch the time it takes to process, the processing overhead and achieved degree of concurrency. The actual observation using this measurement setup attempts to establish a single control parameter as free variable, allowing to look for correlations and to build a linear regression model to characterise a supposed functional dependency. Simply put, given a number of fixed sizes jobs (not further correlated) as input, this approach yields a »number of jobs per time unit« and »socked overhead« — thereby distilling a behaviour model to describe the actual stochastic data.
To perform this test scheme, an operational Scheduler is required, and an instance of the TestChainLoad must be provided, configured with desired load properties. Moreover, the actual measurement setup requires to perform several test executions, controlling some parameters in accordance to the observation scheme. The control parameters and the specifics of the actual setup should be clearly visible, while hiding the complexities of measurement execution.
This can be achieved by a »Toolbench«, which is a framework with building blocks, providing a pre-arranged measurement rig for the various kinds of measurement setup. The implementation code is arranged as a »sandwich« structure...
Setup
class, which inherits from the bottom layer and fills in the actual topology and configuration for the desired testThe bench::BreakingPoint tool typically uses a complex interwoven job plan, which is tightened until the timing breaks. The stressFactor of the generated schedule will be the active parameter of this test, performing a binary search for the breaking point. The Measurement attempts to narrow down to the point of massive failure, when the ability to somehow cope with the schedule completely break down. Based on watching the Scheduler in operation, the detection was linked to three conditions, which typically will be triggered together, and within a narrow and reproducible parameter range:
As a complement, the bench::ParameterRange tool is provided to run a specific Scheduler setup while varying a single control parameter within defined limits. This produces a set of (x,y) data, which can be used to search for correlations or build a linear regression model to describe the Scheduler's behaviour as function of the control parameter. The typical use case would be to use the input length (number of Jobs) as control parameter, leading to a model for Scheduling expense.
The TestChainLoad, together with its helpers and framework, already offers some tools to visualise the generated topology and to calculate statistics, and to watch an performance with instrumentation. In addition, the individual tools provide some debugging output to watch the measurement scheme. Result data is either a tuple of values (in case of bench::BreakingPoint), or a table of result data as function of the control parameter (for bench::ParameterRange). Result data, when converted to CSV, can be visualised as Gnuplot diagram.
Definition in file stress-test-rig.hpp.
#include "test-chain-load.hpp"
#include "lib/binary-search.hpp"
#include "lib/test/transiently.hpp"
#include "vault/gear/scheduler.hpp"
#include "lib/time/timevalue.hpp"
#include "lib/meta/function.hpp"
#include "lib/format-string.hpp"
#include "lib/format-cout.hpp"
#include "lib/gnuplot-gen.hpp"
#include "lib/stat/statistic.hpp"
#include "lib/stat/data.hpp"
#include "lib/util.hpp"
#include <algorithm>
#include <utility>
#include <vector>
#include <tuple>
#include <array>
Classes | |
class | BreakingPoint< CONF > |
Specific stress test scheme to determine the »breaking point« where the Scheduler starts to slip. More... | |
struct | LoadPeak_ParamRange_Evaluation::DataRow |
struct | StressTestRig< maxFan >::Launcher< CONF > |
struct | LoadPeak_ParamRange_Evaluation |
Mix-in for setup of a #ParameterRange evaluation to watch the processing of a single load peak, using the number of added job as independent parameter. More... | |
class | ParameterRange< CONF > |
Specific test scheme to perform a Scheduler setup over a given control parameter range to determine correlations. More... | |
struct | BreakingPoint< CONF >::Res |
class | StressTestRig< maxFan > |
Configurable template framework for running Scheduler Stress tests Use to build a custom setup class, which is then injected to perform a specific measurement tool. Several tools and detailed customisations are available in namespace bench More... | |
Typedefs | |
using | IncidenceStat = lib::IncidenceCount::Statistic |
Functions | |
template<typename F , typename G > | |
auto | linearRegression (Column< F > const &x, Column< G > const &y) |
Calculate a linear regression model for two table columns. More... | |
Namespaces | |
vault | |
Vault-Layer implementation namespace root. | |
vault::gear | |
Active working gear and plumbing. | |
struct vault::gear::test::bench::BreakingPoint::Res |
|
inline |
Calculate a linear regression model for two table columns.
(socket,gradient,Vector(predicted),Vector(deltas),correlation,maxDelta,stdev)
Definition at line 565 of file stress-test-rig.hpp.
References vault::gear::test::bench::linearRegression().
Referenced by vault::gear::test::bench::linearRegression().