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:
100
experiments/No_Refresh_1_0s_ttl/details.csv
Normal file
100
experiments/No_Refresh_1_0s_ttl/details.csv
Normal 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
|
||||
|
101
experiments/No_Refresh_1_0s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_1_0s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
||||
obj_id,hit_rate,avg_age
|
||||
1,0.4939759036144578,0.45426829268292684
|
||||
2,0.22169811320754718,0.5106382978723404
|
||||
3,0.5007429420505201,0.5133531157270029
|
||||
4,0.5063291139240507,0.5166666666666667
|
||||
5,0.32753623188405795,0.4247787610619469
|
||||
6,0.4946070878274268,0.5171339563862928
|
||||
7,0.1897810218978102,0.46153846153846156
|
||||
8,0.49632892804698975,0.4556213017751479
|
||||
9,0.502177068214804,0.476878612716763
|
||||
10,0.49325337331334335,0.44376899696048633
|
||||
11,0.3780487804878049,0.5483870967741935
|
||||
12,0.523121387283237,0.5
|
||||
13,0.48462664714494874,0.4743202416918429
|
||||
14,0.4985632183908046,0.49279538904899134
|
||||
15,0.31976744186046513,0.4727272727272727
|
||||
16,0.29141104294478526,0.4421052631578947
|
||||
17,0.4847605224963715,0.5988023952095808
|
||||
18,0.4992764109985528,0.4927536231884058
|
||||
19,0.228310502283105,0.52
|
||||
20,0.5109289617486339,0.5053475935828877
|
||||
21,0.5277401894451962,0.4897435897435897
|
||||
22,0.5109809663250366,0.49283667621776506
|
||||
23,0.4955223880597015,0.43373493975903615
|
||||
24,0.3202416918429003,0.3867924528301887
|
||||
25,0.5096685082872928,0.5013550135501355
|
||||
26,0.5057803468208093,0.5057142857142857
|
||||
27,0.5148936170212766,0.49586776859504134
|
||||
28,0.15328467153284672,0.42857142857142855
|
||||
29,0.4955357142857143,0.45645645645645644
|
||||
30,0.48559077809798273,0.5608308605341247
|
||||
31,0.5029673590504451,0.49557522123893805
|
||||
32,0.1736111111111111,0.6
|
||||
33,0.5119402985074627,0.44314868804664725
|
||||
34,0.1276595744680851,0.5
|
||||
35,0.5098634294385432,0.5297619047619048
|
||||
36,0.5036179450072359,0.5
|
||||
37,0.5305291723202171,0.4961636828644501
|
||||
38,0.2465753424657534,0.6296296296296297
|
||||
39,0.09,0.4444444444444444
|
||||
40,0.49719887955182074,0.5014084507042254
|
||||
41,0.22282608695652173,0.5853658536585366
|
||||
42,0.18633540372670807,0.6666666666666666
|
||||
43,0.3756906077348066,0.47794117647058826
|
||||
44,0.4956896551724138,0.4956521739130435
|
||||
45,0.4704944178628389,0.535593220338983
|
||||
46,0.4876543209876543,0.4810126582278481
|
||||
47,0.05660377358490566,0.3333333333333333
|
||||
48,0.4822485207100592,0.4263803680981595
|
||||
49,0.48119122257053293,0.50814332247557
|
||||
50,0.49925705794947994,0.4523809523809524
|
||||
51,0.1875,0.5
|
||||
52,0.09411764705882353,0.5
|
||||
53,0.5153949129852744,0.535064935064935
|
||||
54,0.49857142857142855,0.5358166189111748
|
||||
55,0.512372634643377,0.4943181818181818
|
||||
56,0.5375,0.4728682170542636
|
||||
57,0.5043478260869565,0.5431034482758621
|
||||
58,0.025,1.0
|
||||
59,0.32075471698113206,0.5196078431372549
|
||||
60,0.4792284866468843,0.47678018575851394
|
||||
61,0.17391304347826086,0.25
|
||||
62,0.5096685082872928,0.46883468834688347
|
||||
63,0.49203821656050956,0.47896440129449835
|
||||
64,0.3652173913043478,0.5476190476190477
|
||||
65,0.5066079295154186,0.5594202898550724
|
||||
66,0.0684931506849315,0.6
|
||||
67,0.5023041474654378,0.40978593272171254
|
||||
68,0.0,0.0
|
||||
69,0.49056603773584906,0.5416666666666666
|
||||
70,0.4817073170731707,0.5
|
||||
71,0.34946236559139787,0.5615384615384615
|
||||
72,0.5132743362831859,0.49137931034482757
|
||||
73,0.49686520376175547,0.5362776025236593
|
||||
74,0.5094890510948905,0.4813753581661891
|
||||
75,0.208955223880597,0.5238095238095238
|
||||
76,0.35755813953488375,0.5853658536585366
|
||||
77,0.36231884057971014,0.488
|
||||
78,0.2720306513409962,0.4647887323943662
|
||||
79,0.0851063829787234,0.5
|
||||
80,0.503030303030303,0.5180722891566265
|
||||
81,0.4952681388012618,0.49044585987261147
|
||||
82,0.1386861313868613,0.47368421052631576
|
||||
83,0.3074433656957929,0.5368421052631579
|
||||
84,0.5043731778425656,0.5028901734104047
|
||||
85,0.4941348973607038,0.5014836795252225
|
||||
86,0.32608695652173914,0.5428571428571428
|
||||
87,0.5,0.5029585798816568
|
||||
88,0.3169230769230769,0.4368932038834951
|
||||
89,0.49927431059506533,0.45058139534883723
|
||||
90,0.4906474820143885,0.49266862170087977
|
||||
91,0.36728395061728397,0.5630252100840336
|
||||
92,0.3353115727002967,0.415929203539823
|
||||
93,0.26126126126126126,0.4827586206896552
|
||||
94,0.49854227405247814,0.52046783625731
|
||||
95,0.3561253561253561,0.536
|
||||
96,0.5244072524407253,0.4627659574468085
|
||||
97,0.4924698795180723,0.5015290519877675
|
||||
98,0.0,0.0
|
||||
99,0.2154696132596685,0.5384615384615384
|
||||
100,0.35311572700296734,0.4957983193277311
|
||||
|
BIN
experiments/No_Refresh_1_0s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_1_0s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_1_0s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_1_0s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_1_0s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_1_0s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
||||
,hit_rate,avg_age
|
||||
count,100.0,100.0
|
||||
mean,0.3881665606779017,0.4920888885617573
|
||||
std,0.15249831056210744,0.10293321749563328
|
||||
min,0.0,0.0
|
||||
25%,0.30343528500804096,0.4717541266321754
|
||||
50%,0.4866225495428185,0.49808184143222506
|
||||
75%,0.5022088380274625,0.5252976190476191
|
||||
max,0.5375,1.0
|
||||
|
Reference in New Issue
Block a user