FailureModel
OpenDC provides three types of failure models: Trace-based, Sample-based, and Prefab.
All failure models have a similar structure containing three simple steps.
- The interval time determines the time between two failures.
- The duration time determines how long a single failure takes.
- The intensity determines how many hosts are effected by a failure.
The code that defines the Failure Models can found here.
Trace based failure models
Trace-based failure models are defined by a parquet file. This file defines the interval, duration, and intensity of several failures. The failures defined in the file are looped. A valid failure model file follows the format defined below:
Metric | Datatype | Unit | Summary |
---|---|---|---|
failure_interval | int64 | milli seconds | The duration since the last failure |
failure_duration | int64 | milli seconds | The duration of the failure |
failure_intensity | float64 | ratio | The ratio of hosts effected by the failure |
The code implementation of Trace Based Failure Models can be found here
Example
A trace-based failure model is specified by setting "type" to "trace-based". After, the user can define the path to the failure trace using "pathToFile":
{
"type": "trace-based",
"pathToFile": "path/to/your/failure_trace.parquet"
}
The "repeat" value can be set to false if the user does not want the failures to loop:
{
"type": "trace-based",
"pathToFile": "path/to/your/failure_trace.parquet",
"repeat": "false"
}
Sample based failure models
Sample based failure models sample from three distributions to get the interval, duration, and intensity of each failure. Sample-based failure models are effected by randomness and will thus create different results based on the provided seed.
The code implementation for the Sample based failure models can be found here
Distributions
OpenDC supports eight different distributions based on java's RealDistributions. Because the different distributions require different variables, they have to be specified with a specific "type". Next, we show an example of a correct specification of all available distributions in OpenDC.
ConstantRealDistribution
{
"type": "constant",
"value": 10.0
}
ExponentialDistribution
{
"type": "exponential",
"mean": 1.5
}
GammaDistribution
{
"type": "gamma",
"shape": 1.0,
"scale": 0.5
}
LogNormalDistribution
{
"type": "log-normal",
"scale": 1.0,
"shape": 0.5
}
NormalDistribution
{
"type": "normal",
"mean": 1.0,
"std": 0.5
}
ParetoDistribution
{
"type": "pareto",
"scale": 1.0,
"shape": 0.6
}
UniformRealDistribution
{
"type": "constant",
"lower": 5.0,
"upper": 10.0
}
WeibullDistribution
{
"type": "constant",
"alpha": 0.5,
"beta": 1.2
}
Example
A sample-based failure model is defined using three distributions for intensity, duration, and intensity. Distributions can be mixed however the user wants. Note, values for intensity and duration are clamped to be positive. The intensity is clamped to the range [0.0, 1.0). To specify a sample-based failure model, the type needs to be set to "custom".
Example:
{
"type": "custom",
"iatSampler": {
"type": "exponential",
"mean": 1.5
},
"durationSampler": {
"type": "constant",
"alpha": 0.5,
"beta": 1.2
},
"nohSampler": {
"type": "constant",
"value": 0.5
}
}
Prefab failure models
The final type of failure models is the prefab models. These are models that are predefined in OpenDC and are based on research. Currently, OpenDC has 9 prefab models based on The Failure Trace Archive: Enabling the comparison of failure measurements and models of distributed systems The figure below shows the values used to define the failure models.
Each failure model is defined four times, on for each of the four distribution. The final list of available prefabs is thus:
G5k06Exp
G5k06Wbl
G5k06LogN
G5k06Gam
Lanl05Exp
Lanl05Wbl
Lanl05LogN
Lanl05Gam
Ldns04Exp
Ldns04Wbl
Ldns04LogN
Ldns04Gam
Microsoft99Exp
Microsoft99Wbl
Microsoft99LogN
Microsoft99Gam
Nd07cpuExp
Nd07cpuWbl
Nd07cpuLogN
Nd07cpuGam
Overnet03Exp
Overnet03Wbl
Overnet03LogN
Overnet03Gam
Pl05Exp
Pl05Wbl
Pl05LogN
Pl05Gam
Skype06Exp
Skype06Wbl
Skype06LogN
Skype06Gam
Websites02Exp
Websites02Wbl
Websites02LogN
Websites02Gam
The different Prefab models can be found here
Example
To specify a prefab model, the "type" needs to be set to "prefab". After, the prefab can be defined with "prefabName":
{
"type": "prefab",
"prefabName": "G5k06Exp"
}