feat: add cache simulation with experiments for TTL and eviction strategies

Introduce a new simulation for Age of Information (AoI) cache management, focusing on varying TTL values and eviction strategies (LRU and Random Eviction). This includes:
- New Python script  for event-driven cache simulations using .
- Experiments for "No Refresh" across multiple TTL configurations (, , ..., ) with:
  - Hit rate and object age tracking (, , etc.).
  - Visualizations (e.g., , ).
- Updated  to describe experimental setup and configurations.
- Log export file () for simulation results.
- Refactor of  with detailed strategy configurations and runtime notes.

### Reason
The commit enhances the project by enabling detailed experiments with configurable cache parameters, supporting analysis of cache efficiency and AoI under varying conditions. This provides a foundation for more sophisticated simulations and insights.

### Performance
- Runtime: ~4m 29s for .

Co-authored experiments introduce structured data files and visualizations, improving clarity for future iterations.

Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
Tuan-Dat Tran
2024-11-27 16:31:46 +01:00
parent 912b97a06e
commit 6e8a742705
38 changed files with 2337 additions and 216 deletions

15
experiments/README.md Normal file
View File

@@ -0,0 +1,15 @@
# Experiments: No Refresh with variable TTL
Explanation for files in each experiment:
- `details.csv`: Access Count, Hit, Miss, Mu, Lambda and Hit Rate for each object
- `hit_age.csv`: Shows hit rate/average age at time of request for each object.
- `lambda_distribution.pdf`: Lambda Distribution across all objects/discrete
values of the Zipf distribution
- `objects_in_cache_over_time.pdf`: Amount of cache entries at given time.
- `overall_hit_age.csv`: Cumulative description of `hit_age.csv`
Length of simulation doesn't change much since we're not touching the request
rate across the simulations.
Break condition for the simulation is when the each database object has been
requested at least `ACCESS_COUNT_LIMIT` (i.e. 10) times.