Skip to content
OnlyProjects
M.Tech / M.E. · Computer Science & EngineeringFor educational purposes only
Code included

Cache-Eviction Policy Comparison for a Campus E-Learning Proxy: LRU, LFU, ARC and TinyLFU under Traced Workloads

Four cache-replacement algorithms replayed over real proxy traces and synthetic Zipf workloads, with paired statistical testing

Mapped to your syllabusAnna University M.E. Regulation 2021 · CP4411 Project Work II · Semester 4

Overview

1 min read

This dissertation asks a practical question: which cache-replacement policy should an engineering-college content proxy actually run when most of its traffic is e-learning content — recorded lecture videos, PDF notes, question papers and e-books? Every policy claims to be better on the author's benchmark; this project finds out what happens on our workload.

A cache-eviction policy decides which object to discard when the cache is full. The classic policies — LRU (evict the least recently used), LFU (evict the least frequently used) and Random — are taught in every operating-systems course, while ARC (Adaptive Replacement Cache) and TinyLFU (a frequency-sketch admission policy) are well-known industrial refinements. Each behaves differently depending on the request stream: recency-friendly, frequency-friendly, scan-resistant or noisy.

The project builds a trace-driven discrete-event simulator in Java: request logs collected from a college e-learning proxy (with client addresses anonymised) and synthetic Zipf-distributed workloads are replayed through identical implementations of the four policies plus a Random baseline and an Oracle (Belady's OPT) lower bound. For every policy and cache size, the simulator records hit ratio, byte hit ratio, retrieval latency and per-policy memory and CPU overhead. Because the same traces are replayed through each policy, paired statistical tests (paired t-test and Wilcoxon signed-rank on cache-size slices) can attach significance and effect sizes to the differences — the experimental-design discipline taught in RM4151.

The deliverable is a defensible recommendation — which policy, at which cache sizes, under which access patterns — with evidence to answer every examiner's "how do you know?"

Relevant for
Tamil Nadu
Level
Intermediate · 24 weeks · solo
Common at
Anna University, Chennai, Visvesvaraya Technological University, JNTU Hyderabad
Updated
Nov 2026

Syllabus alignment

Anna University · M.E. Regulation 2021

CP4411 · Project Work II · Semester 4 · 12 credits

Subjects this project applies
  • RM4151 Research Methodology & IPR
  • CP4155 Advanced Data Structures Lab
  • CP4212 Software Engineering Lab
  • Java programming
  • Python for data analysis
How it is evaluated

See your department's project guidelines.

Also fits: VTU M.Tech 2022 Scheme, JNTUH M.Tech R22.

What's in the box

11 parts · 5 free · 2 previewed · 4 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

A college e-learning portal generates highly skewed, bursty request traffic, and the campus proxy that serves it must keep the right objects in a cache that is always much smaller than the full content library. Choosing the eviction policy is currently guesswork: recency-based policies are known to be polluted by full-course downloads and antivirus scans, frequency-based policies fail to adapt when a semester changes the popular set, and the published claims for modern policies are all evaluated on foreign CDN or storage traces whose object sizes and popularity shapes differ greatly from lecture videos and PDFs. There is no measured, statistically tested answer to the question "which policy gives the best hit ratio and latency for our traffic at our cache sizes?" — and an untested choice either wastes scarce memory or subjects students to avoidable re-downloads. This project closes that gap with a controlled, paired, reproducible experimental study.

Synopsis

Abstract

Campus e-learning portals are the heaviest single load on most college networks: lecture videos and notes are requested thousands of times a day by hundreds of concurrent users. A caching proxy placed at the campus edge can serve a large fraction of these requests from local memory, cutting external bandwidth cost and average download time. Its effectiveness depends almost entirely on the eviction policy — the algorithm deciding what to keep when the cache is full. This dissertation implements four classic and modern eviction policies, replays real and synthetic campus workloads through a controlled simulator, and compares them with statistical rigour.

Introduction

A 3,000-student engineering college serving recorded lectures, notes and previous-year question papers generates strongly skewed request traffic: a handful of files (the current-semester videos, yesterday's uploaded notes) attract most requests, while a long tail of old material is touched rarely. Policies that track only recency (LRU) can be polluted by one-time scans; policies that track only frequency (LFU) adapt slowly when the semester changes and a new set of "hot" files appears. ARC adapts between recency and frequency; TinyLFU keeps a compact frequency sketch and refuses likely-useless admissions. Which one wins depends on the workload — so the workload must be measured, and the comparison controlled.

Existing Work and the Gap

  • LRU, LFU and Belady's OPT are textbook algorithms; their behaviour on scan-heavy or shifted workloads is documented qualitatively but rarely quantified on Indian campus traffic.
  • ARC (Megiddo and Modha, FAST 2003) and TinyLFU (Einziger et al., 2017) report large gains on CDN and storage traces, but neither paper targets e-learning traffic with a few hundred popular objects and strong weekly periodicity.
  • Most comparisons report mean hit ratios only, without variance, confidence intervals or significance tests, making small differences impossible to trust.
  • Gap: a reproducible, statistically tested comparison of these policies on a measured Indian campus e-learning trace.

Proposed System

A trace-driven simulator with five interchangeable policies (LRU, LFU, Random, ARC, TinyLFU) plus an OPT lower bound, fed by two workload sources: (1) an anonymised two-week HTTP log from a college e-learning proxy, and (2) parameterised synthetic generators (Zipf with varying skew, controlled popularity-shift and scan injections) that let cache sizes and patterns be swept systematically. Identical replay conditions — same trace, same cache sizes, same object-size accounting — make the comparison paired and therefore testable. The analysis reports hit ratio, byte hit ratio, latency under a simple cost model, and per-request overhead, with 95% confidence intervals and paired significance tests.

Feasibility

  • Technical: the simulator is a few thousand lines of Java; all algorithms are published and well specified. Traces of 5–10 million requests replay in minutes. No special hardware is needed — an 8 GB laptop suffices.
  • Economic: no licensing cost; Java, Python and the plotting libraries are free.
  • Operational: log collection needs only proxy-log access, anonymisation and the network administrator's written approval; the rest runs entirely offline.

Objectives

  1. 01Implement exact, unit-tested versions of LRU, LFU, Random, ARC and TinyLFU (with doorkeeper), plus Belady's OPT as a lower bound, behind a common policy interface.
  2. 02Capture and anonymise a two-week request trace from a college e-learning proxy, and characterise its popularity distribution, object-size profile and temporal locality.
  3. 03Build parameterised synthetic workload generators (Zipf with varying skew, popularity shifts and scan injections) to sweep conditions a short real trace cannot cover.
  4. 04Measure hit ratio, byte hit ratio, weighted retrieval latency and per-request bookkeeping overhead for every policy across cache sizes from 0.1% to 10% of the object universe.
  5. 05Attach 95% confidence intervals and paired t-test / Wilcoxon signed-rank results to every reported difference between policies.
  6. 06Derive an evidence-backed recommendation for the cache size and policy a college proxy should deploy for e-learning traffic.
  7. 07Publish the simulator, traces (sanitised) and analysis scripts so the study can be reproduced end to end.

Scope

In scope

  • Single-campus HTTP-object proxy traffic (e-learning portal objects: video segments, PDFs, images, packages).
  • Five eviction policies plus OPT, at identical cache sizes, replayed on identical traces.
  • Byte-aware caching (objects have sizes; the cache is a byte budget, not an object count).
  • A deterministic latency cost model (cache hit = 5 ms; miss = backend fetch proportional to object size), clearly declared as a model, not a live measurement.
  • Synthetic workloads: Zipf skew 0.6–1.2, popularity-shift and scan injections.

Out of scope (v1)

  • Live deployment on the production proxy; the study is simulation-based.
  • Disk-tier (L2) caching, CDN cooperation, and admission decisions on the write path.
  • TLS performance and protocol-level effects; requests are modelled as (object-id, size, timestamp) triples.
  • Multi-cache (distributed or coordinated) eviction policies.

Methodology

Research design: quantitative, controlled, trace-driven simulation study with paired comparison across policies and cache sizes — the classical experimental-evaluation methodology of Raj Jain: fixed factors, measured response variables, replicated runs, confidence intervals and hypothesis tests.

PhaseWeeksActivitiesOutput
1. Literature & problem formulation1–3Study ARC, TinyLFU, cache surveys and workload-modelling literature; finalise factors and metricsSurvey chapter + experiment plan
2. Trace capture & characterisation4–6Obtain proxy-log access with written approval, anonymise, parse to (timestamp, object-id, size), fit popularity distributionCharacterised real trace
3. Policy implementation7–10Implement LRU, LFU, Random, ARC, TinyLFU, OPT in Java behind one interface; property-based unit testsTested policy library
4. Simulator & experiment matrix11–13Byte-accounted replay engine, latency cost model, config-driven sweep (6 policies × 8 cache sizes × traces × 5 seeds for synthetic)Experiment runner
5. Analysis14–17Per-request metric extraction, bootstrap CIs, paired t-tests and Wilcoxon signed-rank across cache-size slices, effect sizesResults tables + plots
6. Robustness checks18–19Scan/shift injections, sensitivity to cost-model constants, run-time overhead measurementRobustness chapter
7. Thesis & viva preparation20–24Write chapters, finalise figures, rehearse the simulator demoThesis + demo

Protocol controls: all policies replay the identical request stream (same seed order); cache budget is bytes; warm-up (first 10% of trace) is discarded before metrics are computed; each synthetic condition is replicated with 5 seeds; the analysis script regenerates every table from raw CSVs so no number is typed by hand.

Architecture & tech stack

1 diagram · 6 technologies · 1 min read

  • Java 17 (simulator core)
  • Python (analysis and plotting)
  • pandas
  • SciPy
  • matplotlib
  • Git

The system is a pipeline of five stages, wired by a configuration file so that any policy, trace and cache size can be combined without code changes.

  1. Trace layer — parses proxy logs or generates synthetic streams into a common (timestamp, object-id, size) record file.
  2. Replay engine — a single-pass, byte-accounted simulator loop; on each request it consults the active policy, records hit or miss, and updates the byte ledger.
  3. Policy library — LRU and LFU on hash-maps with doubly-linked lists, ARC with its four lists (T1, B1, T2, B2) and adaptive parameter p, TinyLFU with a 4-bit Count-Min sketch, doorkeeper and periodical halving, plus Random and OPT (Belady, via offline next-use indices).
  4. Cost model & metrics — hit = 5 ms, miss = 5 ms + size-dependent backend fetch; computes hit ratio, byte hit ratio, mean latency and policy memory/CPU samples per 10,000 requests.
  5. Analysis layer (Python) — pandas for aggregation, SciPy for paired t-tests and Wilcoxon signed-rank, matplotlib for plots; a one-command script regenerates every table from the raw CSVs.
flowchart LR
  T["Trace sources: proxy log / synthetic generator"] --> P["Parser: (timestamp, object-id, size) CSV"]
  P --> R["Replay engine: byte-accounted cache"]
  C["Policy library: LRU, LFU, Random, ARC, TinyLFU, OPT"] --> R
  R -->|"hit / miss events"| M["Metrics: hit ratio, byte hit ratio, latency, overhead"]
  M -->|"raw CSVs"| A["Analysis: pandas + SciPy paired tests"]
  A --> F["Figures and result tables"]
  K["Config matrix: policy x cache size x trace x seed"] --> R

The replay engine and policies are pure Java with no I/O during replay except a buffered event sink, which keeps bookkeeping overhead comparable across policies; the analysis layer is deliberately separate so that statistics are computed from the same raw event stream for every policy.

Modules

6 modules

  1. Module 01

    Trace Parser & Anonymiser

    Reads raw proxy logs, maps client IPs through an HMAC-keyed one-way hash before any file is written, normalises URLs to object ids, drops requests without a cacheable object, and emits the standard CSV trace format. A summary report shows request counts, total bytes and dropped-line counts for audit.

  2. Module 02

    Synthetic Workload Generator

    Generates Zipf-distributed request streams with controllable skew parameter, library size and object-size distribution, plus two perturbations: a mid-trace popularity shift (semester change) and injected scan bursts (one request per object over a range). Seeded random number generators make every generated workload exactly reproducible.

  3. Module 03

    Policy Library

    Six classes behind one CachePolicy interface: LRU (hash-map + doubly-linked list), LFU (frequency buckets), Random, ARC (four lists T1/B1/T2/B2 with adaptive p), TinyLFU (Count-Min sketch with doorkeeper and halving) and OPT (future-distance via precomputed next-use indices). Each has property-based tests asserting its eviction invariants.

  4. Module 04

    Replay Engine & Cost Model

    Single-pass replay with a byte budget, warm-up discarding, and a declared latency cost model (5 ms hit; miss = 5 ms plus a size-proportional fetch). Streams per-request events (policy, request index, hit flag, latency, cache bytes) to CSV so the analysis layer can recompute any metric without re-running the simulator.

  5. Module 05

    Experiment Runner

    Reads the configuration matrix (policies × cache sizes × traces × seeds), runs replays in parallel worker threads, and records per-run memory and CPU samples. Emits one results CSV per run and a manifest recording the git commit and configuration hash for reproducibility.

  6. Module 06

    Statistical Analysis & Reporting

    Python pipeline: aggregates per-request CSVs into per-cache-size metric summaries, bootstraps 95% confidence intervals over trace chunks, runs paired t-tests and Wilcoxon signed-rank tests between policy pairs on common slices with Bonferroni correction, and renders the hit-ratio, byte-hit and latency figures used in the thesis.

Slides

12 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Title & Introduction

  2. Slide 2

    Problem & Motivation

  3. Slide 3

    Background: The Six Policies

  4. Slide 4

    Research Questions & Hypotheses

  5. Slide 5

    Experimental Design

  6. Slide 6

    System Architecture

  7. Slide 7

    Trace Characterisation

  8. Slide 8

    Results: Hit Ratio & Byte Hit Ratio

  9. Slide 9

    Results: Robustness & Overhead

  10. Slide 10

    Statistical Summary & Recommendation

  11. Slide 11

    Contribution & Individual Work

  12. Slide 12

    Limitations, Future Scope & Close

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 15 answered free · 12 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    What exactly does a cache-eviction policy decide, and why is it needed at all?

    When the cache's byte budget is full and a new object must be admitted, the eviction policy chooses which resident object to discard. It is needed because the working set of requests is larger than any affordable cache; the policy's job is to keep the objects most likely to be requested again, so that future requests become hits instead of backend fetches.

  2. 02Concept

    Why did you model the request stream with a Zipf distribution?

    Breslau et al. showed that web request popularity follows a Zipf-like distribution — the k-th most popular object is requested proportionally to 1/k^alpha — and my measured campus trace fits the same shape with an estimated skew near 1.0. Synthetic Zipf streams let me sweep the skew systematically, which a two-week real trace cannot cover on its own.

  3. 03Concept

    What is the difference between recency-based and frequency-based replacement?

    Recency-based LRU keeps the objects touched most recently and assumes temporal locality; frequency-based LFU keeps the objects requested most often and assumes stable popularity. LRU adapts fast to changes but is polluted by scans; LFU resists scans but adapts slowly when the popular set changes, which is exactly what happens at a semester boundary in e-learning traffic.

+12 more questions, with answers

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

Source code & how to run

5 steps · complete source code · unlocks with the project

Unlocks with the project · ₹2,000

5 steps · source code zip

Prerequisites, install, seed data and tests, written for demo day. Plus the complete source.

Unlock for ₹2,000

READMEFIRST

254 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

254 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

362 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

362 words · ~2 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

7 sources

  1. N. Megiddo and D. S. Modha, "ARC: A Self-Tuning, Low Overhead Replacement Cache", 2nd USENIX Conference on File and Storage Technologies (FAST '03), 2003
  2. G. Einziger, R. Friedman and B. Manes, "TinyLFU: A Highly Efficient Cache Admission Policy", ACM Transactions on Storage, 2017
  3. L. Breslau, P. Cao, L. Fan, G. Phillips and S. Shenker, "Web Caching and Zipf-Like Distributions: Evidence and Implications", IEEE INFOCOM 1999
  4. S. Podlipnig and L. Böszörmenyi, "A Survey of Web Cache Replacement Strategies", ACM Computing Surveys, vol. 35, no. 4, 2003
  5. Redis Documentation — Key Eviction (allkeys-lru, allkeys-lfu and related policies)
  6. IETF RFC 7234 — Hypertext Transfer Protocol (HTTP/1.1): Caching
  7. R. Jain, The Art of Computer Systems Performance Analysis, Wiley

Cite this bundle

OnlyProjects. (2026). Cache-Eviction Policy Comparison for a Campus E-Learning Proxy: LRU, LFU, ARC and TinyLFU under Traced Workloads: M.Tech / M.E. Computer Science & Engineering project bundle [Educational resource]. https://onlyprojects.online/projects/mtech-cse-cache-eviction-policies-campus-elearning-proxy

Future scope

1 min read

  • Add admission policies as a second factor (TinyLFU as admission over LRU/ARC, as in W-TinyLFU) for a two-factor design.
  • Couple the simulator to a live Redis or Varnish instance replaying the same trace to validate the cost model against a real deployment.
  • Extend traces with HTTP Range requests to model video seeking, the dominant real-world behaviour for recorded lectures.
  • Explore learned admission (predicting whether an object will be re-requested) as a third-generation policy and compare it honestly against TinyLFU.
  • Multi-campus study: repeat the characterisation on two or three college traces and test whether the recommended policy is stable across institutions.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.

M.Tech / M.E.

Aerospace / Aeronautical

NACA 0012 Airfoil CFD Validation Study Against XFOIL with Mesh Convergence

A mesh-converged OpenFOAM study of the NACA 0012 aerofoil validated against XFOIL and NASA's turbulence-modelling reference data

  • OpenFOAM v12 (finite-volume CFD, SA and k-ω SST models)
  • XFOIL 6.99 (panel method with integral boundary layer)
  • Gmsh and blockMesh for structured C-grid generation
  • +3

advanced24 wkSolo