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_2_0s_ttl/details.csv
Normal file
100
experiments/No_Refresh_2_0s_ttl/details.csv
Normal file
@@ -0,0 +1,100 @@
|
||||
,access_count,hits,misses,mu,lambda,hit_rate
|
||||
1,664,445,219,0,1,37.74
|
||||
2,212,80,132,0,3,66.42
|
||||
3,673,447,226,0,1,67.37
|
||||
4,711,479,232,0,1,51.01
|
||||
5,345,176,169,0,2,64.56
|
||||
6,649,419,230,0,1,29.2
|
||||
7,137,40,97,0,5,66.37
|
||||
8,681,452,229,0,1,66.76
|
||||
9,689,460,229,0,1,66.57
|
||||
10,667,444,223,0,1,52.13
|
||||
11,328,171,157,0,2,67.92
|
||||
12,692,470,222,0,1,66.03
|
||||
13,683,451,232,0,1,66.67
|
||||
14,696,464,232,0,1,48.55
|
||||
15,344,167,177,0,2,48.47
|
||||
16,326,158,168,0,2,66.33
|
||||
17,689,457,232,0,1,65.99
|
||||
18,691,456,235,0,1,41.1
|
||||
19,219,90,129,0,3,68.58
|
||||
20,732,502,230,0,1,68.88
|
||||
21,739,509,230,0,1,66.76
|
||||
22,683,456,227,0,1,66.57
|
||||
23,670,446,224,0,1,49.85
|
||||
24,331,165,166,0,2,68.09
|
||||
25,724,493,231,0,1,66.91
|
||||
26,692,463,229,0,1,68.09
|
||||
27,705,480,225,0,1,28.47
|
||||
28,137,39,98,0,5,65.92
|
||||
29,672,443,229,0,1,66.28
|
||||
30,694,460,234,0,1,66.62
|
||||
31,674,449,225,0,1,29.17
|
||||
32,144,42,102,0,4,66.72
|
||||
33,670,447,223,0,1,26.95
|
||||
34,141,38,103,0,4,66.77
|
||||
35,659,440,219,0,1,67.15
|
||||
36,691,464,227,0,1,69.06
|
||||
37,737,509,228,0,1,39.27
|
||||
38,219,86,133,0,3,21.0
|
||||
39,100,21,79,0,8,66.81
|
||||
40,714,477,237,0,1,32.07
|
||||
41,184,59,125,0,4,34.78
|
||||
42,161,56,105,0,4,53.87
|
||||
43,362,195,167,0,2,66.52
|
||||
44,696,463,233,0,1,64.59
|
||||
45,627,405,222,0,1,64.97
|
||||
46,648,421,227,0,1,9.43
|
||||
47,53,5,48,0,10,64.79
|
||||
48,676,438,238,0,1,65.52
|
||||
49,638,418,220,0,1,66.12
|
||||
50,673,445,228,0,1,29.69
|
||||
51,128,38,90,0,5,16.47
|
||||
52,85,14,71,0,9,68.14
|
||||
53,747,509,238,0,1,67.71
|
||||
54,700,474,226,0,1,66.67
|
||||
55,687,458,229,0,1,68.89
|
||||
56,720,496,224,0,1,67.25
|
||||
57,690,464,226,0,1,5.0
|
||||
58,40,2,38,0,17,48.11
|
||||
59,318,153,165,0,2,66.32
|
||||
60,674,447,227,0,1,17.39
|
||||
61,23,4,19,0,26,68.09
|
||||
62,724,493,231,0,1,64.49
|
||||
63,628,405,223,0,1,52.46
|
||||
64,345,181,164,0,2,67.11
|
||||
65,681,457,224,0,1,16.44
|
||||
66,73,12,61,0,10,66.36
|
||||
67,651,432,219,0,1,0.0
|
||||
68,10,0,10,0,69,65.41
|
||||
69,636,416,220,0,1,65.7
|
||||
70,656,431,225,0,1,50.81
|
||||
71,372,189,183,0,2,67.7
|
||||
72,678,459,219,0,1,66.14
|
||||
73,638,422,216,0,1,65.69
|
||||
74,685,450,235,0,1,32.84
|
||||
75,201,66,135,0,3,52.33
|
||||
76,344,180,164,0,2,51.88
|
||||
77,345,179,166,0,2,41.76
|
||||
78,261,109,152,0,3,10.64
|
||||
79,47,5,42,0,15,66.52
|
||||
80,660,439,221,0,1,65.3
|
||||
81,634,414,220,0,1,29.2
|
||||
82,137,40,97,0,5,46.93
|
||||
83,309,145,164,0,2,67.49
|
||||
84,686,463,223,0,1,66.72
|
||||
85,682,455,227,0,1,49.07
|
||||
86,322,158,164,0,2,64.94
|
||||
87,676,439,237,0,1,48.92
|
||||
88,325,159,166,0,2,66.62
|
||||
89,689,459,230,0,1,67.05
|
||||
90,695,466,229,0,1,51.23
|
||||
91,324,166,158,0,2,51.63
|
||||
92,337,174,163,0,2,39.64
|
||||
93,222,88,134,0,3,66.18
|
||||
94,686,454,232,0,1,50.71
|
||||
95,351,178,173,0,2,67.78
|
||||
96,717,486,231,0,1,66.72
|
||||
97,664,443,221,0,1,0.0
|
||||
98,23,0,23,0,37,38.12
|
||||
99,181,69,112,0,4,50.15
|
||||
|
101
experiments/No_Refresh_2_0s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_2_0s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
||||
obj_id,hit_rate,avg_age
|
||||
1,0.6701807228915663,1.0269662921348315
|
||||
2,0.37735849056603776,1.2375
|
||||
3,0.6641901931649331,0.9574944071588367
|
||||
4,0.6736990154711674,1.0041753653444676
|
||||
5,0.5101449275362319,0.9829545454545454
|
||||
6,0.6456086286594761,0.9260143198090692
|
||||
7,0.291970802919708,1.125
|
||||
8,0.6637298091042585,0.9867256637168141
|
||||
9,0.6676342525399129,0.9760869565217392
|
||||
10,0.6656671664167916,0.9954954954954955
|
||||
11,0.5213414634146342,0.9883040935672515
|
||||
12,0.6791907514450867,0.9702127659574468
|
||||
13,0.6603221083455344,1.0532150776053215
|
||||
14,0.6666666666666666,1.0668103448275863
|
||||
15,0.48546511627906974,1.0658682634730539
|
||||
16,0.48466257668711654,1.0253164556962024
|
||||
17,0.6632801161103048,1.0284463894967177
|
||||
18,0.6599131693198264,0.9912280701754386
|
||||
19,0.410958904109589,1.0
|
||||
20,0.6857923497267759,1.00199203187251
|
||||
21,0.6887686062246279,0.9194499017681729
|
||||
22,0.6676427525622255,0.9780701754385965
|
||||
23,0.6656716417910448,0.9618834080717489
|
||||
24,0.4984894259818731,0.9939393939393939
|
||||
25,0.680939226519337,1.028397565922921
|
||||
26,0.6690751445086706,1.0172786177105833
|
||||
27,0.6808510638297872,0.9458333333333333
|
||||
28,0.2846715328467153,1.1538461538461537
|
||||
29,0.6592261904761905,0.9616252821670429
|
||||
30,0.6628242074927954,1.0456521739130435
|
||||
31,0.6661721068249258,1.0311804008908685
|
||||
32,0.2916666666666667,0.9523809523809523
|
||||
33,0.6671641791044776,1.0067114093959733
|
||||
34,0.2695035460992908,1.105263157894737
|
||||
35,0.6676783004552352,1.0
|
||||
36,0.6714905933429812,1.0581896551724137
|
||||
37,0.6906377204884667,0.9823182711198428
|
||||
38,0.3926940639269406,1.1162790697674418
|
||||
39,0.21,1.1904761904761905
|
||||
40,0.6680672268907563,1.0377358490566038
|
||||
41,0.32065217391304346,0.8983050847457628
|
||||
42,0.34782608695652173,1.0892857142857142
|
||||
43,0.5386740331491713,0.958974358974359
|
||||
44,0.6652298850574713,0.9395248380129589
|
||||
45,0.645933014354067,1.0148148148148148
|
||||
46,0.6496913580246914,1.0332541567695963
|
||||
47,0.09433962264150944,0.6
|
||||
48,0.6479289940828402,0.8972602739726028
|
||||
49,0.6551724137931034,0.9497607655502392
|
||||
50,0.6612184249628529,0.9775280898876404
|
||||
51,0.296875,0.8947368421052632
|
||||
52,0.16470588235294117,0.7857142857142857
|
||||
53,0.6813922356091031,0.9960707269155207
|
||||
54,0.6771428571428572,1.0168776371308017
|
||||
55,0.6666666666666666,0.9541484716157205
|
||||
56,0.6888888888888889,1.002016129032258
|
||||
57,0.672463768115942,0.9612068965517241
|
||||
58,0.05,1.0
|
||||
59,0.4811320754716981,1.0065359477124183
|
||||
60,0.6632047477744807,0.9798657718120806
|
||||
61,0.17391304347826086,0.25
|
||||
62,0.680939226519337,1.026369168356998
|
||||
63,0.6449044585987261,0.945679012345679
|
||||
64,0.5246376811594203,1.0165745856353592
|
||||
65,0.671071953010279,1.0087527352297594
|
||||
66,0.1643835616438356,1.0833333333333333
|
||||
67,0.663594470046083,0.9652777777777778
|
||||
68,0.0,0.0
|
||||
69,0.6540880503144654,0.9447115384615384
|
||||
70,0.6570121951219512,1.0092807424593968
|
||||
71,0.5080645161290323,1.0052910052910053
|
||||
72,0.6769911504424779,0.9368191721132898
|
||||
73,0.6614420062695925,0.9881516587677726
|
||||
74,0.656934306569343,0.94
|
||||
75,0.3283582089552239,0.9393939393939394
|
||||
76,0.5232558139534884,1.0055555555555555
|
||||
77,0.518840579710145,0.994413407821229
|
||||
78,0.41762452107279696,0.9724770642201835
|
||||
79,0.10638297872340426,0.8
|
||||
80,0.6651515151515152,1.0227790432801822
|
||||
81,0.6529968454258676,0.9154589371980676
|
||||
82,0.291970802919708,1.1
|
||||
83,0.4692556634304207,1.0689655172413792
|
||||
84,0.6749271137026239,0.9848812095032398
|
||||
85,0.6671554252199413,0.9956043956043956
|
||||
86,0.4906832298136646,1.0949367088607596
|
||||
87,0.6494082840236687,1.0501138952164009
|
||||
88,0.48923076923076925,0.9748427672955975
|
||||
89,0.6661828737300436,0.9564270152505446
|
||||
90,0.6705035971223021,0.9463519313304721
|
||||
91,0.5123456790123457,1.0602409638554218
|
||||
92,0.516320474777448,1.0
|
||||
93,0.3963963963963964,0.9204545454545454
|
||||
94,0.6618075801749271,1.002202643171806
|
||||
95,0.5071225071225072,0.9157303370786517
|
||||
96,0.6778242677824268,0.9732510288065843
|
||||
97,0.6671686746987951,0.9977426636568849
|
||||
98,0.0,0.0
|
||||
99,0.3812154696132597,1.0289855072463767
|
||||
100,0.5014836795252225,0.9467455621301775
|
||||
|
BIN
experiments/No_Refresh_2_0s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_2_0s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_2_0s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_2_0s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_2_0s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_2_0s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
||||
,hit_rate,avg_age
|
||||
count,100.0,100.0
|
||||
mean,0.5381173912695726,0.966399936751214
|
||||
std,0.18361763609229173,0.17530494397945118
|
||||
min,0.0,0.0
|
||||
25%,0.47816297246137873,0.9537065918070284
|
||||
50%,0.6546302320537845,0.9949544516583623
|
||||
75%,0.667165303003057,1.0265184493014563
|
||||
max,0.6906377204884667,1.2375
|
||||
|
Reference in New Issue
Block a user