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_5_0s_ttl/details.csv
Normal file
100
experiments/No_Refresh_5_0s_ttl/details.csv
Normal 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
|
||||
|
101
experiments/No_Refresh_5_0s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_5_0s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
||||
obj_id,hit_rate,avg_age
|
||||
1,0.8283132530120482,2.596363636363636
|
||||
2,0.5849056603773585,2.524193548387097
|
||||
3,0.8320950965824666,2.405357142857143
|
||||
4,0.8410689170182841,2.4013377926421406
|
||||
5,0.7217391304347827,2.4698795180722892
|
||||
6,0.8243451463790447,2.3906542056074764
|
||||
7,0.5036496350364964,2.739130434782609
|
||||
8,0.8340675477239354,2.433098591549296
|
||||
9,0.8374455732946299,2.5095320623916813
|
||||
10,0.8290854572713643,2.5750452079566
|
||||
11,0.7134146341463414,2.4188034188034186
|
||||
12,0.8367052023121387,2.5250431778929188
|
||||
13,0.8345534407027818,2.5526315789473686
|
||||
14,0.8347701149425287,2.495697074010327
|
||||
15,0.7063953488372093,2.522633744855967
|
||||
16,0.7177914110429447,2.7777777777777777
|
||||
17,0.8345428156748912,2.4991304347826087
|
||||
18,0.8364688856729378,2.48961937716263
|
||||
19,0.6255707762557078,2.562043795620438
|
||||
20,0.842896174863388,2.521880064829822
|
||||
21,0.8443843031123139,2.4759615384615383
|
||||
22,0.8330893118594437,2.4938488576449913
|
||||
23,0.8313432835820895,2.466786355475763
|
||||
24,0.7129909365558912,2.5466101694915255
|
||||
25,0.8383977900552486,2.3789126853377267
|
||||
26,0.8338150289017341,2.5753899480069324
|
||||
27,0.8368794326241135,2.422033898305085
|
||||
28,0.48175182481751827,2.5757575757575757
|
||||
29,0.8303571428571429,2.4408602150537635
|
||||
30,0.8342939481268011,2.597582037996546
|
||||
31,0.8323442136498517,2.443850267379679
|
||||
32,0.5138888888888888,2.554054054054054
|
||||
33,0.8313432835820895,2.443447037701975
|
||||
34,0.48936170212765956,2.6231884057971016
|
||||
35,0.8300455235204856,2.409506398537477
|
||||
36,0.8335745296671491,2.4444444444444446
|
||||
37,0.8466757123473542,2.3846153846153846
|
||||
38,0.6255707762557078,2.81021897810219
|
||||
39,0.41,2.5121951219512195
|
||||
40,0.8361344537815126,2.5008375209380236
|
||||
41,0.5597826086956522,2.5728155339805827
|
||||
42,0.5714285714285714,2.6847826086956523
|
||||
43,0.7375690607734806,2.397003745318352
|
||||
44,0.8390804597701149,2.4914383561643834
|
||||
45,0.8245614035087719,2.4545454545454546
|
||||
46,0.8271604938271605,2.5167910447761193
|
||||
47,0.3018867924528302,2.9375
|
||||
48,0.8313609467455622,2.597864768683274
|
||||
49,0.822884012539185,2.5238095238095237
|
||||
50,0.8306092124814265,2.4991055456171734
|
||||
51,0.4921875,2.3492063492063493
|
||||
52,0.3411764705882353,2.1724137931034484
|
||||
53,0.8433734939759037,2.5365079365079364
|
||||
54,0.8385714285714285,2.5792163543441227
|
||||
55,0.834061135371179,2.4223385689354275
|
||||
56,0.8375,2.527363184079602
|
||||
57,0.8333333333333334,2.3756521739130436
|
||||
58,0.175,3.0
|
||||
59,0.7012578616352201,2.506726457399103
|
||||
60,0.8293768545994066,2.4686940966010735
|
||||
61,0.21739130434782608,0.6
|
||||
62,0.8383977900552486,2.6227347611202636
|
||||
63,0.821656050955414,2.4108527131782944
|
||||
64,0.7159420289855073,2.42914979757085
|
||||
65,0.8311306901615272,2.57773851590106
|
||||
66,0.3150684931506849,2.782608695652174
|
||||
67,0.8310291858678955,2.478743068391867
|
||||
68,0.0,0.0
|
||||
69,0.8254716981132075,2.459047619047619
|
||||
70,0.8262195121951219,2.559040590405904
|
||||
71,0.7311827956989247,2.6544117647058822
|
||||
72,0.8348082595870207,2.487632508833922
|
||||
73,0.8213166144200627,2.427480916030534
|
||||
74,0.8291970802919708,2.482394366197183
|
||||
75,0.5771144278606966,2.7327586206896552
|
||||
76,0.7267441860465116,2.576
|
||||
77,0.7217391304347827,2.4859437751004014
|
||||
78,0.6475095785440613,2.5562130177514795
|
||||
79,0.19148936170212766,2.5555555555555554
|
||||
80,0.8348484848484848,2.6515426497277677
|
||||
81,0.8217665615141956,2.44721689059501
|
||||
82,0.5109489051094891,2.557142857142857
|
||||
83,0.6957928802588996,2.7209302325581395
|
||||
84,0.8352769679300291,2.4694589877835953
|
||||
85,0.8284457478005866,2.320353982300885
|
||||
86,0.7111801242236024,2.6026200873362444
|
||||
87,0.8328402366863905,2.644760213143872
|
||||
88,0.6861538461538461,2.4260089686098656
|
||||
89,0.8316400580551524,2.5095986038394416
|
||||
90,0.8330935251798561,2.542314335060449
|
||||
91,0.7314814814814815,2.261603375527426
|
||||
92,0.7210682492581603,2.316872427983539
|
||||
93,0.6351351351351351,2.5106382978723403
|
||||
94,0.8309037900874635,2.507017543859649
|
||||
95,0.717948717948718,2.373015873015873
|
||||
96,0.8465829846582985,2.4365733113673804
|
||||
97,0.8328313253012049,2.54249547920434
|
||||
98,0.21739130434782608,3.4
|
||||
99,0.569060773480663,2.320388349514563
|
||||
100,0.7062314540059347,2.3529411764705883
|
||||
|
BIN
experiments/No_Refresh_5_0s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_5_0s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_5_0s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_5_0s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_5_0s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_5_0s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
||||
,hit_rate,avg_age
|
||||
count,100.0,100.0
|
||||
mean,0.7175225869007572,2.4791552890507336
|
||||
std,0.1841955218651161,0.35131346514105605
|
||||
min,0.0,0.0
|
||||
25%,0.6933831217326363,2.4321113930546847
|
||||
50%,0.8266900030111413,2.503781989168563
|
||||
75%,0.8338765555190953,2.573372952474587
|
||||
max,0.8466757123473542,3.4
|
||||
|
Reference in New Issue
Block a user