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,550,114,0,1,58.49
2,212,124,88,0,3,83.21
3,673,560,113,0,1,84.11
4,711,598,113,0,1,72.17
5,345,249,96,0,2,82.43
6,649,535,114,0,1,50.36
7,137,69,68,0,5,83.41
8,681,568,113,0,1,83.74
9,689,577,112,0,1,82.91
10,667,553,114,0,1,71.34
11,328,234,94,0,2,83.67
12,692,579,113,0,1,83.46
13,683,570,113,0,1,83.48
14,696,581,115,0,1,70.64
15,344,243,101,0,2,71.78
16,326,234,92,0,2,83.45
17,689,575,114,0,1,83.65
18,691,578,113,0,1,62.56
19,219,137,82,0,3,84.29
20,732,617,115,0,1,84.44
21,739,624,115,0,1,83.31
22,683,569,114,0,1,83.13
23,670,557,113,0,1,71.3
24,331,236,95,0,2,83.84
25,724,607,117,0,1,83.38
26,692,577,115,0,1,83.69
27,705,590,115,0,1,48.18
28,137,66,71,0,5,83.04
29,672,558,114,0,1,83.43
30,694,579,115,0,1,83.23
31,674,561,113,0,1,51.39
32,144,74,70,0,4,83.13
33,670,557,113,0,1,48.94
34,141,69,72,0,4,83.0
35,659,547,112,0,1,83.36
36,691,576,115,0,1,84.67
37,737,624,113,0,1,62.56
38,219,137,82,0,3,41.0
39,100,41,59,0,8,83.61
40,714,597,117,0,1,55.98
41,184,103,81,0,4,57.14
42,161,92,69,0,4,73.76
43,362,267,95,0,2,83.91
44,696,584,112,0,1,82.46
45,627,517,110,0,1,82.72
46,648,536,112,0,1,30.19
47,53,16,37,0,10,83.14
48,676,562,114,0,1,82.29
49,638,525,113,0,1,83.06
50,673,559,114,0,1,49.22
51,128,63,65,0,5,34.12
52,85,29,56,0,9,84.34
53,747,630,117,0,1,83.86
54,700,587,113,0,1,83.41
55,687,573,114,0,1,83.75
56,720,603,117,0,1,83.33
57,690,575,115,0,1,17.5
58,40,7,33,0,17,70.13
59,318,223,95,0,2,82.94
60,674,559,115,0,1,21.74
61,23,5,18,0,26,83.84
62,724,607,117,0,1,82.17
63,628,516,112,0,1,71.59
64,345,247,98,0,2,83.11
65,681,566,115,0,1,31.51
66,73,23,50,0,10,83.1
67,651,541,110,0,1,0.0
68,10,0,10,0,69,82.55
69,636,525,111,0,1,82.62
70,656,542,114,0,1,73.12
71,372,272,100,0,2,83.48
72,678,566,112,0,1,82.13
73,638,524,114,0,1,82.92
74,685,568,117,0,1,57.71
75,201,116,85,0,3,72.67
76,344,250,94,0,2,72.17
77,345,249,96,0,2,64.75
78,261,169,92,0,3,19.15
79,47,9,38,0,15,83.48
80,660,551,109,0,1,82.18
81,634,521,113,0,1,51.09
82,137,70,67,0,5,69.58
83,309,215,94,0,2,83.53
84,686,573,113,0,1,82.84
85,682,565,117,0,1,71.12
86,322,229,93,0,2,83.28
87,676,563,113,0,1,68.62
88,325,223,102,0,2,83.16
89,689,573,116,0,1,83.31
90,695,579,116,0,1,73.15
91,324,237,87,0,2,72.11
92,337,243,94,0,2,63.51
93,222,141,81,0,3,83.09
94,686,570,116,0,1,71.79
95,351,252,99,0,2,84.66
96,717,607,110,0,1,83.28
97,664,553,111,0,1,21.74
98,23,5,18,0,37,56.91
99,181,103,78,0,4,70.62
1 access_count hits misses mu lambda hit_rate
2 1 664 550 114 0 1 58.49
3 2 212 124 88 0 3 83.21
4 3 673 560 113 0 1 84.11
5 4 711 598 113 0 1 72.17
6 5 345 249 96 0 2 82.43
7 6 649 535 114 0 1 50.36
8 7 137 69 68 0 5 83.41
9 8 681 568 113 0 1 83.74
10 9 689 577 112 0 1 82.91
11 10 667 553 114 0 1 71.34
12 11 328 234 94 0 2 83.67
13 12 692 579 113 0 1 83.46
14 13 683 570 113 0 1 83.48
15 14 696 581 115 0 1 70.64
16 15 344 243 101 0 2 71.78
17 16 326 234 92 0 2 83.45
18 17 689 575 114 0 1 83.65
19 18 691 578 113 0 1 62.56
20 19 219 137 82 0 3 84.29
21 20 732 617 115 0 1 84.44
22 21 739 624 115 0 1 83.31
23 22 683 569 114 0 1 83.13
24 23 670 557 113 0 1 71.3
25 24 331 236 95 0 2 83.84
26 25 724 607 117 0 1 83.38
27 26 692 577 115 0 1 83.69
28 27 705 590 115 0 1 48.18
29 28 137 66 71 0 5 83.04
30 29 672 558 114 0 1 83.43
31 30 694 579 115 0 1 83.23
32 31 674 561 113 0 1 51.39
33 32 144 74 70 0 4 83.13
34 33 670 557 113 0 1 48.94
35 34 141 69 72 0 4 83.0
36 35 659 547 112 0 1 83.36
37 36 691 576 115 0 1 84.67
38 37 737 624 113 0 1 62.56
39 38 219 137 82 0 3 41.0
40 39 100 41 59 0 8 83.61
41 40 714 597 117 0 1 55.98
42 41 184 103 81 0 4 57.14
43 42 161 92 69 0 4 73.76
44 43 362 267 95 0 2 83.91
45 44 696 584 112 0 1 82.46
46 45 627 517 110 0 1 82.72
47 46 648 536 112 0 1 30.19
48 47 53 16 37 0 10 83.14
49 48 676 562 114 0 1 82.29
50 49 638 525 113 0 1 83.06
51 50 673 559 114 0 1 49.22
52 51 128 63 65 0 5 34.12
53 52 85 29 56 0 9 84.34
54 53 747 630 117 0 1 83.86
55 54 700 587 113 0 1 83.41
56 55 687 573 114 0 1 83.75
57 56 720 603 117 0 1 83.33
58 57 690 575 115 0 1 17.5
59 58 40 7 33 0 17 70.13
60 59 318 223 95 0 2 82.94
61 60 674 559 115 0 1 21.74
62 61 23 5 18 0 26 83.84
63 62 724 607 117 0 1 82.17
64 63 628 516 112 0 1 71.59
65 64 345 247 98 0 2 83.11
66 65 681 566 115 0 1 31.51
67 66 73 23 50 0 10 83.1
68 67 651 541 110 0 1 0.0
69 68 10 0 10 0 69 82.55
70 69 636 525 111 0 1 82.62
71 70 656 542 114 0 1 73.12
72 71 372 272 100 0 2 83.48
73 72 678 566 112 0 1 82.13
74 73 638 524 114 0 1 82.92
75 74 685 568 117 0 1 57.71
76 75 201 116 85 0 3 72.67
77 76 344 250 94 0 2 72.17
78 77 345 249 96 0 2 64.75
79 78 261 169 92 0 3 19.15
80 79 47 9 38 0 15 83.48
81 80 660 551 109 0 1 82.18
82 81 634 521 113 0 1 51.09
83 82 137 70 67 0 5 69.58
84 83 309 215 94 0 2 83.53
85 84 686 573 113 0 1 82.84
86 85 682 565 117 0 1 71.12
87 86 322 229 93 0 2 83.28
88 87 676 563 113 0 1 68.62
89 88 325 223 102 0 2 83.16
90 89 689 573 116 0 1 83.31
91 90 695 579 116 0 1 73.15
92 91 324 237 87 0 2 72.11
93 92 337 243 94 0 2 63.51
94 93 222 141 81 0 3 83.09
95 94 686 570 116 0 1 71.79
96 95 351 252 99 0 2 84.66
97 96 717 607 110 0 1 83.28
98 97 664 553 111 0 1 21.74
99 98 23 5 18 0 37 56.91
100 99 181 103 78 0 4 70.62