LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
fj_mg1_respt_moments.h File Reference

Mean and variance of the M/G/1 response time, as ForkTail inputs. More...

#include <cmath>
#include "line/num/number.h"
#include "line/util/error.h"
Include dependency graph for fj_mg1_respt_moments.h:

Go to the source code of this file.

Classes

struct  line::fj::Mg1ResptMoments< T >
 Mirrors MATLAB's [ET, VT] return list. More...

Namespaces

namespace  line
namespace  line::fj

Functions

template<class T>
Mg1ResptMoments< T > line::fj::fj_mg1_respt_moments (const T &lambda, const T &ES, const T &ES2, const T &ES3)
 Mean and variance of the M/G/1 response time, as ForkTail inputs.

Detailed Description

Mean and variance of the M/G/1 response time, as ForkTail inputs.

Templated port of matlab/src/api/fj/fj_mg1_respt_moments.m. No JAR counterpart. Closes the white-box route of fj_tail_forktail for a fork branch that is an M/G/1 FCFS queue, from the first three moments of its service time:

E[T] = E[S] (1 + rho/(1-rho) (1+SCV_S)/2) V[T] = E[W]^2 + lambda E[S^3]/(3(1-rho)) + E[S^2] - E[S]^2

with rho = lambda E[S] and E[W] = lambda E[S^2]/(2(1-rho)), the Pollaczek-Khinchine mean waiting time. The THIRD moment enters the variance only, so a Markovian branch needs no input beyond what its service law already reports.

A service law with no finite third moment (a Pareto branch of shape <= 3, say) leaves the ForkTail variance undefined; that is reported as an input error rather than propagated as an infinity, because every downstream ForkTail fit would then silently return the exponential special case.

Reference: M. Nguyen, S. Alesawi, N. Li, H. Che, H. Jiang, "ForkTail: A Black-Box Fork-Join Tail Latency Prediction Model for User-Facing Datacenter Workloads", ACM HPDC 2018, equations (10) and (11).

ARITHMETIC: rational in the four inputs, so the exact instantiation is available and there is no static_assert.

Definition in file fj_mg1_respt_moments.h.