Learn R Programming

usl (version 1.2.1)

usl: Create a model for the Universal Scalability Law

Description

usl is used to create a model for the Universal Scalability Law.

Usage

usl(formula, data, method = "default", R = 50)

Arguments

formula
An object of class "formula" (or one that can be coerced to that class): a symbolic description of the model to be analyzed. The details of model specification are given under 'Details'.
data
A data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. If not found in data, the variables are taken from environment(formula), typically the environment from wh
method
Character value specifying the method to use. The possible values are described unter 'Details'.
R
The number of bootstrap replicate used to estimate the confidence intervals for the parameters sigma and kappa.

Value

  • An object of class USL.

Details

The Universal Scalability Law is used to forcast the scalability of either a hardware or a software system.

The USL model works with one independent variable (e.g. virtual users, processes, threads, ...) and one dependent variable (e.g. throughput, ...). Therefore the model formula must be in the simple "response ~ predictor" format.

The model produces two coefficients as result: sigma models the contention and kappa the coherency delay of the system. The function coef extracts the coefficients from the model object.

The argument method selects which solver is used to solve the model:

  • "default" for the default method using a transformation into a 2nd degree polynom. It can only be used if the model frame contains a value for the normalization where the predictor equals "1" for one measurement. This is the algorithm introduced by Dr. Neil J. Gunther in the bookGuerrilla Capacity Planning.
  • "nls" for a nonlinear regression model. This method estimates not only the coefficientssigmaandkappabut also thescale.factorfor the normalization.nlswith the "port" algorithm is used internally to solve the model. So all restrictions of the "port" algorithm apply.
  • "nlxb" for a nonliner regression model using the functionnlxbfrom thenlmrtpackage. This method also estimates both coefficients and the normalization factor. It is expected to be more robust than thenlsmethod.

The parameter R defines the number of bootstrap replicates used to estimate the parameter confidence intervals. Depending on the number of observations the default 50 may be too low to get reasonable results. See boot and boot.ci for details. The method confint is used to get confidence intervals for a model.

The Universal Scalability Law can be expressed with following formula. C(N) predicts the relative capacity of the system for a given load N:

$$C(N) = \frac{N}{1 + \sigma (N - 1) + \kappa N (N - 1)}$$

References

Neil J. Gunther. Guerrilla Capacity Planning: A Tactical Approach to Planning for Highly Scalable Applications and Services. Springer, Heidelberg, Germany, 1st edition, 2007.

John C. Nash. nlmrt: Functions for nonlinear least squares solutions, 2013. R package version 2013-8.10.

See Also

efficiency, scalability, peak.scalability, summary, coef, fitted, residuals, deviance, confint

Examples

Run this code
require(usl)

data(raytracer)

## Create USL model for "throughput" by "processors"
usl.model <- usl(throughput ~ processors, raytracer)

## Show summary of model parameters
summary(usl.model)

## Show complete list of efficiency parameters
efficiency(usl.model)

## Extract coefficients for model
coef(usl.model)

## Calculate point of peak scalability
peak.scalability(usl.model)

## Plot original data and scalability function
plot(raytracer)
plot(usl.model, add=TRUE)

Run the code above in your browser using DataLab