Title: Locality of Reference and the Use of Waiting Time Variance for Measuring Queue Fairness
1Locality of Referenceand the Use of Waiting Time
Variance for Measuring Queue Fairness
- David Raz
- School of Computer Science, Tel Aviv University
- Jointly with
- Hanoch Levy, Tel Aviv University
- Benjamin Avi-Itzhak, RUTGERS University
- TAU CS Networking Seminar May 2006
2Motivation which system is more fair?
3Motivation which system is more fair?
4Wasnt the problem already solved? Kingman, 1962
- The purpose of this present note is to consider
the variance of waiting time, and we shall prove
that this is minimum when the customers are
served in the order of arrival. Thus this is, in
a sense, the fairest queue discipline - (J. F. C. Kingman, The effect of queue discipline
on waiting time variance, Proceedings of the
Cambridge Philosophical Society 58 (1962)
163-164) - Note non-preemptive disciplines
5So what does this imply?The common approach to
unfairness
- Measure single job discrimination by measuring
waiting/sojourn time - Measure system unfairness by measuring variance
- Inequalities ? Unfairness
6So what is wrong with this?Consider the
following
- Arrivals only in 6 unit intervals
- All jobs require one unit of service
- Either 2 or 4 jobs arrive simultaneously (50
chance), all served PS
6 units
Time
7Observations
- All jobs are treated fairly. None is
discriminated - Some wait 1 unit, some wait 3
- The variance is 0.9
- Why?
8Consider II
- Same scenario, jobs are served FCFS
- Mean waiting time is 1.167
- Is the second job in a busy period with two jobs
really discriminated positively? - Can a job owner even tell?
9So why is the variance wrong I
- Req 1 Measurements should only compare jobs
whose service (prioritization) can affect each
other - What is the correct comparison set?
Locality of Measurement
Time
10Comparison Set
- Claim the correct comparison set is the busy
period - Lemma jobs can affect each other iff they are in
the same BP - ? Obviously jobs on different busy periods cannot
influence each other - ? If jobs are on the same busy period one can
build another busy period where resources are
moved from one to the other.
11Inter and Intra Variance
- Semi-Formally
- X RV of some measure with mean
- Y RV eq. average of X in local BP
- Intra-Variance second moment of X around Y
- Inter-Variance second moment of Y around
Y
1
1
3
3
12Inter and Intra Variance
- Lemma Variance Between BP (Inter-Variance)
Within BP (Intra-Variance)
Req1 A Measure is said to have to have its
variance local if the (global) variance equals
the intra-variance
13So why is the variance wrong II
- Req 2 Job owners should be able to tell if they
are positively or negatively discriminated - Proposed way Jobs should know the mean for the
BP in advance
Req 2 In practice the mean of all BPs should be
equal
14Equivalence of requirements
- Observation
- Req 1 and Req 2 are equivalent!
- If the mean is equal for all busy periods, there
is no variance between busy periods, only within
them.
LOCALLY MEASURED
15Approach for finding measure
- Keep the idea
- Measure discrimination
- Use variance
- Lets examine the newly proposed RAQFM (and other
methods) in this light
16RAQFM Philosophy
Equal Share of Resources
? Fairness
17RAQFM - How to Apply the Philosophy Individual
Discrimination
- At every epoch t with N(t) customers in the
system, each customer should get 1/N(t) - Warranted service
- Granted service
- Compare the warranted service with the granted
service discrimination
18Observations on RAQFM
- Theorem Mean for every busy period is zero
- Proof Sketch
- note that the momentary sum of discriminations is
zero.
19Observations on RAQFM
- Customers can tell easily if they are positively
or negatively discriminated - If mean is zero there is no variance between busy
periods
Both Properties Hold for RAQFM
20Uniqueness
- Theorem
- RAQFM (and some close relatives) is unique in
this property, within a large group of
measurements - Proof outline other measures cannot achieve
equal means. If one achieves equal mean for some
scenario we can build a scenario where it does
not
21Some example of built busy periods
22Alternative Measure Explicit Evaluation of
Intra-Variance
- We claimed that the intra-variance is the
important property of a measure - Use the intra-variance of the waiting time
explicitly as a measure of fairness - By definition influenced only by jobs within the
BP - Can be quite easily evaluated through simulation.
Requires only a few more counters
23Alternative Measure - Problems
- Does this address the second problem?
- Does not provide any indication to the job owner
whether the job is positively or negatively
treated. - Can we evaluate it?
- Hard to do analytically. Required evaluating
- RAQFM for example can be evaluated at least for
M/PH/m
24Conclusion
- The variance of waiting/sojourn time is not
locally measured - Being locally measured is import ant
- variances between and within busy periods
- Customers can tell if they are positively or
negatively discriminated - RAQFM is locally measured
- And uniquely so