Labs
Each lab takes under an hour on a laptop and turns a claim from this mechanism into a number you measured yourself.
- 1
Measure leverage and the cost of a cold restart
See that hit rate is leverage, and that a restart is a load spike on the layer below.
SimulatePython with NumPy - 2
Draw a miss-ratio curve with SHARDS-style sampling
Check that one pass over a trace gives the miss ratio for every LRU size, and that key sampling is accurate.
SimulatePython with NumPy, numba - 3
Find the plateau and the knee
See that adding cache memory can do nothing, then a lot.
SimulatePython with NumPy - 4
Negative cache and Bloom filter
Measure the effect of absent-key lookups and the false-positive rate of a Bloom filter.
MeasurePython - 5
The race between a reader and a writer: update versus delete
Use two threads and a dictionary as the "cache" plus a second dictionary as the "store".
Break itPython - 6
Stampede with and without protection
Write a small Python program with a fake "database" function that sleeps 2 seconds and counts how many times it is called.
SimulatePython - 7
Scan resistance: LRU against an admission filter
Generate a Zipf-distributed request stream (alpha = 1) over 100,000 keys with numpy.random.zipf or a precomputed cumulative table, 2 million requests, cache size C = 5,000.
SimulatePython with NumPy