RAQFM – a Resource Allocation Queueing Fairness Measure David Raz School of Computer Science, Tel...

Post on 25-Dec-2015

215 views 2 download

Tags:

Transcript of RAQFM – a Resource Allocation Queueing Fairness Measure David Raz School of Computer Science, Tel...

RAQFM – a Resource Allocation Queueing Fairness Measure

David RazSchool of Computer Science, Tel Aviv University

Jointly withHanoch Levy, Tel Aviv UniversityBenjamin Avi-Itzhak, RUTGERS University

Sigmetrics – Performance, June 2004

June, 2004 D. Raz, RAQFM, Sigmetrics042

Outline

Motivation– The importance of fairness in queues– The physical properties of the problem– Related work

The RAQFM approach Properties Analysis

June, 2004 D. Raz, RAQFM, Sigmetrics043

Why is Fairness in Queues Important?

Fundamental reason:– Isn’t fairness why we have queues in the first

place? Scientific evidence, recent studies, Rafaeli et.

al. [2003] (experimental psychology):– Experiments on humans in multi-queue and single

queue – Fairness in queue is very important to people– Perhaps even more than the delay itself

June, 2004 D. Raz, RAQFM, Sigmetrics044

Queueing Theory and Fairness

Decades of research on:– Queueing structures / policies– Focused on efficiency – delay distribution/moments,

utilization, etc. The issue of fairness is discussed, but not quantified

– Larson (1988), Palm (1953), Mann (1969), Whitt (1984) etc. Existing measures for streams (WFQ) Little analysis on job fairness

– Morris & Wang (1985)– Avi-Itzhak & Levy (2004)– Wierman & Harchol-Balter (Sigmetrics 2003)

We know very little about job fairness

June, 2004 D. Raz, RAQFM, Sigmetrics045

Queues: The Physical Factors

Size(Service Requirement)

ResourcesSeniority(Arrival Time)

June, 2004 D. Raz, RAQFM, Sigmetrics046

Fairness: Size and Seniority

Size

Seniority

June, 2004 D. Raz, RAQFM, Sigmetrics047

The Size vs. Seniority Dilemma

Short vs. Long

Is it more fair to serve Short ahead of Long? What is the intuition?

LongShort

June, 2004 D. Raz, RAQFM, Sigmetrics048

Recent Related Work(1)

Avi-Itzhak & Levy (2004):– Axiomatic approach to fairness– Departure point & emphasis: Seniority (Order of

service)

Some results (for equal service times)– FCFS is the most fair (among non preemptive)– LCFS is the most unfair (among non preemptive)

Takes Seniority into account

June, 2004 D. Raz, RAQFM, Sigmetrics049

Recent Related Work(2)

Wierman & Harchol-Balter (2003):– Propose a Fairness Criterion– Slowdown: for job of size x compute E[T(x)/x]. If it

is bounded the system is FAIR.

Some results:– FCFS is “Always UNFAIR”– LCFS (preemptive) is FAIR

Takes Size into account

June, 2004 D. Raz, RAQFM, Sigmetrics0410

Requirements From a Job Fairness Measure

Reacts well to both Seniority and Size Aim for standard have a consistent view

and agree with Intuition build confidence Yields to Analysis

RAQFM – A Resource Allocation Queueing Fairness Measure

June, 2004 D. Raz, RAQFM, Sigmetrics0411

RAQFM Philosophy

Equal Share of Resources

Fairness

June, 2004 D. Raz, RAQFM, Sigmetrics0412

RAQFM - 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:

i

i

dttN

Ri

departure

arrival )(

1

iii sdttsGi

i

departure

arrival

)(

iii RGD

June, 2004 D. Raz, RAQFM, Sigmetrics0413

Basic Properties of the Discrimination

E[D]=0 (every sample path, every policy)Proof sketch: The momentary rate of discrimination is”zero sum”

For PS individual discrimination is zero

0)(

1)(1

tNtN

0)(

1

)(

1

tNtNDi

June, 2004 D. Raz, RAQFM, Sigmetrics0414

RAQFM – System Fairness

System Unfairness: differences in customer treatment (customer discrimination)

We measure the unfairness in a system using Var[D] (D is r.v.)

Var[D] ≥ 0

Property 1: PS is the most fair policy

June, 2004 D. Raz, RAQFM, Sigmetrics0415

Short vs. Long Revisited

Seniority (Arrival Time)

Difference sen Size (Service Requirement)

Difference

sizeIs it more fair to serve Short ahead of Long?

June, 2004 D. Raz, RAQFM, Sigmetrics0416

The difference in unfairness resulting from serving short ahead of long is

If size difference is small – serve by order of arrival If seniority difference is small – serve by order of

service requirement

)( sizesenc

RAQFM Agrees With Intuition

Short vs. Long Revisited

June, 2004 D. Raz, RAQFM, Sigmetrics0417

Property 2: Bounds

Individual discrimination is bound by– How good– How bad

i iD s

/ 2i iD W

June, 2004 D. Raz, RAQFM, Sigmetrics0418

Property 3: Reaction to Seniority

Theorem: If customers have equal service requirements– For each pair of customers, it is more fair to serve

the senior first

⇒FCFS is the most fair⇒LCFS is the least fair

(Proof sketch: compare scenarios)

RAQFM Reacts Well to Seniority

June, 2004 D. Raz, RAQFM, Sigmetrics0419

Property 3: Reaction to Size

Theorem: If customers arrive together– For each pair of customers, it is more fair to serve

the shorter first

⇒SJF is the most fair⇒LJF is the least fair

(Proof sketch – prove )

RAQFM Reacts Well to Size

2

1

[ ] ( )1

N

ii

N iVar D S

N i

June, 2004 D. Raz, RAQFM, Sigmetrics0420

Property 4: RAQFM is Analyzable

Example: analysis of M/M/1 FCFS– Markov chain state is (a,b)=(# ahead, # behind)– c(a,b)=momentary discrimination rate at state (a,b)– d(a,b)=expected discrimination of a walk starting

at (a,b)–

– Similarly for the second moment d(2)(a,b)–

( 1, ) 0( , ) ( , ) ( , 1)

0 0

d a b ad a b tc a b d a b

a

kk

PkdDE

0

)2(2 )0,(][

June, 2004 D. Raz, RAQFM, Sigmetrics04210 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0

1

2

3

4

5

6

7

Var

[D]

Preemptive LCFSNon-Preemprive LCFSROSFCFSPS

Fairness of Service Policies Not Discriminating For Sizeas function of load

Empty system: everyon

e is alone

LCFS: Severe

seniority violation

FCFS: no seniority violation

PS:

Absolute

Fairness

June, 2004 D. Raz, RAQFM, Sigmetrics04220 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9

0

1

2

3

4

5

6

7

Var

[D]

Preemptive LCFSNon-Preemprive LCFSROSFCFSPS

Is FCFS Always More Fair Than LCFS?

Mice

Elephants

1.0/1,5.0

10/1,01.0

22

11

FCFS = 0.9

Preemptive LCFS = 0.15

June, 2004 D. Raz, RAQFM, Sigmetrics0423

Summary

Fairness is extremely important, yet there are little quantification methods for jobs

RAQFM– Philosophy: fair share of service– Agrees with intuition– Reacts well to seniority and size– Yields to analysis

June, 2004 D. Raz, RAQFM, Sigmetrics0424

Future Work

More service policies – SRPT, SJF, FB etc. Generalized service requirement Different architectures – multi-class, multi-

server, multi-queue, polling etc.

RAQFM – a Resource Allocation Queueing Fairness Measure

David RazSchool of Computer Science, Tel Aviv University

Jointly withHanoch Levy, Tel Aviv UniversityBenjamin Avi-Itzhak, RUTGERS University

Sigmetrics – Performance, June 2004

Thank You

http://www.cs.tau.ac.il/~davidraz