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,328,336,0,1,22.17
2,212,47,165,0,3,50.07
3,673,337,336,0,1,50.63
4,711,360,351,0,1,32.75
5,345,113,232,0,2,49.46
6,649,321,328,0,1,18.98
7,137,26,111,0,5,49.63
8,681,338,343,0,1,50.22
9,689,346,343,0,1,49.33
10,667,329,338,0,1,37.8
11,328,124,204,0,2,52.31
12,692,362,330,0,1,48.46
13,683,331,352,0,1,49.86
14,696,347,349,0,1,31.98
15,344,110,234,0,2,29.14
16,326,95,231,0,2,48.48
17,689,334,355,0,1,49.93
18,691,345,346,0,1,22.83
19,219,50,169,0,3,51.09
20,732,374,358,0,1,52.77
21,739,390,349,0,1,51.1
22,683,349,334,0,1,49.55
23,670,332,338,0,1,32.02
24,331,106,225,0,2,50.97
25,724,369,355,0,1,50.58
26,692,350,342,0,1,51.49
27,705,363,342,0,1,15.33
28,137,21,116,0,5,49.55
29,672,333,339,0,1,48.56
30,694,337,357,0,1,50.3
31,674,339,335,0,1,17.36
32,144,25,119,0,4,51.19
33,670,343,327,0,1,12.77
34,141,18,123,0,4,50.99
35,659,336,323,0,1,50.36
36,691,348,343,0,1,53.05
37,737,391,346,0,1,24.66
38,219,54,165,0,3,9.0
39,100,9,91,0,8,49.72
40,714,355,359,0,1,22.28
41,184,41,143,0,4,18.63
42,161,30,131,0,4,37.57
43,362,136,226,0,2,49.57
44,696,345,351,0,1,47.05
45,627,295,332,0,1,48.77
46,648,316,332,0,1,5.66
47,53,3,50,0,10,48.22
48,676,326,350,0,1,48.12
49,638,307,331,0,1,49.93
50,673,336,337,0,1,18.75
51,128,24,104,0,5,9.41
52,85,8,77,0,9,51.54
53,747,385,362,0,1,49.86
54,700,349,351,0,1,51.24
55,687,352,335,0,1,53.75
56,720,387,333,0,1,50.43
57,690,348,342,0,1,2.5
58,40,1,39,0,17,32.08
59,318,102,216,0,2,47.92
60,674,323,351,0,1,17.39
61,23,4,19,0,26,50.97
62,724,369,355,0,1,49.2
63,628,309,319,0,1,36.52
64,345,126,219,0,2,50.66
65,681,345,336,0,1,6.85
66,73,5,68,0,10,50.23
67,651,327,324,0,1,0.0
68,10,0,10,0,69,49.06
69,636,312,324,0,1,48.17
70,656,316,340,0,1,34.95
71,372,130,242,0,2,51.33
72,678,348,330,0,1,49.69
73,638,317,321,0,1,50.95
74,685,349,336,0,1,20.9
75,201,42,159,0,3,35.76
76,344,123,221,0,2,36.23
77,345,125,220,0,2,27.2
78,261,71,190,0,3,8.51
79,47,4,43,0,15,50.3
80,660,332,328,0,1,49.53
81,634,314,320,0,1,13.87
82,137,19,118,0,5,30.74
83,309,95,214,0,2,50.44
84,686,346,340,0,1,49.41
85,682,337,345,0,1,32.61
86,322,105,217,0,2,50.0
87,676,338,338,0,1,31.69
88,325,103,222,0,2,49.93
89,689,344,345,0,1,49.06
90,695,341,354,0,1,36.73
91,324,119,205,0,2,33.53
92,337,113,224,0,2,26.13
93,222,58,164,0,3,49.85
94,686,342,344,0,1,35.61
95,351,125,226,0,2,52.44
96,717,376,341,0,1,49.25
97,664,327,337,0,1,0.0
98,23,0,23,0,37,21.55
99,181,39,142,0,4,35.31
1 access_count hits misses mu lambda hit_rate
2 1 664 328 336 0 1 22.17
3 2 212 47 165 0 3 50.07
4 3 673 337 336 0 1 50.63
5 4 711 360 351 0 1 32.75
6 5 345 113 232 0 2 49.46
7 6 649 321 328 0 1 18.98
8 7 137 26 111 0 5 49.63
9 8 681 338 343 0 1 50.22
10 9 689 346 343 0 1 49.33
11 10 667 329 338 0 1 37.8
12 11 328 124 204 0 2 52.31
13 12 692 362 330 0 1 48.46
14 13 683 331 352 0 1 49.86
15 14 696 347 349 0 1 31.98
16 15 344 110 234 0 2 29.14
17 16 326 95 231 0 2 48.48
18 17 689 334 355 0 1 49.93
19 18 691 345 346 0 1 22.83
20 19 219 50 169 0 3 51.09
21 20 732 374 358 0 1 52.77
22 21 739 390 349 0 1 51.1
23 22 683 349 334 0 1 49.55
24 23 670 332 338 0 1 32.02
25 24 331 106 225 0 2 50.97
26 25 724 369 355 0 1 50.58
27 26 692 350 342 0 1 51.49
28 27 705 363 342 0 1 15.33
29 28 137 21 116 0 5 49.55
30 29 672 333 339 0 1 48.56
31 30 694 337 357 0 1 50.3
32 31 674 339 335 0 1 17.36
33 32 144 25 119 0 4 51.19
34 33 670 343 327 0 1 12.77
35 34 141 18 123 0 4 50.99
36 35 659 336 323 0 1 50.36
37 36 691 348 343 0 1 53.05
38 37 737 391 346 0 1 24.66
39 38 219 54 165 0 3 9.0
40 39 100 9 91 0 8 49.72
41 40 714 355 359 0 1 22.28
42 41 184 41 143 0 4 18.63
43 42 161 30 131 0 4 37.57
44 43 362 136 226 0 2 49.57
45 44 696 345 351 0 1 47.05
46 45 627 295 332 0 1 48.77
47 46 648 316 332 0 1 5.66
48 47 53 3 50 0 10 48.22
49 48 676 326 350 0 1 48.12
50 49 638 307 331 0 1 49.93
51 50 673 336 337 0 1 18.75
52 51 128 24 104 0 5 9.41
53 52 85 8 77 0 9 51.54
54 53 747 385 362 0 1 49.86
55 54 700 349 351 0 1 51.24
56 55 687 352 335 0 1 53.75
57 56 720 387 333 0 1 50.43
58 57 690 348 342 0 1 2.5
59 58 40 1 39 0 17 32.08
60 59 318 102 216 0 2 47.92
61 60 674 323 351 0 1 17.39
62 61 23 4 19 0 26 50.97
63 62 724 369 355 0 1 49.2
64 63 628 309 319 0 1 36.52
65 64 345 126 219 0 2 50.66
66 65 681 345 336 0 1 6.85
67 66 73 5 68 0 10 50.23
68 67 651 327 324 0 1 0.0
69 68 10 0 10 0 69 49.06
70 69 636 312 324 0 1 48.17
71 70 656 316 340 0 1 34.95
72 71 372 130 242 0 2 51.33
73 72 678 348 330 0 1 49.69
74 73 638 317 321 0 1 50.95
75 74 685 349 336 0 1 20.9
76 75 201 42 159 0 3 35.76
77 76 344 123 221 0 2 36.23
78 77 345 125 220 0 2 27.2
79 78 261 71 190 0 3 8.51
80 79 47 4 43 0 15 50.3
81 80 660 332 328 0 1 49.53
82 81 634 314 320 0 1 13.87
83 82 137 19 118 0 5 30.74
84 83 309 95 214 0 2 50.44
85 84 686 346 340 0 1 49.41
86 85 682 337 345 0 1 32.61
87 86 322 105 217 0 2 50.0
88 87 676 338 338 0 1 31.69
89 88 325 103 222 0 2 49.93
90 89 689 344 345 0 1 49.06
91 90 695 341 354 0 1 36.73
92 91 324 119 205 0 2 33.53
93 92 337 113 224 0 2 26.13
94 93 222 58 164 0 3 49.85
95 94 686 342 344 0 1 35.61
96 95 351 125 226 0 2 52.44
97 96 717 376 341 0 1 49.25
98 97 664 327 337 0 1 0.0
99 98 23 0 23 0 37 21.55
100 99 181 39 142 0 4 35.31