Try
↑ ↓ move↵ openesc close

Load shedding lab

Push more traffic at a server than it can serve, and compare an unbounded queue with a bounded queue, deadline-aware drop and adaptive LIFO by the work that finishes in time.

offered = 6.0 per tcapacity = 4 per tload 1.50x · client timeout 10 t · t = one mean service time

Unbounded FIFO

31 waiting

goodput vs capacity
71%
queue delay
2.8t
timeout
10t

answered late 0 · rejected 0 · dropped 0 · expired 0

Bounded queue, reject

18 waiting

goodput vs capacity
69%
queue delay
3.0t
timeout
10t

answered late 0 · rejected 15 · dropped 0 · expired 0

Deadline-aware drop

35 waiting

goodput vs capacity
66%
queue delay
3.0t
timeout
10t

answered late 0 · rejected 0 · dropped 0 · expired 0

Adaptive LIFO

20 waiting

goodput vs capacity
73%
queue delay
0.2t
timeout
10t

answered late 0 · rejected 0 · dropped 0 · expired 10

Goodput over time
Goodput over time. Text version available below the chart.0%30%60%90%120%t=3t=9t=15simulated timeshare of capacity
Queue delay of requests that were served
Queue delay of requests that were served. Text version available below the chart.0.01.32.53.85.0t=3t=9t=15simulated timedelay (t)
Goodput against offered load, after 200 t (fixed seed 7)
Goodput against offered load, after 200 t (fixed seed 7). Text version available below the chart.0%30%60%90%120%0.5x1.5x3xcapacityoffered load (x capacity)goodput share

What to try

Each one sets up a starting point. Then make the change it describes.

  1. Overload with no limit on the queue

    Keep the offered load at 1.5 and compare all four policies. Watch the goodput chart and the queue delay chart.

    Look for. The unbounded queue works at first. Once its queue delay passes the client timeout, every request it serves is one the client already gave up on, and goodput falls to nothing while the server stays busy. The other three keep goodput near capacity.

  2. Stay under capacity

    Set the offered load to 0.7.

    Look for. Nothing collapses. All four policies finish almost everything, and queue delay stays small. Shedding policies only matter when there is more work than capacity.

  3. A bounded queue that is too big

    Pick the bounded queue alone and set its size to 200. Then set it back to 20.

    Look for. A queue that holds more than timeout times capacity can fill with requests that will expire before they reach a worker, so it behaves like an unbounded one. The size has to be chosen from the timeout.

  4. Cut the client timeout

    Set the client timeout to 4 and compare all four.

    Look for. The bounded queue of 20 now holds more waiting time than the clients will give it, so it starts failing too. The deadline-aware policy needs no tuning because it checks each request against its own deadline.

  5. Serve the newest first

    Pick adaptive LIFO alone at 2.0 times capacity and read the queue delay and the expired count.

    Look for. Served requests wait almost no time, because the newest request is the one with the most patience left. The price is that old requests are never served. They sit until they expire, so some users wait for nothing.

New to the idea? Read the lesson first. Every number here comes from a seeded simulator, so the same seed gives the same run.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms