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

View File

@@ -0,0 +1,100 @@
,access_count,hits,misses,mu,lambda,hit_rate
1,664,224,440,0,1,10.38
2,212,22,190,0,3,32.39
3,673,218,455,0,1,34.6
4,711,246,465,0,1,19.13
5,345,66,279,0,2,31.74
6,649,206,443,0,1,10.22
7,137,14,123,0,5,32.45
8,681,221,460,0,1,34.4
9,689,237,452,0,1,34.18
10,667,228,439,0,1,21.95
11,328,72,256,0,2,34.97
12,692,242,450,0,1,32.21
13,683,220,463,0,1,33.62
14,696,234,462,0,1,20.35
15,344,70,274,0,2,18.4
16,326,60,266,0,2,29.9
17,689,206,483,0,1,32.85
18,691,227,464,0,1,11.87
19,219,26,193,0,3,34.84
20,732,255,477,0,1,35.05
21,739,259,480,0,1,34.55
22,683,236,447,0,1,35.22
23,670,236,434,0,1,19.94
24,331,66,265,0,2,34.67
25,724,251,473,0,1,32.08
26,692,222,470,0,1,34.18
27,705,241,464,0,1,8.76
28,137,12,125,0,5,34.23
29,672,230,442,0,1,31.7
30,694,220,474,0,1,33.09
31,674,223,451,0,1,9.03
32,144,13,131,0,4,34.63
33,670,232,438,0,1,7.09
34,141,10,131,0,4,32.78
35,659,216,443,0,1,32.27
36,691,223,468,0,1,36.91
37,737,272,465,0,1,14.16
38,219,31,188,0,3,5.0
39,100,5,95,0,8,32.77
40,714,234,480,0,1,12.5
41,184,23,161,0,4,7.45
42,161,12,149,0,4,21.55
43,362,78,284,0,2,32.61
44,696,227,469,0,1,29.98
45,627,188,439,0,1,32.56
46,648,211,437,0,1,1.89
47,53,1,52,0,10,31.51
48,676,213,463,0,1,31.35
49,638,200,438,0,1,32.69
50,673,220,453,0,1,12.5
51,128,16,112,0,5,3.53
52,85,3,82,0,9,33.33
53,747,249,498,0,1,33.0
54,700,231,469,0,1,35.08
55,687,241,446,0,1,37.5
56,720,270,450,0,1,31.3
57,690,216,474,0,1,0.0
58,40,0,40,0,17,19.18
59,318,61,257,0,2,31.31
60,674,211,463,0,1,13.04
61,23,3,20,0,26,35.22
62,724,255,469,0,1,32.32
63,628,203,425,0,1,24.93
64,345,86,259,0,2,35.1
65,681,239,442,0,1,4.11
66,73,3,70,0,10,33.79
67,651,220,431,0,1,0.0
68,10,0,10,0,69,33.02
69,636,210,426,0,1,32.77
70,656,215,441,0,1,22.58
71,372,84,288,0,2,33.48
72,678,227,451,0,1,33.7
73,638,215,423,0,1,33.28
74,685,228,457,0,1,10.45
75,201,21,180,0,3,20.35
76,344,70,274,0,2,21.16
77,345,73,272,0,2,17.24
78,261,45,216,0,3,4.26
79,47,2,45,0,15,33.79
80,660,223,437,0,1,30.28
81,634,192,442,0,1,5.84
82,137,8,129,0,5,18.45
83,309,57,252,0,2,34.11
84,686,234,452,0,1,32.99
85,682,225,457,0,1,19.25
86,322,62,260,0,2,32.99
87,676,223,453,0,1,20.92
88,325,68,257,0,2,35.27
89,689,243,446,0,1,32.95
90,695,229,466,0,1,21.91
91,324,71,253,0,2,20.47
92,337,69,268,0,2,13.96
93,222,31,191,0,3,31.78
94,686,218,468,0,1,19.94
95,351,70,281,0,2,33.89
96,717,243,474,0,1,32.53
97,664,216,448,0,1,0.0
98,23,0,23,0,37,11.6
99,181,21,160,0,4,22.85
1 access_count hits misses mu lambda hit_rate
2 1 664 224 440 0 1 10.38
3 2 212 22 190 0 3 32.39
4 3 673 218 455 0 1 34.6
5 4 711 246 465 0 1 19.13
6 5 345 66 279 0 2 31.74
7 6 649 206 443 0 1 10.22
8 7 137 14 123 0 5 32.45
9 8 681 221 460 0 1 34.4
10 9 689 237 452 0 1 34.18
11 10 667 228 439 0 1 21.95
12 11 328 72 256 0 2 34.97
13 12 692 242 450 0 1 32.21
14 13 683 220 463 0 1 33.62
15 14 696 234 462 0 1 20.35
16 15 344 70 274 0 2 18.4
17 16 326 60 266 0 2 29.9
18 17 689 206 483 0 1 32.85
19 18 691 227 464 0 1 11.87
20 19 219 26 193 0 3 34.84
21 20 732 255 477 0 1 35.05
22 21 739 259 480 0 1 34.55
23 22 683 236 447 0 1 35.22
24 23 670 236 434 0 1 19.94
25 24 331 66 265 0 2 34.67
26 25 724 251 473 0 1 32.08
27 26 692 222 470 0 1 34.18
28 27 705 241 464 0 1 8.76
29 28 137 12 125 0 5 34.23
30 29 672 230 442 0 1 31.7
31 30 694 220 474 0 1 33.09
32 31 674 223 451 0 1 9.03
33 32 144 13 131 0 4 34.63
34 33 670 232 438 0 1 7.09
35 34 141 10 131 0 4 32.78
36 35 659 216 443 0 1 32.27
37 36 691 223 468 0 1 36.91
38 37 737 272 465 0 1 14.16
39 38 219 31 188 0 3 5.0
40 39 100 5 95 0 8 32.77
41 40 714 234 480 0 1 12.5
42 41 184 23 161 0 4 7.45
43 42 161 12 149 0 4 21.55
44 43 362 78 284 0 2 32.61
45 44 696 227 469 0 1 29.98
46 45 627 188 439 0 1 32.56
47 46 648 211 437 0 1 1.89
48 47 53 1 52 0 10 31.51
49 48 676 213 463 0 1 31.35
50 49 638 200 438 0 1 32.69
51 50 673 220 453 0 1 12.5
52 51 128 16 112 0 5 3.53
53 52 85 3 82 0 9 33.33
54 53 747 249 498 0 1 33.0
55 54 700 231 469 0 1 35.08
56 55 687 241 446 0 1 37.5
57 56 720 270 450 0 1 31.3
58 57 690 216 474 0 1 0.0
59 58 40 0 40 0 17 19.18
60 59 318 61 257 0 2 31.31
61 60 674 211 463 0 1 13.04
62 61 23 3 20 0 26 35.22
63 62 724 255 469 0 1 32.32
64 63 628 203 425 0 1 24.93
65 64 345 86 259 0 2 35.1
66 65 681 239 442 0 1 4.11
67 66 73 3 70 0 10 33.79
68 67 651 220 431 0 1 0.0
69 68 10 0 10 0 69 33.02
70 69 636 210 426 0 1 32.77
71 70 656 215 441 0 1 22.58
72 71 372 84 288 0 2 33.48
73 72 678 227 451 0 1 33.7
74 73 638 215 423 0 1 33.28
75 74 685 228 457 0 1 10.45
76 75 201 21 180 0 3 20.35
77 76 344 70 274 0 2 21.16
78 77 345 73 272 0 2 17.24
79 78 261 45 216 0 3 4.26
80 79 47 2 45 0 15 33.79
81 80 660 223 437 0 1 30.28
82 81 634 192 442 0 1 5.84
83 82 137 8 129 0 5 18.45
84 83 309 57 252 0 2 34.11
85 84 686 234 452 0 1 32.99
86 85 682 225 457 0 1 19.25
87 86 322 62 260 0 2 32.99
88 87 676 223 453 0 1 20.92
89 88 325 68 257 0 2 35.27
90 89 689 243 446 0 1 32.95
91 90 695 229 466 0 1 21.91
92 91 324 71 253 0 2 20.47
93 92 337 69 268 0 2 13.96
94 93 222 31 191 0 3 31.78
95 94 686 218 468 0 1 19.94
96 95 351 70 281 0 2 33.89
97 96 717 243 474 0 1 32.53
98 97 664 216 448 0 1 0.0
99 98 23 0 23 0 37 11.6
100 99 181 21 160 0 4 22.85