Compare commits
14 Commits
912b97a06e
...
convergenc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9347ece041 | ||
|
|
6a4c2f26a8 | ||
|
|
5785827899 | ||
|
|
f9d48e6fe4 | ||
|
|
a484d49128 | ||
|
|
123129f3a9 | ||
|
|
43b84bf0bb | ||
|
|
09b943e41d | ||
|
|
dea6004160 | ||
|
|
b540aafc61 | ||
|
|
673302a6b2 | ||
|
|
62fc02b205 | ||
|
|
2040ea639f | ||
|
|
6e8a742705 |
441
aoi_cache_experiment_eval.ipynb
Normal file
441
aoi_cache_experiment_eval.ipynb
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
306
aoi_cache_simulation.py
Normal file
306
aoi_cache_simulation.py
Normal file
@@ -0,0 +1,306 @@
|
|||||||
|
import simpy
|
||||||
|
import random
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
import pandas as pd
|
||||||
|
from enum import Enum
|
||||||
|
|
||||||
|
|
||||||
|
# Types of cache
|
||||||
|
class CacheType(Enum):
|
||||||
|
LRU = 1
|
||||||
|
RANDOM_EVICTION = 2
|
||||||
|
|
||||||
|
|
||||||
|
# Constants
|
||||||
|
SEED = 42
|
||||||
|
DATABASE_OBJECTS = 100 # Number of objects in the database
|
||||||
|
ACCESS_COUNT_LIMIT = 10 # Total time to run the simulation
|
||||||
|
EXPORT_NAME = "./logs/export.csv"
|
||||||
|
|
||||||
|
ZIPF_CONSTANT = (
|
||||||
|
2 # Shape parameter for the Zipf distribution (controls skewness) Needs to be: 1<
|
||||||
|
)
|
||||||
|
|
||||||
|
# Set random seeds
|
||||||
|
random.seed(SEED)
|
||||||
|
np.random.seed(SEED)
|
||||||
|
|
||||||
|
# Initialize simulation environment
|
||||||
|
env = simpy.Environment()
|
||||||
|
|
||||||
|
|
||||||
|
CACHE_CAPACITY = DATABASE_OBJECTS # Maximum number of objects the cache can hold
|
||||||
|
|
||||||
|
# MAX_REFRESH_RATE is used as the maximum for a uniform
|
||||||
|
# distribution for mu.
|
||||||
|
# If MAX_REFRESH_RATE is 0, we do not do any refreshes.
|
||||||
|
MAX_REFRESH_RATE = 10
|
||||||
|
|
||||||
|
cache_type = CacheType.LRU
|
||||||
|
|
||||||
|
# CACHE_TTL is used to determin which TTL to set when an
|
||||||
|
# object is pulled into the cache
|
||||||
|
# If CACHE_TTL is set to 0, the TTL is infinite
|
||||||
|
CACHE_TTL = 5
|
||||||
|
|
||||||
|
|
||||||
|
configurations = {
|
||||||
|
"default": (DATABASE_OBJECTS, 10, CacheType.LRU, 5),
|
||||||
|
"No Refresh": (DATABASE_OBJECTS, 0, CacheType.LRU, 5),
|
||||||
|
"Infinite TTL": (int(DATABASE_OBJECTS / 2), 0, CacheType.LRU, 0),
|
||||||
|
"Random Eviction": (int(DATABASE_OBJECTS / 2), 10, CacheType.RANDOM_EVICTION, 5),
|
||||||
|
"RE without Refresh": (int(DATABASE_OBJECTS / 2), 0, CacheType.RANDOM_EVICTION, 5),
|
||||||
|
}
|
||||||
|
|
||||||
|
config = configurations["default"]
|
||||||
|
|
||||||
|
CACHE_CAPACITY = config[0]
|
||||||
|
MAX_REFRESH_RATE = config[1]
|
||||||
|
cache_type = config[2]
|
||||||
|
CACHE_TTL = config[3]
|
||||||
|
|
||||||
|
|
||||||
|
class Database:
|
||||||
|
def __init__(self):
|
||||||
|
# Each object now has a specific refresh rate 'mu'
|
||||||
|
self.data = {i: f"Object {i}" for i in range(1, DATABASE_OBJECTS + 1)}
|
||||||
|
self.lambda_values = {
|
||||||
|
i: np.random.zipf(ZIPF_CONSTANT) for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
} # Request rate 'lambda' for each object
|
||||||
|
# Refresh rate 'mu' for each object
|
||||||
|
if MAX_REFRESH_RATE == 0:
|
||||||
|
self.mu_values = {i: 0 for i in range(1, DATABASE_OBJECTS + 1)}
|
||||||
|
else:
|
||||||
|
self.mu_values = {
|
||||||
|
i: np.random.uniform(1, MAX_REFRESH_RATE)
|
||||||
|
for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
}
|
||||||
|
self.next_request = {
|
||||||
|
i: np.random.exponential(self.lambda_values[i])
|
||||||
|
for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
}
|
||||||
|
|
||||||
|
def get_object(self, obj_id):
|
||||||
|
# print(f"[{env.now:.2f}] Database: Fetched {self.data.get(obj_id, 'Unknown')} for ID {obj_id}")
|
||||||
|
return self.data.get(obj_id, None)
|
||||||
|
|
||||||
|
|
||||||
|
class Cache:
|
||||||
|
def __init__(self, env, db, cache_type):
|
||||||
|
self.cache_type = cache_type
|
||||||
|
self.env = env
|
||||||
|
self.db = db
|
||||||
|
self.storage = {} # Dictionary to store cached objects
|
||||||
|
self.ttl = {} # Dictionary to store TTLs
|
||||||
|
self.age = {} # Dictionary to store age of each object
|
||||||
|
self.cache_size_over_time = [] # To record cache state at each interval
|
||||||
|
self.cache_next_request_over_time = []
|
||||||
|
self.request_log = {i: [] for i in range(1, DATABASE_OBJECTS + 1)}
|
||||||
|
self.hits = {
|
||||||
|
i: 0 for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
} # Track hits per object
|
||||||
|
self.misses = {
|
||||||
|
i: 0 for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
} # Track misses per object
|
||||||
|
self.cumulative_age = {
|
||||||
|
i: 0 for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
} # Track cumulative age per object
|
||||||
|
self.access_count = {
|
||||||
|
i: 0 for i in range(1, DATABASE_OBJECTS + 1)
|
||||||
|
} # Track access count per object
|
||||||
|
self.next_refresh = {} # Track the next refresh time for each cached object
|
||||||
|
|
||||||
|
def get(self, obj_id):
|
||||||
|
if obj_id in self.storage and (self.ttl[obj_id] > env.now or CACHE_TTL == 0):
|
||||||
|
# Cache hit: increment hit count and update cumulative age
|
||||||
|
self.hits[obj_id] += 1
|
||||||
|
self.cumulative_age[obj_id] += self.age[obj_id]
|
||||||
|
self.access_count[obj_id] += 1
|
||||||
|
else:
|
||||||
|
# Cache miss: increment miss count
|
||||||
|
self.misses[obj_id] += 1
|
||||||
|
self.access_count[obj_id] += 1
|
||||||
|
|
||||||
|
# Fetch the object from the database if it’s not in cache
|
||||||
|
obj = self.db.get_object(obj_id)
|
||||||
|
|
||||||
|
# If the cache is full, evict the oldest object
|
||||||
|
if len(self.storage) >= CACHE_CAPACITY:
|
||||||
|
if self.cache_type == CacheType.LRU:
|
||||||
|
self.evict_oldest()
|
||||||
|
elif self.cache_type == CacheType.RANDOM_EVICTION:
|
||||||
|
self.evict_random()
|
||||||
|
|
||||||
|
# Add the object to cache, set TTL, reset age, and schedule next refresh
|
||||||
|
self.storage[obj_id] = obj
|
||||||
|
if CACHE_TTL != 0:
|
||||||
|
self.ttl[obj_id] = env.now + CACHE_TTL
|
||||||
|
else:
|
||||||
|
self.ttl[obj_id] = 0
|
||||||
|
self.age[obj_id] = 0
|
||||||
|
if MAX_REFRESH_RATE != 0:
|
||||||
|
self.next_refresh[obj_id] = env.now + np.random.exponential(
|
||||||
|
self.db.mu_values[obj_id]
|
||||||
|
) # Schedule refresh
|
||||||
|
|
||||||
|
def evict_oldest(self):
|
||||||
|
"""Remove the oldest item from the cache to make space."""
|
||||||
|
oldest_id = max(self.age, key=self.age.get) # Find the oldest item by age
|
||||||
|
print(
|
||||||
|
f"[{env.now:.2f}] Cache: Evicting oldest object {oldest_id} to make space at {self.ttl[oldest_id]:.2f}"
|
||||||
|
)
|
||||||
|
del self.storage[oldest_id]
|
||||||
|
del self.ttl[oldest_id]
|
||||||
|
del self.age[oldest_id]
|
||||||
|
|
||||||
|
def evict_random(self):
|
||||||
|
"""Remove a random item from the cache to make space."""
|
||||||
|
random_id = np.random.choice(
|
||||||
|
list(self.storage.keys())
|
||||||
|
) # Select a random key from the cache
|
||||||
|
print(
|
||||||
|
f"[{env.now:.2f}] Cache: Evicting random object {random_id} to make space at {self.ttl[random_id]:.2f}"
|
||||||
|
)
|
||||||
|
del self.storage[random_id]
|
||||||
|
del self.ttl[random_id]
|
||||||
|
del self.age[random_id]
|
||||||
|
|
||||||
|
def refresh_object(self, obj_id):
|
||||||
|
"""Refresh the object from the database to keep it up-to-date. TTL is increased on refresh."""
|
||||||
|
obj = self.db.get_object(obj_id)
|
||||||
|
self.storage[obj_id] = obj
|
||||||
|
if CACHE_TTL != 0:
|
||||||
|
self.ttl[obj_id] = env.now + CACHE_TTL
|
||||||
|
else:
|
||||||
|
self.ttl[obj_id] = 0
|
||||||
|
self.age[obj_id] = 0
|
||||||
|
# print(f"[{env.now:.2f}] Cache: Refreshed object {obj_id}")
|
||||||
|
|
||||||
|
def age_objects(self):
|
||||||
|
"""Increment age of each cached object."""
|
||||||
|
for obj_id in list(self.age.keys()):
|
||||||
|
if CACHE_TTL != 0:
|
||||||
|
if self.ttl[obj_id] > env.now:
|
||||||
|
self.age[obj_id] += 1
|
||||||
|
# print(f"[{env.now:.2f}] Cache: Object {obj_id} aged to {self.age[obj_id]}")
|
||||||
|
else:
|
||||||
|
# Remove object if its TTL expired
|
||||||
|
# print(f"[{env.now:.2f}] Cache: Object {obj_id} expired")
|
||||||
|
del self.storage[obj_id]
|
||||||
|
del self.ttl[obj_id]
|
||||||
|
del self.age[obj_id]
|
||||||
|
else:
|
||||||
|
self.age[obj_id] += 1
|
||||||
|
|
||||||
|
def record_cache_state(self):
|
||||||
|
"""Record the current cache state (number of objects in cache) over time."""
|
||||||
|
self.cache_size_over_time.append((env.now, len(self.storage)))
|
||||||
|
self.cache_next_request_over_time.append((env.now, self.db.next_request.copy()))
|
||||||
|
|
||||||
|
|
||||||
|
def age_cache_process(env, cache):
|
||||||
|
"""Process that ages cache objects over time, removes expired items, and refreshes based on object-specific intervals."""
|
||||||
|
while True:
|
||||||
|
cache.age_objects() # Age objects and remove expired ones
|
||||||
|
|
||||||
|
if MAX_REFRESH_RATE != 0:
|
||||||
|
# Refresh objects based on their individual refresh intervals
|
||||||
|
for obj_id in list(cache.storage.keys()):
|
||||||
|
# Check if it's time to refresh this object based on next_refresh
|
||||||
|
if env.now >= cache.next_refresh[obj_id]:
|
||||||
|
cache.refresh_object(obj_id)
|
||||||
|
# Schedule the next refresh based on the object's mu
|
||||||
|
cache.next_refresh[obj_id] = env.now + np.random.exponential(
|
||||||
|
cache.db.mu_values[obj_id]
|
||||||
|
)
|
||||||
|
|
||||||
|
cache.record_cache_state() # Record cache state at each time step
|
||||||
|
yield env.timeout(1) # Run every second
|
||||||
|
|
||||||
|
|
||||||
|
def client_request_process(env, cache, event):
|
||||||
|
"""Client process that makes requests for objects from the cache."""
|
||||||
|
lowest_lambda_object = max(cache.db.lambda_values.items(), key=lambda x: x[1])
|
||||||
|
lowest_lambda_object = (
|
||||||
|
[lowest_lambda_object]
|
||||||
|
if isinstance(lowest_lambda_object, int)
|
||||||
|
else lowest_lambda_object
|
||||||
|
)
|
||||||
|
while True:
|
||||||
|
obj_id, next_request = min(cache.db.next_request.items(), key=lambda x: x[1])
|
||||||
|
yield env.timeout(next_request - env.now)
|
||||||
|
if env.now >= next_request:
|
||||||
|
# print(f"[{env.now:.2f}] Client: Requesting object {obj_id}")
|
||||||
|
cache.get(obj_id)
|
||||||
|
|
||||||
|
# print(f"[{env.now:.2f}] Client: Schedule next request for {obj_id}")
|
||||||
|
next_request = env.now + np.random.exponential(
|
||||||
|
cache.db.lambda_values[obj_id]
|
||||||
|
)
|
||||||
|
cache.request_log[obj_id].append(next_request)
|
||||||
|
cache.db.next_request[obj_id] = next_request
|
||||||
|
if all(
|
||||||
|
cache.access_count[obj] >= ACCESS_COUNT_LIMIT
|
||||||
|
for obj in lowest_lambda_object
|
||||||
|
):
|
||||||
|
event.succeed()
|
||||||
|
|
||||||
|
|
||||||
|
# Instantiate components
|
||||||
|
db = Database()
|
||||||
|
cache = Cache(env, db, cache_type)
|
||||||
|
stop_event = env.event()
|
||||||
|
|
||||||
|
# Start processes
|
||||||
|
env.process(age_cache_process(env, cache))
|
||||||
|
env.process(client_request_process(env, cache, stop_event))
|
||||||
|
|
||||||
|
# Run the simulation
|
||||||
|
env.run(until=stop_event)
|
||||||
|
|
||||||
|
# Calculate and print hit rate and average age for each object
|
||||||
|
for obj_id in range(1, DATABASE_OBJECTS + 1):
|
||||||
|
if cache.access_count[obj_id] != 0:
|
||||||
|
hit_rate = cache.hits[obj_id] / max(
|
||||||
|
1, cache.access_count[obj_id]
|
||||||
|
) # Avoid division by zero
|
||||||
|
avg_age = cache.cumulative_age[obj_id] / max(
|
||||||
|
1, cache.hits[obj_id]
|
||||||
|
) # Only average over hits
|
||||||
|
print(
|
||||||
|
f"Object {obj_id}: Hit Rate = {hit_rate:.2f}, Average Age = {avg_age:.2f}"
|
||||||
|
)
|
||||||
|
|
||||||
|
# Extract recorded data for plotting
|
||||||
|
times, cache_sizes = zip(*cache.cache_size_over_time)
|
||||||
|
|
||||||
|
# Plot the cache size over time
|
||||||
|
plt.figure(figsize=(30, 5))
|
||||||
|
plt.plot(times, cache_sizes, label="Objects in Cache")
|
||||||
|
plt.xlabel("Time (s)")
|
||||||
|
plt.ylabel("Number of Cached Objects")
|
||||||
|
plt.title("Number of Objects in Cache Over Time")
|
||||||
|
plt.legend()
|
||||||
|
plt.grid(True)
|
||||||
|
plt.savefig("./graphs/objects_in_cache_over_time.pdf")
|
||||||
|
|
||||||
|
access_count = pd.DataFrame.from_dict(
|
||||||
|
cache.access_count, orient="index", columns=["access_count"]
|
||||||
|
)
|
||||||
|
hits = pd.DataFrame.from_dict(cache.hits, orient="index", columns=["hits"])
|
||||||
|
misses = pd.DataFrame.from_dict(cache.misses, orient="index", columns=["misses"])
|
||||||
|
mu = pd.DataFrame.from_dict(db.mu_values, orient="index", columns=["mu"])
|
||||||
|
lmbda = pd.DataFrame.from_dict(db.lambda_values, orient="index", columns=["lambda"])
|
||||||
|
hit_rate = pd.DataFrame(
|
||||||
|
np.round((hits.to_numpy() / access_count.to_numpy()) * 100, 2), columns=["hit_rate"]
|
||||||
|
)
|
||||||
|
|
||||||
|
merged = (
|
||||||
|
access_count.merge(hits, left_index=True, right_index=True)
|
||||||
|
.merge(misses, left_index=True, right_index=True)
|
||||||
|
.merge(mu, left_index=True, right_index=True)
|
||||||
|
.merge(lmbda, left_index=True, right_index=True)
|
||||||
|
.merge(hit_rate, left_index=True, right_index=True)
|
||||||
|
)
|
||||||
|
merged.to_csv(EXPORT_NAME)
|
||||||
101
experiments/No_Refresh_0_5s_ttl/details.csv
Normal file
101
experiments/No_Refresh_0_5s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,10164,3264,6900,0,1,32.11,0.08333333333333333
|
||||||
|
2,30898,18578,12320,0,3,60.13,0.14978315748592141
|
||||||
|
3,10319,3473,6846,0,1,33.66,0.08460122104855122
|
||||||
|
4,10227,3369,6858,0,1,32.94,0.08585117825364232
|
||||||
|
5,20692,10422,10270,0,2,50.37,0.12700560603131644
|
||||||
|
6,10238,3426,6812,0,1,33.46,0.08038679429576089
|
||||||
|
7,50801,36152,14649,0,5,71.16,0.17375642211767484
|
||||||
|
8,10299,3441,6858,0,1,33.41,0.08505680163122634
|
||||||
|
9,10045,3335,6710,0,1,33.2,0.08541562966650075
|
||||||
|
10,10202,3384,6818,0,1,33.17,0.08488531660458734
|
||||||
|
11,20511,10282,10229,0,2,50.13,0.12403100775193798
|
||||||
|
12,10254,3475,6779,0,1,33.89,0.08611273649307587
|
||||||
|
13,10221,3350,6871,0,1,32.78,0.07983563252127972
|
||||||
|
14,10269,3482,6787,0,1,33.91,0.07878079657220761
|
||||||
|
15,20454,10203,10251,0,2,49.88,0.12770118314266157
|
||||||
|
16,20508,10231,10277,0,2,49.89,0.1244392432221572
|
||||||
|
17,10279,3521,6758,0,1,34.25,0.08249829749975679
|
||||||
|
18,10194,3376,6818,0,1,33.12,0.08406906023150873
|
||||||
|
19,30646,18385,12261,0,3,59.99,0.14820857534425375
|
||||||
|
20,10194,3409,6785,0,1,33.44,0.0799489896017265
|
||||||
|
21,10342,3436,6906,0,1,33.22,0.0834461419454651
|
||||||
|
22,10296,3490,6806,0,1,33.9,0.08585858585858586
|
||||||
|
23,10327,3456,6871,0,1,33.47,0.07950033891740099
|
||||||
|
24,20516,10278,10238,0,2,50.1,0.12760772080327548
|
||||||
|
25,10143,3379,6764,0,1,33.31,0.08301291531105195
|
||||||
|
26,10291,3539,6752,0,1,34.39,0.08288796035370712
|
||||||
|
27,10308,3419,6889,0,1,33.17,0.08187815289095848
|
||||||
|
28,50863,36244,14619,0,5,71.26,0.17623812987830054
|
||||||
|
29,10398,3502,6896,0,1,33.68,0.08001538757453357
|
||||||
|
30,10260,3445,6815,0,1,33.58,0.08206627680311891
|
||||||
|
31,10202,3387,6815,0,1,33.2,0.08508135659674573
|
||||||
|
32,41023,27361,13662,0,4,66.7,0.16866148258294128
|
||||||
|
33,10322,3435,6887,0,1,33.28,0.08157333850029064
|
||||||
|
34,41011,27379,13632,0,4,66.76,0.16644314939894175
|
||||||
|
35,10326,3416,6910,0,1,33.08,0.08270385434824715
|
||||||
|
36,10118,3314,6804,0,1,32.75,0.08183435461553666
|
||||||
|
37,10319,3481,6838,0,1,33.73,0.08527958135478245
|
||||||
|
38,30664,18354,12310,0,3,59.86,0.14929559092094966
|
||||||
|
39,81431,65050,16381,0,8,79.88,0.199015117092999
|
||||||
|
40,10255,3385,6870,0,1,33.01,0.07791321306679669
|
||||||
|
41,40971,27337,13634,0,4,66.72,0.1654340875253228
|
||||||
|
42,40942,27312,13630,0,4,66.71,0.16748082653509844
|
||||||
|
43,20292,10170,10122,0,2,50.12,0.12487679873841909
|
||||||
|
44,10156,3350,6806,0,1,32.99,0.08733753446238676
|
||||||
|
45,10135,3350,6785,0,1,33.05,0.08080907745436605
|
||||||
|
46,10343,3451,6892,0,1,33.37,0.08382480904959876
|
||||||
|
47,102500,85382,17118,0,10,83.3,0.21223414634146343
|
||||||
|
48,10067,3307,6760,0,1,32.85,0.0819509287771928
|
||||||
|
49,10166,3358,6808,0,1,33.03,0.08193979933110368
|
||||||
|
50,10056,3326,6730,0,1,33.07,0.08164280031821798
|
||||||
|
51,51319,36667,14652,0,5,71.45,0.17588027825951402
|
||||||
|
52,91635,74849,16786,0,9,81.68,0.20417962568887435
|
||||||
|
53,10173,3368,6805,0,1,33.11,0.08424260296864249
|
||||||
|
54,10262,3467,6795,0,1,33.78,0.07883453517832781
|
||||||
|
55,10337,3449,6888,0,1,33.37,0.08397020412111832
|
||||||
|
56,10101,3353,6748,0,1,33.19,0.08335808335808335
|
||||||
|
57,10262,3421,6841,0,1,33.34,0.08536347690508672
|
||||||
|
58,174175,155832,18343,0,17,89.47,0.22248313477824028
|
||||||
|
59,20618,10352,10266,0,2,50.21,0.1257638956251819
|
||||||
|
60,10328,3494,6834,0,1,33.83,0.08278466305189776
|
||||||
|
61,266787,247758,19029,0,26,92.87,0.23090330488367125
|
||||||
|
62,10000,3279,6721,0,1,32.79,0.0788
|
||||||
|
63,10189,3377,6812,0,1,33.14,0.08420846010403377
|
||||||
|
64,20440,10172,10268,0,2,49.77,0.1232876712328767
|
||||||
|
65,10310,3473,6837,0,1,33.69,0.08273520853540252
|
||||||
|
66,102534,85466,17068,0,10,83.35,0.20803830924376304
|
||||||
|
67,10261,3435,6826,0,1,33.48,0.085079426956437
|
||||||
|
68,706876,686965,19911,0,69,97.18,0.24237065623956677
|
||||||
|
69,10119,3373,6746,0,1,33.33,0.08577922719636327
|
||||||
|
70,10273,3450,6823,0,1,33.58,0.08575878516499562
|
||||||
|
71,20634,10362,10272,0,2,50.22,0.12537559368033344
|
||||||
|
72,10278,3468,6810,0,1,33.74,0.08085230589608873
|
||||||
|
73,10291,3394,6897,0,1,32.98,0.0769604508794092
|
||||||
|
74,10479,3540,6939,0,1,33.78,0.08121003912587078
|
||||||
|
75,30802,18558,12244,0,3,60.25,0.15236023634828907
|
||||||
|
76,20439,10245,10194,0,2,50.12,0.1278927540486325
|
||||||
|
77,20717,10394,10323,0,2,50.17,0.11956364338465994
|
||||||
|
78,30719,18398,12321,0,3,59.89,0.14867020410820664
|
||||||
|
79,153586,135511,18075,0,15,88.23,0.2179495526936049
|
||||||
|
80,10300,3417,6883,0,1,33.17,0.08067961165048544
|
||||||
|
81,10419,3484,6935,0,1,33.44,0.08273346770323448
|
||||||
|
82,51383,36765,14618,0,5,71.55,0.17768522663137615
|
||||||
|
83,20354,10144,10210,0,2,49.84,0.12533163014640858
|
||||||
|
84,10292,3409,6883,0,1,33.12,0.08268558103381267
|
||||||
|
85,10338,3422,6916,0,1,33.1,0.08299477655252467
|
||||||
|
86,20508,10245,10263,0,2,49.96,0.12497561927052857
|
||||||
|
87,10342,3445,6897,0,1,33.31,0.08470315219493328
|
||||||
|
88,20517,10243,10274,0,2,49.92,0.1270653604328118
|
||||||
|
89,10273,3448,6825,0,1,33.56,0.08244913851844642
|
||||||
|
90,10215,3413,6802,0,1,33.41,0.07949094468918258
|
||||||
|
91,20496,10288,10208,0,2,50.2,0.12578064012490242
|
||||||
|
92,20630,10377,10253,0,2,50.3,0.12331555986427532
|
||||||
|
93,31006,18698,12308,0,3,60.3,0.15268012642714313
|
||||||
|
94,10107,3281,6826,0,1,32.46,0.08419906995151875
|
||||||
|
95,20393,10194,10199,0,2,49.99,0.12484676114352965
|
||||||
|
96,10070,3403,6667,0,1,33.79,0.08262164846077458
|
||||||
|
97,10166,3356,6810,0,1,33.01,0.08253000196734211
|
||||||
|
98,378889,359467,19422,0,37,94.87,0.23680022381225108
|
||||||
|
99,41032,27373,13659,0,4,66.71,0.16894131409631508
|
||||||
|
100,20321,10085,10236,0,2,49.63,0.12686383544116922
|
||||||
|
101
experiments/No_Refresh_0_5s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_0_5s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,hit_rate,avg_age
|
||||||
|
1,0.32113341204250295,0.25949754901960786
|
||||||
|
2,0.6012686905301314,0.24911185272903436
|
||||||
|
3,0.33656362050586297,0.2513676936366254
|
||||||
|
4,0.32942211792314463,0.26061145740575836
|
||||||
|
5,0.5036729170693988,0.25215889464594127
|
||||||
|
6,0.3346356710294979,0.24022183304144776
|
||||||
|
7,0.7116395346548297,0.244163531754813
|
||||||
|
8,0.33411010777745415,0.25457715780296425
|
||||||
|
9,0.3320059731209557,0.2572713643178411
|
||||||
|
10,0.33169966673201334,0.2559101654846336
|
||||||
|
11,0.5012919896640827,0.24742268041237114
|
||||||
|
12,0.3388921396528184,0.25410071942446044
|
||||||
|
13,0.32775657959103804,0.2435820895522388
|
||||||
|
14,0.3390787807965722,0.23233773693279725
|
||||||
|
15,0.4988266353769434,0.25600313633245125
|
||||||
|
16,0.49887848644431443,0.2494379826018962
|
||||||
|
17,0.34254304893472126,0.2408406702641295
|
||||||
|
18,0.3311752010986855,0.25385071090047395
|
||||||
|
19,0.5999151602166678,0.24704922491161274
|
||||||
|
20,0.33441239945065726,0.23907304194778528
|
||||||
|
21,0.33223747824405336,0.2511641443538999
|
||||||
|
22,0.338966588966589,0.2532951289398281
|
||||||
|
23,0.334656725089571,0.23755787037037038
|
||||||
|
24,0.5009748488984207,0.2547188168904456
|
||||||
|
25,0.3331361530119294,0.24918614974844627
|
||||||
|
26,0.34389272179574387,0.24102853913534897
|
||||||
|
27,0.3316841288319752,0.246855805791167
|
||||||
|
28,0.7125808544521558,0.24732369495640658
|
||||||
|
29,0.33679553760338526,0.23757852655625358
|
||||||
|
30,0.3357699805068226,0.2444121915820029
|
||||||
|
31,0.3319937267202509,0.25627398878063185
|
||||||
|
32,0.666967311020647,0.25287818427689046
|
||||||
|
33,0.3327843441193567,0.24512372634643376
|
||||||
|
34,0.6676013752407891,0.24931516855984515
|
||||||
|
35,0.3308154173929886,0.25
|
||||||
|
36,0.3275350859853726,0.24984912492456246
|
||||||
|
37,0.3373388894272701,0.25280091927607007
|
||||||
|
38,0.5985520480041743,0.2494279176201373
|
||||||
|
39,0.798835824194717,0.2491314373558801
|
||||||
|
40,0.33008288639687955,0.23604135893648448
|
||||||
|
41,0.6672280393449025,0.24794234919705893
|
||||||
|
42,0.6670900297982512,0.2510618043350908
|
||||||
|
43,0.5011827321111768,0.24916420845624385
|
||||||
|
44,0.329854273335959,0.26477611940298507
|
||||||
|
45,0.3305377405032067,0.24447761194029852
|
||||||
|
46,0.3336556124915402,0.2512315270935961
|
||||||
|
47,0.8329951219512195,0.2547843807828348
|
||||||
|
48,0.3284990563226383,0.24947081947384336
|
||||||
|
49,0.33031674208144796,0.24806432400238237
|
||||||
|
50,0.3307478122513922,0.24684305472038484
|
||||||
|
51,0.7144917087238645,0.2461613985327406
|
||||||
|
52,0.8168167185027555,0.24996993947814933
|
||||||
|
53,0.33107244667256464,0.25445368171021376
|
||||||
|
54,0.33784837263691286,0.2333429477934814
|
||||||
|
55,0.33365579955499663,0.2516671498985213
|
||||||
|
56,0.33194733194733195,0.25111840143155384
|
||||||
|
57,0.3333658156304814,0.2560654779304297
|
||||||
|
58,0.8946863786421703,0.2486716463884183
|
||||||
|
59,0.5020855563100204,0.25048299845440497
|
||||||
|
60,0.33830364058869095,0.24470520892959358
|
||||||
|
61,0.9286734361119545,0.24863778364371686
|
||||||
|
62,0.3279,0.24031716986886245
|
||||||
|
63,0.331435862204338,0.254071661237785
|
||||||
|
64,0.49765166340508804,0.2477388910735352
|
||||||
|
65,0.33685741998060137,0.24560898358767635
|
||||||
|
66,0.8335381434451011,0.24958463014532095
|
||||||
|
67,0.3347626936945717,0.2541484716157205
|
||||||
|
68,0.9718324005907684,0.24939552961213454
|
||||||
|
69,0.3333333333333333,0.2573376815890898
|
||||||
|
70,0.3358317920763166,0.2553623188405797
|
||||||
|
71,0.5021808665309683,0.24966222736923374
|
||||||
|
72,0.3374197314652656,0.23961937716262977
|
||||||
|
73,0.3298027402584783,0.23335297583971715
|
||||||
|
74,0.33781849413111936,0.2403954802259887
|
||||||
|
75,0.6024933445880137,0.25288285375579267
|
||||||
|
76,0.5012476148539556,0.2551488530990727
|
||||||
|
77,0.5017135685668774,0.23831056378680007
|
||||||
|
78,0.598912725023601,0.2482335036417002
|
||||||
|
79,0.8823134921151667,0.2470205370781708
|
||||||
|
80,0.33174757281553396,0.24319578577699735
|
||||||
|
81,0.33438909684230733,0.24741676234213547
|
||||||
|
82,0.7155090204931592,0.24833401332789337
|
||||||
|
83,0.49837869706200255,0.2514787066246057
|
||||||
|
84,0.3312281383598912,0.2496333235552948
|
||||||
|
85,0.3310118011220739,0.25073056691992984
|
||||||
|
86,0.49956114686951436,0.2501708150317228
|
||||||
|
87,0.3331077161090698,0.2542815674891147
|
||||||
|
88,0.4992445289272311,0.25451527872693547
|
||||||
|
89,0.3356371069794607,0.24564965197215777
|
||||||
|
90,0.3341164953499755,0.23791385877527102
|
||||||
|
91,0.501951600312256,0.25058320373250387
|
||||||
|
92,0.5030053320407174,0.24515755998843597
|
||||||
|
93,0.6030445720183191,0.2531821585196278
|
||||||
|
94,0.32462649648758285,0.2593721426394392
|
||||||
|
95,0.49987740891482374,0.2497547577006082
|
||||||
|
96,0.33793445878848066,0.24449015574493094
|
||||||
|
97,0.33012000786936846,0.25
|
||||||
|
98,0.9487396044751893,0.24959453858073202
|
||||||
|
99,0.6671134724117762,0.2532422460088408
|
||||||
|
100,0.4962846316618277,0.2556271690629648
|
||||||
|
BIN
experiments/No_Refresh_0_5s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_0_5s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_0_5s_ttl/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_0_5s_ttl/lambda_vs_access_count.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_0_5s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_0_5s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_0_5s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_0_5s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
,hit_rate,avg_age
|
||||||
|
count,100.0,100.0
|
||||||
|
mean,0.4604085321620298,0.24888160993165884
|
||||||
|
std,0.1786893776002831,0.006148512551458182
|
||||||
|
min,0.32113341204250295,0.23233773693279725
|
||||||
|
25%,0.3320029115207795,0.24563948487603743
|
||||||
|
50%,0.3378334333840161,0.24952772480958216
|
||||||
|
75%,0.5031722282978878,0.25319718039193106
|
||||||
|
max,0.9718324005907684,0.26477611940298507
|
||||||
|
101
experiments/No_Refresh_1_0s_ttl/details.csv
Normal file
101
experiments/No_Refresh_1_0s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,10321,5191,5130,0,1,50.3,0.2558860575525627
|
||||||
|
2,20430,13645,6785,0,2,66.79,0.3350954478707783
|
||||||
|
3,40652,32482,8170,0,4,79.9,0.39936534487848074
|
||||||
|
4,10296,5146,5150,0,1,49.98,0.24271561771561773
|
||||||
|
5,10144,5028,5116,0,1,49.57,0.2430993690851735
|
||||||
|
6,10255,5144,5111,0,1,50.16,0.24748902974158946
|
||||||
|
7,10292,5137,5155,0,1,49.91,0.24319860085503303
|
||||||
|
8,295834,285945,9889,0,29,96.66,0.4777848387947295
|
||||||
|
9,10192,5069,5123,0,1,49.74,0.25755494505494503
|
||||||
|
10,500429,490403,10026,0,49,98.0,0.4930909279837899
|
||||||
|
11,10248,5123,5125,0,1,49.99,0.24775565964090554
|
||||||
|
12,10245,5132,5113,0,1,50.09,0.24509516837481699
|
||||||
|
13,10072,4994,5078,0,1,49.58,0.24344718030182685
|
||||||
|
14,10200,5096,5104,0,1,49.96,0.2513725490196078
|
||||||
|
15,10329,5187,5142,0,1,50.22,0.2589795720786136
|
||||||
|
16,10166,5054,5112,0,1,49.71,0.2506393861892583
|
||||||
|
17,922930,912814,10116,0,90,98.9,0.49657828871095316
|
||||||
|
18,10196,5095,5101,0,1,49.97,0.24627304825421734
|
||||||
|
19,51302,42761,8541,0,5,83.35,0.4175080893532416
|
||||||
|
20,20581,13739,6842,0,2,66.76,0.33351149118118656
|
||||||
|
21,10434,5292,5142,0,1,50.72,0.25886524822695034
|
||||||
|
22,173975,164325,9650,0,17,94.45,0.47176318436556974
|
||||||
|
23,10439,5281,5158,0,1,50.59,0.24877861864163234
|
||||||
|
24,10358,5228,5130,0,1,50.47,0.2560339833944777
|
||||||
|
25,30679,23015,7664,0,3,75.02,0.37823918641415955
|
||||||
|
26,30612,22918,7694,0,3,74.87,0.37811969162419967
|
||||||
|
27,20361,13574,6787,0,2,66.67,0.3323019498060017
|
||||||
|
28,10273,5165,5108,0,1,50.28,0.25902852136668936
|
||||||
|
29,20350,13555,6795,0,2,66.61,0.328992628992629
|
||||||
|
30,20492,13637,6855,0,2,66.55,0.33627757173531136
|
||||||
|
31,20685,13825,6860,0,2,66.84,0.34072999758278943
|
||||||
|
32,10276,5197,5079,0,1,50.57,0.24815103152977813
|
||||||
|
33,10295,5207,5088,0,1,50.58,0.2541039339485187
|
||||||
|
34,418664,408677,9987,0,41,97.61,0.4910094968757763
|
||||||
|
35,20556,13741,6815,0,2,66.85,0.3401926444833625
|
||||||
|
36,61554,52775,8779,0,6,85.74,0.4230594274945576
|
||||||
|
37,10400,5252,5148,0,1,50.5,0.2570192307692308
|
||||||
|
38,234838,225035,9803,0,23,95.83,0.4802246655140991
|
||||||
|
39,10238,5105,5133,0,1,49.86,0.2558116819691346
|
||||||
|
40,102360,93061,9299,0,10,90.92,0.45374169597499026
|
||||||
|
41,10328,5215,5113,0,1,50.49,0.2555189775367932
|
||||||
|
42,51435,42894,8541,0,5,83.39,0.41372606202002526
|
||||||
|
43,10152,5077,5075,0,1,50.01,0.2518715524034673
|
||||||
|
44,20511,13692,6819,0,2,66.75,0.339720150163327
|
||||||
|
45,30442,22793,7649,0,3,74.87,0.3702450561723934
|
||||||
|
46,20289,13470,6819,0,2,66.39,0.32815811523485633
|
||||||
|
47,10192,5118,5074,0,1,50.22,0.2588304552590267
|
||||||
|
48,10400,5220,5180,0,1,50.19,0.2547115384615385
|
||||||
|
49,10080,5026,5054,0,1,49.86,0.2427579365079365
|
||||||
|
50,20564,13754,6810,0,2,66.88,0.3315989107177592
|
||||||
|
51,10176,5069,5107,0,1,49.81,0.24597091194968554
|
||||||
|
52,10049,4935,5114,0,1,49.11,0.24559657677380833
|
||||||
|
53,30768,23098,7670,0,3,75.07,0.37714508580343215
|
||||||
|
54,10058,4948,5110,0,1,49.19,0.24169815072579043
|
||||||
|
55,10202,5088,5114,0,1,49.87,0.2488727700450892
|
||||||
|
56,20279,13452,6827,0,2,66.33,0.3287637457468317
|
||||||
|
57,10324,5212,5112,0,1,50.48,0.24961255327392484
|
||||||
|
58,10168,5065,5103,0,1,49.81,0.24537765538945713
|
||||||
|
59,50847,42342,8505,0,5,83.27,0.41611107833303834
|
||||||
|
60,10149,5063,5086,0,1,49.89,0.2488915164055572
|
||||||
|
61,10000,4936,5064,0,1,49.36,0.2535
|
||||||
|
62,10298,5160,5138,0,1,50.11,0.25043697805399107
|
||||||
|
63,10203,5098,5105,0,1,49.97,0.2486523571498579
|
||||||
|
64,30986,23292,7694,0,3,75.17,0.37194216743045244
|
||||||
|
65,10324,5176,5148,0,1,50.14,0.2516466485858195
|
||||||
|
66,31014,23323,7691,0,3,75.2,0.3704778487134842
|
||||||
|
67,20419,13597,6822,0,2,66.59,0.32930114109407904
|
||||||
|
68,10202,5083,5119,0,1,49.82,0.250735149970594
|
||||||
|
69,10332,5187,5145,0,1,50.2,0.24961285327138985
|
||||||
|
70,20406,13576,6830,0,2,66.53,0.3301479956875429
|
||||||
|
71,50839,42332,8507,0,5,83.27,0.4158421684140129
|
||||||
|
72,122940,113497,9443,0,12,92.32,0.4595005693834391
|
||||||
|
73,10349,5208,5141,0,1,50.32,0.24939607691564403
|
||||||
|
74,40948,32759,8189,0,4,80.0,0.40487935918726187
|
||||||
|
75,10482,5304,5178,0,1,50.6,0.25472238122495705
|
||||||
|
76,20015,13250,6765,0,2,66.2,0.32880339745191106
|
||||||
|
77,10141,5051,5090,0,1,49.81,0.25184893008579035
|
||||||
|
78,20454,13645,6809,0,2,66.71,0.32893321599687103
|
||||||
|
79,20365,13537,6828,0,2,66.47,0.3289958261723545
|
||||||
|
80,20377,13603,6774,0,2,66.76,0.3276242822790401
|
||||||
|
81,10297,5165,5132,0,1,50.16,0.25308342235602604
|
||||||
|
82,747292,737198,10094,0,73,98.65,0.4909379466125691
|
||||||
|
83,20370,13582,6788,0,2,66.68,0.3318605792832597
|
||||||
|
84,10160,5073,5087,0,1,49.93,0.2518700787401575
|
||||||
|
85,1964390,1954214,10176,0,192,99.48,0.4986204368786239
|
||||||
|
86,123492,114064,9428,0,12,92.37,0.4611715738671331
|
||||||
|
87,10150,5008,5142,0,1,49.34,0.2504433497536946
|
||||||
|
88,10017,4974,5043,0,1,49.66,0.2448836977138864
|
||||||
|
89,30598,22933,7665,0,3,74.95,0.3759722857703118
|
||||||
|
90,20466,13667,6799,0,2,66.78,0.33699794781588976
|
||||||
|
91,92180,82970,9210,0,9,90.01,0.44574745064005206
|
||||||
|
92,10110,5015,5095,0,1,49.6,0.24787339268051434
|
||||||
|
93,10091,5047,5044,0,1,50.01,0.2511148548211277
|
||||||
|
94,10219,5094,5125,0,1,49.85,0.24728447010470692
|
||||||
|
95,10172,5093,5079,0,1,50.07,0.24695241840346047
|
||||||
|
96,41141,32935,8206,0,4,80.05,0.4031744488466493
|
||||||
|
97,10233,5096,5137,0,1,49.8,0.24694615459786964
|
||||||
|
98,10153,5038,5115,0,1,49.62,0.24485373781148428
|
||||||
|
99,61303,52526,8777,0,6,85.68,0.4244816730013213
|
||||||
|
100,10178,5065,5113,0,1,49.76,0.24759284731774414
|
||||||
|
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.5029551400058134,0.508765170487382
|
||||||
|
2,0.6678903573176701,0.5017222425796996
|
||||||
|
3,0.7990258781855751,0.49981528231020256
|
||||||
|
4,0.4998057498057498,0.4856198989506413
|
||||||
|
5,0.49566246056782337,0.4904534606205251
|
||||||
|
6,0.5016089712335446,0.49339035769828926
|
||||||
|
7,0.4991255343956471,0.48724936733502044
|
||||||
|
8,0.966572469695843,0.4943083460105964
|
||||||
|
9,0.497350863422292,0.5178536200434011
|
||||||
|
10,0.979965189867094,0.5031718810855562
|
||||||
|
11,0.4999024199843872,0.49560804216279525
|
||||||
|
12,0.5009272816007808,0.4892829306313328
|
||||||
|
13,0.4958300238284353,0.49098918702442934
|
||||||
|
14,0.4996078431372549,0.5031397174254317
|
||||||
|
15,0.5021783328492594,0.5157123578176209
|
||||||
|
16,0.49714735392484755,0.5041551246537396
|
||||||
|
17,0.9890392554148202,0.5020814755251344
|
||||||
|
18,0.49970576696743824,0.4928361138370952
|
||||||
|
19,0.833515262562863,0.5009003531255115
|
||||||
|
20,0.6675574559059326,0.49959967974379504
|
||||||
|
21,0.5071880391029328,0.5103930461073318
|
||||||
|
22,0.9445322603822388,0.4994675186368477
|
||||||
|
23,0.5058913689050676,0.49176292368869534
|
||||||
|
24,0.5047306429812705,0.5072685539403213
|
||||||
|
25,0.750187424622706,0.504192917662394
|
||||||
|
26,0.7486606559519143,0.5050615236931669
|
||||||
|
27,0.6666666666666666,0.4984529247090025
|
||||||
|
28,0.5027742626301956,0.5151984511132623
|
||||||
|
29,0.6660933660933661,0.49391368498708965
|
||||||
|
30,0.6654792113995706,0.5053164185671335
|
||||||
|
31,0.6683587140439933,0.5098010849909584
|
||||||
|
32,0.505741533670689,0.4906676928997499
|
||||||
|
33,0.5057795046138902,0.5024006145573267
|
||||||
|
34,0.9761455486977624,0.503008488366118
|
||||||
|
35,0.6684666277485892,0.5089149261334692
|
||||||
|
36,0.8573772622412841,0.49343439128375177
|
||||||
|
37,0.505,0.508948971820259
|
||||||
|
38,0.9582563298955025,0.5011442664474415
|
||||||
|
39,0.49863254541902713,0.513026444662096
|
||||||
|
40,0.9091539663931223,0.49908124778371177
|
||||||
|
41,0.5049380325329202,0.5060402684563758
|
||||||
|
42,0.8339457567804025,0.49610668158716836
|
||||||
|
43,0.5000985027580772,0.503643884183573
|
||||||
|
44,0.6675442445517039,0.5089103125912942
|
||||||
|
45,0.7487352999145916,0.4944939235730268
|
||||||
|
46,0.6639065503474789,0.4942835931700074
|
||||||
|
47,0.5021585557299842,0.5154357170769832
|
||||||
|
48,0.5019230769230769,0.5074712643678161
|
||||||
|
49,0.4986111111111111,0.4868682849184242
|
||||||
|
50,0.668838747325423,0.4957830449323833
|
||||||
|
51,0.49813286163522014,0.4937857565594792
|
||||||
|
52,0.4910936411583242,0.5001013171225938
|
||||||
|
53,0.750715028601144,0.502381158541865
|
||||||
|
54,0.4919467090872937,0.4913096200485044
|
||||||
|
55,0.4987257400509704,0.49901729559748426
|
||||||
|
56,0.6633463188520144,0.4956140350877193
|
||||||
|
57,0.5048430840759396,0.4944359171143515
|
||||||
|
58,0.4981313926042486,0.49259624876604147
|
||||||
|
59,0.8327334946014514,0.4996929762410845
|
||||||
|
60,0.4988668834367918,0.49891368753703336
|
||||||
|
61,0.4936,0.5135737439222042
|
||||||
|
62,0.5010681685764226,0.4998062015503876
|
||||||
|
63,0.49965696363814566,0.49764613573950567
|
||||||
|
64,0.7516943135609631,0.4948050832904001
|
||||||
|
65,0.501356063541263,0.5019319938176198
|
||||||
|
66,0.752015218933385,0.49264674355786137
|
||||||
|
67,0.6658994074146628,0.4945208501875414
|
||||||
|
68,0.4982356400705744,0.5032461144993114
|
||||||
|
69,0.5020325203252033,0.4972045498361288
|
||||||
|
70,0.6652945212192493,0.49624337065409546
|
||||||
|
71,0.8326678337496803,0.4994094302182746
|
||||||
|
72,0.9231901740686513,0.497731217565222
|
||||||
|
73,0.5032370277321481,0.4955837173579109
|
||||||
|
74,0.800014652730292,0.5060899294850271
|
||||||
|
75,0.5060103033772181,0.503393665158371
|
||||||
|
76,0.6620034973769673,0.4966792452830189
|
||||||
|
77,0.49807711271077804,0.50564244704019
|
||||||
|
78,0.6671066784003129,0.49307438622205935
|
||||||
|
79,0.6647188804321139,0.494939794636921
|
||||||
|
80,0.6675663738528733,0.490774093949864
|
||||||
|
81,0.5016024084684859,0.5045498547918683
|
||||||
|
82,0.9864925624789239,0.49766005876304603
|
||||||
|
83,0.6667648502700049,0.49771756736857603
|
||||||
|
84,0.49931102362204727,0.5044352454169131
|
||||||
|
85,0.9948197659324268,0.5012168575191868
|
||||||
|
86,0.9236549736015288,0.4992898723523636
|
||||||
|
87,0.4933990147783251,0.5075878594249201
|
||||||
|
88,0.4965558550464211,0.4931644551668677
|
||||||
|
89,0.7494934309431989,0.5016351981860201
|
||||||
|
90,0.6677904817746506,0.5046462281407771
|
||||||
|
91,0.9000867867216316,0.4952271905508015
|
||||||
|
92,0.4960435212660732,0.49970089730807576
|
||||||
|
93,0.5001486473094837,0.5020804438280166
|
||||||
|
94,0.4984832175359624,0.4960738123282293
|
||||||
|
95,0.5006881635863154,0.4932259964657373
|
||||||
|
96,0.8005396076906249,0.5036283588887202
|
||||||
|
97,0.49799667741620246,0.4958791208791209
|
||||||
|
98,0.4962080173347779,0.49344978165938863
|
||||||
|
99,0.856825930215487,0.4954117960629022
|
||||||
|
100,0.49764197288268813,0.49753208292201384
|
||||||
|
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/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_1_0s_ttl/lambda_vs_access_count.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.6330971683479719,0.49974051080586995
|
||||||
|
std,0.16365629584245692,0.006763722459258895
|
||||||
|
min,0.4910936411583242,0.4856198989506413
|
||||||
|
25%,0.49964468351292296,0.49451411853391275
|
||||||
|
50%,0.5058354367594788,0.4993496512853191
|
||||||
|
75%,0.7496669293630757,0.5037716943011146
|
||||||
|
max,0.9948197659324268,0.5178536200434011
|
||||||
|
101
experiments/No_Refresh_2_0s_ttl/details.csv
Normal file
101
experiments/No_Refresh_2_0s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,10104,6718,3386,0,1,66.49,0.660827395091053
|
||||||
|
2,10000,6591,3409,0,1,65.91,0.6574
|
||||||
|
3,20425,16321,4104,0,2,79.91,0.806217870257038
|
||||||
|
4,10313,6891,3422,0,1,66.82,0.6775913895083875
|
||||||
|
5,30759,26375,4384,0,3,85.75,0.8561071556292468
|
||||||
|
6,10401,6935,3466,0,1,66.68,0.6596481107585809
|
||||||
|
7,10443,6970,3473,0,1,66.74,0.6758594273676146
|
||||||
|
8,10329,6895,3434,0,1,66.75,0.6658921483202633
|
||||||
|
9,20668,16545,4123,0,2,80.05,0.7909812270176118
|
||||||
|
10,10313,6874,3439,0,1,66.65,0.6701250848443712
|
||||||
|
11,10251,6801,3450,0,1,66.34,0.6685201443761585
|
||||||
|
12,112754,107837,4917,0,11,95.64,0.9583872855951895
|
||||||
|
13,10198,6768,3430,0,1,66.37,0.6693469307707394
|
||||||
|
14,10418,6974,3444,0,1,66.94,0.6684584373200231
|
||||||
|
15,10205,6797,3408,0,1,66.6,0.6775110240078392
|
||||||
|
16,92491,87622,4869,0,9,94.74,0.9381669567849845
|
||||||
|
17,10340,6892,3448,0,1,66.65,0.6625725338491296
|
||||||
|
18,10342,6928,3414,0,1,66.99,0.6865209824018565
|
||||||
|
19,10374,6928,3446,0,1,66.78,0.6789088104877579
|
||||||
|
20,10326,6907,3419,0,1,66.89,0.6616308347859772
|
||||||
|
21,10273,6849,3424,0,1,66.67,0.66338946753626
|
||||||
|
22,10075,6690,3385,0,1,66.4,0.6625310173697271
|
||||||
|
23,10241,6836,3405,0,1,66.75,0.6706376330436481
|
||||||
|
24,10354,6909,3445,0,1,66.73,0.6609039984547035
|
||||||
|
25,10217,6775,3442,0,1,66.31,0.6645786434374082
|
||||||
|
26,134088,129133,4955,0,13,96.3,0.9625544418590776
|
||||||
|
27,20646,16526,4120,0,2,80.04,0.7985566211372663
|
||||||
|
28,20629,16518,4111,0,2,80.07,0.7993116486499589
|
||||||
|
29,10110,6690,3420,0,1,66.17,0.6439169139465876
|
||||||
|
30,20311,16220,4091,0,2,79.86,0.8037516616611688
|
||||||
|
31,10298,6872,3426,0,1,66.73,0.667216935327248
|
||||||
|
32,20693,16549,4144,0,2,79.97,0.7979026724012951
|
||||||
|
33,92953,88081,4872,0,9,94.76,0.943186341484406
|
||||||
|
34,154493,149517,4976,0,15,96.78,0.9748143928851145
|
||||||
|
35,10082,6671,3411,0,1,66.17,0.6580043642134498
|
||||||
|
36,10130,6718,3412,0,1,66.32,0.6568608094768016
|
||||||
|
37,10403,6948,3455,0,1,66.79,0.6757666057867923
|
||||||
|
38,10282,6835,3447,0,1,66.48,0.6668936004668352
|
||||||
|
39,31120,26696,4424,0,3,85.78,0.8627570694087403
|
||||||
|
40,113233,108317,4916,0,11,95.66,0.9557461164148261
|
||||||
|
41,669320,664216,5104,0,65,99.24,0.9823193689117313
|
||||||
|
42,10308,6844,3464,0,1,66.4,0.6667636786961583
|
||||||
|
43,20631,16510,4121,0,2,80.03,0.802384760796859
|
||||||
|
44,10290,6866,3424,0,1,66.72,0.6727891156462585
|
||||||
|
45,10290,6846,3444,0,1,66.53,0.6646258503401361
|
||||||
|
46,10118,6736,3382,0,1,66.57,0.6720695789681755
|
||||||
|
47,10130,6708,3422,0,1,66.22,0.6615004935834156
|
||||||
|
48,92556,87680,4876,0,9,94.73,0.9463676044772894
|
||||||
|
49,10237,6807,3430,0,1,66.49,0.66269414867637
|
||||||
|
50,10366,6917,3449,0,1,66.73,0.6664094153964886
|
||||||
|
51,10066,6678,3388,0,1,66.34,0.6649115835485794
|
||||||
|
52,10338,6900,3438,0,1,66.74,0.6627007158057652
|
||||||
|
53,31189,26781,4408,0,3,85.87,0.8622591298214114
|
||||||
|
54,10381,6952,3429,0,1,66.97,0.6724785666120797
|
||||||
|
55,10299,6871,3428,0,1,66.72,0.6700650548596951
|
||||||
|
56,10251,6822,3429,0,1,66.55,0.6652033947907521
|
||||||
|
57,10164,6752,3412,0,1,66.43,0.6712908303817394
|
||||||
|
58,10155,6734,3421,0,1,66.31,0.683505662235352
|
||||||
|
59,31048,26625,4423,0,3,85.75,0.8572532852357639
|
||||||
|
60,10415,6982,3433,0,1,67.04,0.6662506000960153
|
||||||
|
61,10223,6820,3403,0,1,66.71,0.6738726401252079
|
||||||
|
62,10360,6942,3418,0,1,67.01,0.6756756756756757
|
||||||
|
63,72258,67453,4805,0,7,93.35,0.9317169033186636
|
||||||
|
64,20608,16514,4094,0,2,80.13,0.806046195652174
|
||||||
|
65,92677,87807,4870,0,9,94.75,0.951541374882657
|
||||||
|
66,20544,16448,4096,0,2,80.06,0.806756230529595
|
||||||
|
67,20607,16467,4140,0,2,79.91,0.8011355364681905
|
||||||
|
68,41070,36496,4574,0,4,88.86,0.8941806671536401
|
||||||
|
69,10325,6922,3403,0,1,67.04,0.6650847457627118
|
||||||
|
70,41221,36648,4573,0,4,88.91,0.8889158438659907
|
||||||
|
71,10123,6701,3422,0,1,66.2,0.6680825842141658
|
||||||
|
72,10296,6869,3427,0,1,66.72,0.668997668997669
|
||||||
|
73,10084,6671,3413,0,1,66.15,0.653312177707259
|
||||||
|
74,10412,6968,3444,0,1,66.92,0.6566461774875144
|
||||||
|
75,10390,6975,3415,0,1,67.13,0.6796920115495669
|
||||||
|
76,20528,16406,4122,0,2,79.92,0.7993472330475448
|
||||||
|
77,10219,6770,3449,0,1,66.25,0.6641550053821313
|
||||||
|
78,10241,6864,3377,0,1,67.02,0.6729811541841617
|
||||||
|
79,10085,6658,3427,0,1,66.02,0.6535448686167575
|
||||||
|
80,10262,6839,3423,0,1,66.64,0.6625414149288638
|
||||||
|
81,184351,179346,5005,0,18,97.29,0.9742122364402689
|
||||||
|
82,10247,6824,3423,0,1,66.6,0.6655606518981165
|
||||||
|
83,10282,6845,3437,0,1,66.57,0.6648511962653181
|
||||||
|
84,10355,6904,3451,0,1,66.67,0.6693384838242395
|
||||||
|
85,20551,16412,4139,0,2,79.86,0.8041457836601625
|
||||||
|
86,10181,6802,3379,0,1,66.81,0.6746881445830468
|
||||||
|
87,51114,46447,4667,0,5,90.87,0.9127244981805376
|
||||||
|
88,10189,6779,3410,0,1,66.53,0.6714103444891549
|
||||||
|
89,10313,6884,3429,0,1,66.75,0.6650829050712693
|
||||||
|
90,30827,26416,4411,0,3,85.69,0.848152593505693
|
||||||
|
91,10282,6875,3407,0,1,66.86,0.682260260649679
|
||||||
|
92,10264,6830,3434,0,1,66.54,0.6677708495713173
|
||||||
|
93,10190,6788,3402,0,1,66.61,0.6714425907752699
|
||||||
|
94,20797,16660,4137,0,2,80.11,0.8132903784199644
|
||||||
|
95,10408,6985,3423,0,1,67.11,0.6622790161414297
|
||||||
|
96,30763,26365,4398,0,3,85.7,0.8571010629652505
|
||||||
|
97,10291,6857,3434,0,1,66.63,0.6533864541832669
|
||||||
|
98,10268,6832,3436,0,1,66.54,0.6722828204129334
|
||||||
|
99,10391,6944,3447,0,1,66.83,0.6803964969685304
|
||||||
|
100,10253,6836,3417,0,1,66.67,0.6542475373061543
|
||||||
|
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.6648851939825812,0.9938969931527241
|
||||||
|
2,0.6591,0.9974207252313761
|
||||||
|
3,0.7990697674418604,1.0089455302983885
|
||||||
|
4,0.6681857849316397,1.0140763314468146
|
||||||
|
5,0.8574726096427062,0.9984075829383886
|
||||||
|
6,0.6667628112681473,0.9893294881038212
|
||||||
|
7,0.6674327300584123,1.0126255380200861
|
||||||
|
8,0.6675379998063704,0.9975344452501813
|
||||||
|
9,0.8005128701374105,0.9880930794802055
|
||||||
|
10,0.6665373800058179,1.0053826011056153
|
||||||
|
11,0.6634474685396546,1.0076459344214086
|
||||||
|
12,0.9563917909785905,1.0020864823761788
|
||||||
|
13,0.6636595410864875,1.0085697399527187
|
||||||
|
14,0.6694183144557496,0.998566102667049
|
||||||
|
15,0.666046055854973,1.0172134765337648
|
||||||
|
16,0.9473570401444464,0.9902992399169158
|
||||||
|
17,0.6665377176015473,0.9940510737086478
|
||||||
|
18,0.6698897698704313,1.0248267898383372
|
||||||
|
19,0.6678234046655099,1.0165993071593533
|
||||||
|
20,0.6688940538446639,0.9891414507021862
|
||||||
|
21,0.6666991141828094,0.9950357716454957
|
||||||
|
22,0.6640198511166253,0.9977578475336323
|
||||||
|
23,0.6675129381896299,1.0046811000585139
|
||||||
|
24,0.667278346532741,0.990447242726878
|
||||||
|
25,0.6631105021043359,1.0022140221402214
|
||||||
|
26,0.9630466559274506,0.9994888990420729
|
||||||
|
27,0.8004456068972198,0.9976400822945661
|
||||||
|
28,0.8007174366183528,0.9982443395084151
|
||||||
|
29,0.6617210682492581,0.9730941704035875
|
||||||
|
30,0.7985820491359362,1.0064734895191123
|
||||||
|
31,0.6673140415614682,0.9998544819557625
|
||||||
|
32,0.7997390421881796,0.9977037887485649
|
||||||
|
33,0.9475864146396566,0.9953565468148636
|
||||||
|
34,0.9677914209705294,1.007256699907034
|
||||||
|
35,0.6616742709779806,0.9944536051566482
|
||||||
|
36,0.6631786771964462,0.9904733551652277
|
||||||
|
37,0.6678842641545708,1.0118019573978123
|
||||||
|
38,0.6647539389223887,1.003218727139722
|
||||||
|
39,0.857840616966581,1.0057311956847468
|
||||||
|
40,0.9565850944512642,0.9991229446901225
|
||||||
|
41,0.9923743500866551,0.9898677538632011
|
||||||
|
42,0.6639503298409003,1.0042372881355932
|
||||||
|
43,0.800252047889099,1.002665051483949
|
||||||
|
44,0.6672497570456755,1.008301776871541
|
||||||
|
45,0.6653061224489796,0.9989775051124744
|
||||||
|
46,0.6657442182249457,1.009501187648456
|
||||||
|
47,0.6621915103652517,0.9989564698867024
|
||||||
|
48,0.9473183802238645,0.9989963503649635
|
||||||
|
49,0.6649409006544886,0.9966211253121786
|
||||||
|
50,0.6672776384333398,0.9986988578863669
|
||||||
|
51,0.6634214186369958,1.0022461814914645
|
||||||
|
52,0.6674405107370864,0.9928985507246377
|
||||||
|
53,0.8586681201705729,1.0041820693775438
|
||||||
|
54,0.6696850014449475,1.0041714614499424
|
||||||
|
55,0.6671521506942422,1.0043661766846166
|
||||||
|
56,0.6654960491659351,0.9995602462620933
|
||||||
|
57,0.6643053915781189,1.0105154028436019
|
||||||
|
58,0.663121614967996,1.0307395307395308
|
||||||
|
59,0.8575431589796444,0.9996619718309859
|
||||||
|
60,0.670379260681709,0.993841306215984
|
||||||
|
61,0.66712315367309,1.0101173020527858
|
||||||
|
62,0.67007722007722,1.0083549409392105
|
||||||
|
63,0.9335021727697971,0.9980875572620936
|
||||||
|
64,0.8013392857142857,1.0058738040450528
|
||||||
|
65,0.9474519028453662,1.0043162845786782
|
||||||
|
66,0.8006230529595015,1.007660505836576
|
||||||
|
67,0.7990973940893871,1.002550555656768
|
||||||
|
68,0.8886291697102507,1.0062472599736958
|
||||||
|
69,0.670411622276029,0.9920543195608206
|
||||||
|
70,0.8890614007423401,0.9998362802881466
|
||||||
|
71,0.6619579176133558,1.0092523503954633
|
||||||
|
72,0.6671522921522921,1.002766050371233
|
||||||
|
73,0.661543038476795,0.9875580872432919
|
||||||
|
74,0.6692278140606992,0.9811997703788748
|
||||||
|
75,0.6713185755534168,1.0124731182795699
|
||||||
|
76,0.7992010911925176,1.0001828599292941
|
||||||
|
77,0.6624914375183482,1.0025110782865583
|
||||||
|
78,0.6702470461868958,1.004079254079254
|
||||||
|
79,0.6601883986117997,0.9899369179933915
|
||||||
|
80,0.6664392905866303,0.9941511916946922
|
||||||
|
81,0.9728507032779861,1.001399529401269
|
||||||
|
82,0.6659510100517224,0.9994138335287222
|
||||||
|
83,0.6657265123516826,0.9986851716581446
|
||||||
|
84,0.6667310478029937,1.0039107763615296
|
||||||
|
85,0.7985986083402268,1.0069461369729467
|
||||||
|
86,0.6681072586189962,1.0098500441046752
|
||||||
|
87,0.908694291192237,1.004435162658514
|
||||||
|
88,0.6653253508685838,1.0091458917244431
|
||||||
|
89,0.6675070299621837,0.9963683904706566
|
||||||
|
90,0.8569111493171571,0.9897789218655361
|
||||||
|
91,0.6686442326395643,1.0203636363636364
|
||||||
|
92,0.6654325798908808,1.0035139092240117
|
||||||
|
93,0.6661432777232581,1.007955215085445
|
||||||
|
94,0.8010770784247728,1.0152460984393759
|
||||||
|
95,0.6711183704842429,0.9868289191123837
|
||||||
|
96,0.8570360498000845,1.0000758581452684
|
||||||
|
97,0.6663103682829657,0.980603762578387
|
||||||
|
98,0.6653681340085703,1.0103922716627636
|
||||||
|
99,0.6682706188047348,1.0181451612903225
|
||||||
|
100,0.6667316882863552,0.981275599765945
|
||||||
|
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/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_2_0s_ttl/lambda_vs_access_count.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.733978802245101,1.0013731222328242
|
||||||
|
std,0.10479274510693432,0.009391010197280551
|
||||||
|
min,0.6591,0.9730941704035875
|
||||||
|
25%,0.6656688965552457,0.9965579416017981
|
||||||
|
50%,0.6676807022359401,1.001743005888724
|
||||||
|
75%,0.8004624227072674,1.0073540085356276
|
||||||
|
max,0.9923743500866551,1.0307395307395308
|
||||||
|
101
experiments/No_Refresh_3_0s_ttl/details.csv
Normal file
101
experiments/No_Refresh_3_0s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,30567,27493,3074,0,3,89.94,1.337128275591324
|
||||||
|
2,10330,7769,2561,0,1,75.21,1.1316553727008714
|
||||||
|
3,10302,7743,2559,0,1,75.16,1.135701805474665
|
||||||
|
4,10270,7712,2558,0,1,75.09,1.1236611489776047
|
||||||
|
5,10256,7680,2576,0,1,74.88,1.127242589703588
|
||||||
|
6,10247,7682,2565,0,1,74.97,1.1255001463843075
|
||||||
|
7,10171,7618,2553,0,1,74.9,1.138826074132337
|
||||||
|
8,10279,7742,2537,0,1,75.32,1.1329895904270844
|
||||||
|
9,470989,467598,3391,0,46,99.28,1.497631579506103
|
||||||
|
10,10323,7756,2567,0,1,75.13,1.1152765668894702
|
||||||
|
11,10371,7791,2580,0,1,75.12,1.1276636775624338
|
||||||
|
12,10239,7680,2559,0,1,75.01,1.1261841976755542
|
||||||
|
13,40736,37582,3154,0,4,92.26,1.3787313432835822
|
||||||
|
14,10201,7649,2552,0,1,74.98,1.1466522889912754
|
||||||
|
15,10274,7727,2547,0,1,75.21,1.1216663422230875
|
||||||
|
16,102392,99087,3305,0,10,96.77,1.4431010235174624
|
||||||
|
17,20553,17622,2931,0,2,85.74,1.2870140612076095
|
||||||
|
18,10255,7690,2565,0,1,74.99,1.1212091662603607
|
||||||
|
19,10243,7681,2562,0,1,74.99,1.1168602948354973
|
||||||
|
20,71505,68246,3259,0,7,95.44,1.4363051534857703
|
||||||
|
21,41259,38101,3158,0,4,92.35,1.3931505853268378
|
||||||
|
22,10160,7594,2566,0,1,74.74,1.1190944881889764
|
||||||
|
23,10292,7730,2562,0,1,75.11,1.112417411581811
|
||||||
|
24,61350,58112,3238,0,6,94.72,1.4142461287693562
|
||||||
|
25,41234,38078,3156,0,4,92.35,1.3850948246592618
|
||||||
|
26,81902,78622,3280,0,8,96.0,1.4366193743742521
|
||||||
|
27,10147,7590,2557,0,1,74.8,1.1366906474820144
|
||||||
|
28,71544,68280,3264,0,7,95.44,1.430308621268031
|
||||||
|
29,40964,37814,3150,0,4,92.31,1.3832145298310712
|
||||||
|
30,10371,7809,2562,0,1,75.3,1.142030662424067
|
||||||
|
31,40686,37537,3149,0,4,92.26,1.3885857543135232
|
||||||
|
32,10101,7533,2568,0,1,74.58,1.1287001287001286
|
||||||
|
33,10292,7747,2545,0,1,75.27,1.1353478429848427
|
||||||
|
34,20207,17288,2919,0,2,85.55,1.286138466867917
|
||||||
|
35,10143,7582,2561,0,1,74.75,1.1277728482697427
|
||||||
|
36,10253,7689,2564,0,1,74.99,1.125426704379206
|
||||||
|
37,10380,7806,2574,0,1,75.2,1.1270712909441234
|
||||||
|
38,10000,7445,2555,0,1,74.45,1.1287
|
||||||
|
39,10185,7630,2555,0,1,74.91,1.1270495827196858
|
||||||
|
40,10136,7583,2553,0,1,74.81,1.1037884767166535
|
||||||
|
41,10437,7875,2562,0,1,75.45,1.1317428379802625
|
||||||
|
42,40917,37766,3151,0,4,92.3,1.3858787301121782
|
||||||
|
43,10373,7809,2564,0,1,75.28,1.1315916321218549
|
||||||
|
44,30434,27370,3064,0,3,89.93,1.346126043241112
|
||||||
|
45,10262,7712,2550,0,1,75.15,1.120249464042097
|
||||||
|
46,10246,7693,2553,0,1,75.08,1.1247316025766152
|
||||||
|
47,10363,7794,2569,0,1,75.21,1.1348065232075655
|
||||||
|
48,40600,37449,3151,0,4,92.24,1.3829310344827586
|
||||||
|
49,10177,7622,2555,0,1,74.89,1.1257738036749534
|
||||||
|
50,50976,47779,3197,0,5,93.73,1.4054260828625236
|
||||||
|
51,30487,27407,3080,0,3,89.9,1.345917932233411
|
||||||
|
52,71920,68658,3262,0,7,95.46,1.4373748609566184
|
||||||
|
53,143192,139856,3336,0,14,97.67,1.4652424716464607
|
||||||
|
54,10271,7708,2563,0,1,75.05,1.1308538603836042
|
||||||
|
55,10314,7741,2573,0,1,75.05,1.1037424859414389
|
||||||
|
56,10431,7866,2565,0,1,75.41,1.1262582686223757
|
||||||
|
57,10304,7743,2561,0,1,75.15,1.1184976708074534
|
||||||
|
58,10334,7781,2553,0,1,75.3,1.1323785562221793
|
||||||
|
59,10375,7802,2573,0,1,75.2,1.1201927710843373
|
||||||
|
60,10288,7732,2556,0,1,75.16,1.1369556765163298
|
||||||
|
61,10256,7709,2547,0,1,75.17,1.1382605304212168
|
||||||
|
62,143793,140458,3335,0,14,97.68,1.455182102049474
|
||||||
|
63,40843,37698,3145,0,4,92.3,1.395710403251475
|
||||||
|
64,10290,7720,2570,0,1,75.02,1.1291545189504373
|
||||||
|
65,10065,7489,2576,0,1,74.41,1.127471435668157
|
||||||
|
66,10159,7598,2561,0,1,74.79,1.1202874298651442
|
||||||
|
67,30822,27744,3078,0,3,90.01,1.3478684056842516
|
||||||
|
68,10292,7736,2556,0,1,75.17,1.1420520792848814
|
||||||
|
69,10280,7738,2542,0,1,75.27,1.1160505836575876
|
||||||
|
70,30689,27627,3062,0,3,90.02,1.356837954967578
|
||||||
|
71,61315,58082,3233,0,6,94.73,1.4129658321780967
|
||||||
|
72,10413,7815,2598,0,1,75.05,1.1094785364448285
|
||||||
|
73,30522,27445,3077,0,3,89.92,1.344603892274425
|
||||||
|
74,10281,7717,2564,0,1,75.06,1.129073047368933
|
||||||
|
75,10192,7635,2557,0,1,74.91,1.1304945054945055
|
||||||
|
76,10231,7667,2564,0,1,74.94,1.1153357443065195
|
||||||
|
77,10225,7664,2561,0,1,74.95,1.1271393643031784
|
||||||
|
78,10323,7745,2578,0,1,75.03,1.1218637992831542
|
||||||
|
79,10161,7607,2554,0,1,74.86,1.1370928058261982
|
||||||
|
80,10378,7817,2561,0,1,75.32,1.1160146463673155
|
||||||
|
81,10335,7774,2561,0,1,75.22,1.126463473633285
|
||||||
|
82,10284,7734,2550,0,1,75.2,1.1260210035005835
|
||||||
|
83,10283,7711,2572,0,1,74.99,1.1354663036078965
|
||||||
|
84,30821,27753,3068,0,3,90.05,1.3493397358943577
|
||||||
|
85,10344,7784,2560,0,1,75.25,1.120262954369683
|
||||||
|
86,10255,7683,2572,0,1,74.92,1.1198439785470502
|
||||||
|
87,10224,7647,2577,0,1,74.79,1.107394366197183
|
||||||
|
88,2059016,2055606,3410,0,201,99.83,1.4875770756516704
|
||||||
|
89,20550,17618,2932,0,2,85.73,1.282043795620438
|
||||||
|
90,20552,17629,2923,0,2,85.78,1.2814811210587778
|
||||||
|
91,20548,17623,2925,0,2,85.77,1.2788592563753163
|
||||||
|
92,10190,7642,2548,0,1,75.0,1.1343473994111875
|
||||||
|
93,10103,7552,2551,0,1,74.75,1.1411461941997427
|
||||||
|
94,10415,7852,2563,0,1,75.39,1.1408545367258762
|
||||||
|
95,20601,17672,2929,0,2,85.78,1.2943546429784962
|
||||||
|
96,10120,7559,2561,0,1,74.69,1.1271739130434784
|
||||||
|
97,41195,38037,3158,0,4,92.33,1.3787352834081805
|
||||||
|
98,10184,7628,2556,0,1,74.9,1.1277494108405341
|
||||||
|
99,10508,7948,2560,0,1,75.64,1.122287780738485
|
||||||
|
100,10332,7777,2555,0,1,75.27,1.131145954316686
|
||||||
|
101
experiments/No_Refresh_3_0s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_3_0s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,hit_rate,avg_age
|
||||||
|
1,0.899434030163248,1.4866329611173754
|
||||||
|
2,0.752081316553727,1.5046981593512678
|
||||||
|
3,0.7516016307513105,1.5110422316931422
|
||||||
|
4,0.7509250243427459,1.4963692946058091
|
||||||
|
5,0.748829953198128,1.5053385416666667
|
||||||
|
6,0.7496828340001952,1.5013017443374121
|
||||||
|
7,0.7489922328187986,1.5204778156996588
|
||||||
|
8,0.7531861075980154,1.5042624644794627
|
||||||
|
9,0.9928002564815739,1.5084923374351473
|
||||||
|
10,0.7513319771384287,1.484399174832388
|
||||||
|
11,0.7512293896442002,1.5010910024387114
|
||||||
|
12,0.7500732493407559,1.5014322916666667
|
||||||
|
13,0.9225746268656716,1.4944388270980788
|
||||||
|
14,0.7498284481913537,1.529219505817754
|
||||||
|
15,0.7520926610862371,1.4913938138993141
|
||||||
|
16,0.9677220876630986,1.4912349753247147
|
||||||
|
17,0.8573930813019998,1.5010781977074112
|
||||||
|
18,0.749878108239883,1.49518855656697
|
||||||
|
19,0.7498779654398126,1.4893894024215597
|
||||||
|
20,0.9544227676386267,1.5048940597251121
|
||||||
|
21,0.9234591240698999,1.5086218209495814
|
||||||
|
22,0.7474409448818897,1.4972346589412695
|
||||||
|
23,0.7510687912942091,1.4811125485122898
|
||||||
|
24,0.9472208638956805,1.4930479074889869
|
||||||
|
25,0.9234612213222099,1.4998949524659908
|
||||||
|
26,0.9599521379209299,1.4965531276233115
|
||||||
|
27,0.7480043362570218,1.519631093544137
|
||||||
|
28,0.9543777255954378,1.4986818980667838
|
||||||
|
29,0.9231032125768968,1.4984397313164437
|
||||||
|
30,0.7529649985536593,1.5167114867460623
|
||||||
|
31,0.9226023693653836,1.505074992673895
|
||||||
|
32,0.7457677457677457,1.5134740475242268
|
||||||
|
33,0.7527205596579868,1.508325803536853
|
||||||
|
34,0.8555451081308457,1.5032970846830171
|
||||||
|
35,0.7475105984422754,1.5087048272223689
|
||||||
|
36,0.7499268506778504,1.5007153075822603
|
||||||
|
37,0.7520231213872832,1.4987189341532154
|
||||||
|
38,0.7445,1.516051040967092
|
||||||
|
39,0.7491408934707904,1.5044560943643512
|
||||||
|
40,0.7481254932912391,1.4754055123302123
|
||||||
|
41,0.7545271629778671,1.499936507936508
|
||||||
|
42,0.9229904440697021,1.5015092940740349
|
||||||
|
43,0.7528198206883254,1.5031374055576898
|
||||||
|
44,0.8993231254517974,1.4968213372305443
|
||||||
|
45,0.7515104268173846,1.4906639004149378
|
||||||
|
46,0.7508295920359165,1.49798518133368
|
||||||
|
47,0.752098813085014,1.5088529638183217
|
||||||
|
48,0.9223891625615763,1.499292370957836
|
||||||
|
49,0.7489436965706986,1.503148779847809
|
||||||
|
50,0.93728421217828,1.4994662927227442
|
||||||
|
51,0.8989733328959885,1.4971722552632538
|
||||||
|
52,0.9546440489432703,1.505665763640071
|
||||||
|
53,0.9767026090843064,1.5001930557144492
|
||||||
|
54,0.7504624671404927,1.5068759730150494
|
||||||
|
55,0.7505332557688579,1.4706110321663868
|
||||||
|
56,0.7540983606557377,1.4935163996948895
|
||||||
|
57,0.7514557453416149,1.488441172672091
|
||||||
|
58,0.7529514224888717,1.5039198046523583
|
||||||
|
59,0.752,1.489618046654704
|
||||||
|
60,0.7515552099533437,1.5128039317123643
|
||||||
|
61,0.7516575663026521,1.5143338954468804
|
||||||
|
62,0.9768069377507945,1.489733585840607
|
||||||
|
63,0.9229978209240262,1.5121491856331901
|
||||||
|
64,0.750242954324587,1.5050518134715025
|
||||||
|
65,0.7440635866865375,1.5152890906663106
|
||||||
|
66,0.7479082586868786,1.4978941826796526
|
||||||
|
67,0.9001362663032899,1.4974048442906573
|
||||||
|
68,0.7516517683637777,1.5193898655635987
|
||||||
|
69,0.7527237354085603,1.4826828637890928
|
||||||
|
70,0.9002248362605494,1.5072211966554458
|
||||||
|
71,0.94727228247574,1.4916153025033574
|
||||||
|
72,0.7505041774704696,1.4783109404990402
|
||||||
|
73,0.8991874713321538,1.4953543450537439
|
||||||
|
74,0.7506079175177512,1.504211481145523
|
||||||
|
75,0.7491169544740973,1.5091028159790438
|
||||||
|
76,0.7493891115238002,1.4883265944958914
|
||||||
|
77,0.7495354523227384,1.5037839248434237
|
||||||
|
78,0.7502663954276857,1.4952872821174952
|
||||||
|
79,0.7486467867335892,1.5188642040226108
|
||||||
|
80,0.753227982270187,1.4816425738774466
|
||||||
|
81,0.7522012578616353,1.4975559557499356
|
||||||
|
82,0.7520420070011669,1.4972847168347556
|
||||||
|
83,0.7498784401439269,1.51420049280249
|
||||||
|
84,0.9004574802894131,1.4985046661622168
|
||||||
|
85,0.7525135344160866,1.4886947584789312
|
||||||
|
86,0.7491955143832277,1.494728621632175
|
||||||
|
87,0.7479460093896714,1.480580619850922
|
||||||
|
88,0.9983438691102935,1.4900447848469016
|
||||||
|
89,0.857323600973236,1.495402429333636
|
||||||
|
90,0.8577753989879331,1.4939588178569403
|
||||||
|
91,0.8576503795989877,1.4911195596663451
|
||||||
|
92,0.7499509322865554,1.5125621565035332
|
||||||
|
93,0.7475007423537563,1.5266154661016949
|
||||||
|
94,0.7539126260201632,1.5132450331125828
|
||||||
|
95,0.8578224358040872,1.5088841104572204
|
||||||
|
96,0.7469367588932806,1.50906204524408
|
||||||
|
97,0.9233402111906784,1.4932039855929753
|
||||||
|
98,0.7490180675569521,1.5056371263765076
|
||||||
|
99,0.7563760944042635,1.4837695017614494
|
||||||
|
100,0.752710027100271,1.5027645621705028
|
||||||
|
BIN
experiments/No_Refresh_3_0s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_3_0s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_3_0s_ttl/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_3_0s_ttl/lambda_vs_access_count.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_3_0s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_3_0s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_3_0s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_3_0s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
,hit_rate,avg_age
|
||||||
|
count,100.0,100.0
|
||||||
|
mean,0.8084803040405154,1.5004162909676702
|
||||||
|
std,0.08449567004331755,0.01094342334307551
|
||||||
|
min,0.7440635866865375,1.4706110321663868
|
||||||
|
25%,0.749878357167916,1.4938482133164275
|
||||||
|
50%,0.752086988819982,1.5000647818254786
|
||||||
|
75%,0.89935085162966,1.5074973483757976
|
||||||
|
max,0.9983438691102935,1.529219505817754
|
||||||
|
101
experiments/No_Refresh_4_0s_ttl/details.csv
Normal file
101
experiments/No_Refresh_4_0s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,20435,18160,2275,0,2,88.87,1.7857597259603621
|
||||||
|
2,81256,78782,2474,0,8,96.96,1.950932854189229
|
||||||
|
3,10278,8246,2032,0,1,80.23,1.6109165207238763
|
||||||
|
4,20294,18024,2270,0,2,88.81,1.783433527150882
|
||||||
|
5,10110,8071,2039,0,1,79.83,1.5979228486646884
|
||||||
|
6,40580,38182,2398,0,4,94.09,1.8920896993592904
|
||||||
|
7,81588,79113,2475,0,8,96.97,1.9418174241309996
|
||||||
|
8,10025,7994,2031,0,1,79.74,1.5697755610972568
|
||||||
|
9,30536,28180,2356,0,3,92.28,1.8446096410793817
|
||||||
|
10,20308,18048,2260,0,2,88.87,1.7812684656293087
|
||||||
|
11,61345,58898,2447,0,6,96.01,1.9128209308012063
|
||||||
|
12,10244,8193,2051,0,1,79.98,1.6127489262007029
|
||||||
|
13,10287,8252,2035,0,1,80.22,1.5930786429474093
|
||||||
|
14,10228,8187,2041,0,1,80.04,1.596304262807978
|
||||||
|
15,10154,8111,2043,0,1,79.88,1.5791806184754777
|
||||||
|
16,10277,8222,2055,0,1,80.0,1.5889851123868832
|
||||||
|
17,10303,8249,2054,0,1,80.06,1.6019605940017472
|
||||||
|
18,20458,18185,2273,0,2,88.89,1.7886401407762245
|
||||||
|
19,51095,48666,2429,0,5,95.25,1.910695762794794
|
||||||
|
20,10226,8197,2029,0,1,80.16,1.5989634265597497
|
||||||
|
21,20571,18300,2271,0,2,88.96,1.7734188906713335
|
||||||
|
22,20516,18246,2270,0,2,88.94,1.7836810294404368
|
||||||
|
23,295812,293282,2530,0,29,99.14,1.9740612280772922
|
||||||
|
24,10305,8270,2035,0,1,80.25,1.606501698204755
|
||||||
|
25,20376,18103,2273,0,2,88.84,1.7651158225363173
|
||||||
|
26,20402,18132,2270,0,2,88.87,1.7657582589942162
|
||||||
|
27,10030,7995,2035,0,1,79.71,1.6048853439680957
|
||||||
|
28,10125,8071,2054,0,1,79.71,1.5887407407407408
|
||||||
|
29,112722,110227,2495,0,11,97.79,1.9490339064246553
|
||||||
|
30,10190,8155,2035,0,1,80.03,1.6080471050049068
|
||||||
|
31,20412,18140,2272,0,2,88.87,1.763668430335097
|
||||||
|
32,10216,8176,2040,0,1,80.03,1.600626468285043
|
||||||
|
33,10224,8187,2037,0,1,80.08,1.6048513302034428
|
||||||
|
34,10359,8303,2056,0,1,80.15,1.591080220098465
|
||||||
|
35,10388,8335,2053,0,1,80.24,1.6205236811705814
|
||||||
|
36,20367,18099,2268,0,2,88.86,1.77713949035204
|
||||||
|
37,20371,18107,2264,0,2,88.89,1.781257670217466
|
||||||
|
38,30393,28038,2355,0,3,92.25,1.867403678478597
|
||||||
|
39,20361,18092,2269,0,2,88.86,1.7774667256028682
|
||||||
|
40,10214,8164,2050,0,1,79.93,1.5947718817309575
|
||||||
|
41,20237,17970,2267,0,2,88.8,1.7825764688441963
|
||||||
|
42,40847,38438,2409,0,4,94.1,1.8866746639900116
|
||||||
|
43,30414,28066,2348,0,3,92.28,1.8445123956072862
|
||||||
|
44,10204,8157,2047,0,1,79.94,1.5944727557820462
|
||||||
|
45,10350,8296,2054,0,1,80.15,1.5795169082125604
|
||||||
|
46,20228,17968,2260,0,2,88.83,1.766363456594819
|
||||||
|
47,10295,8259,2036,0,1,80.22,1.602525497814473
|
||||||
|
48,10227,8183,2044,0,1,80.01,1.594113620807666
|
||||||
|
49,40854,38454,2400,0,4,94.13,1.8942576002349831
|
||||||
|
50,10355,8314,2041,0,1,80.29,1.614196040560116
|
||||||
|
51,10294,8242,2052,0,1,80.07,1.5964639595881096
|
||||||
|
52,10228,8181,2047,0,1,79.99,1.6165428236214314
|
||||||
|
53,81599,79123,2476,0,8,96.97,1.938798269586637
|
||||||
|
54,20433,18155,2278,0,2,88.85,1.788968824940048
|
||||||
|
55,10169,8122,2047,0,1,79.87,1.5943553938440358
|
||||||
|
56,10174,8131,2043,0,1,79.92,1.5905248673088264
|
||||||
|
57,10247,8208,2039,0,1,80.1,1.592563677173807
|
||||||
|
58,10367,8311,2056,0,1,80.17,1.6178257933828495
|
||||||
|
59,10238,8193,2045,0,1,80.03,1.6112521976948624
|
||||||
|
60,10266,8232,2034,0,1,80.19,1.6083187219949346
|
||||||
|
61,10131,8079,2052,0,1,79.75,1.5869114598756293
|
||||||
|
62,10230,8186,2044,0,1,80.02,1.6131964809384165
|
||||||
|
63,10180,8159,2021,0,1,80.15,1.619056974459725
|
||||||
|
64,20508,18244,2264,0,2,88.96,1.7919836161497953
|
||||||
|
65,10284,8234,2050,0,1,80.07,1.6067677946324388
|
||||||
|
66,30601,28244,2357,0,3,92.3,1.8235024999183034
|
||||||
|
67,10167,8126,2041,0,1,79.93,1.6418805940788828
|
||||||
|
68,10063,8010,2053,0,1,79.6,1.5928649508098975
|
||||||
|
69,20183,17916,2267,0,2,88.77,1.7774364564237228
|
||||||
|
70,20651,18382,2269,0,2,89.01,1.7801075008474165
|
||||||
|
71,10281,8240,2041,0,1,80.15,1.5826281490127418
|
||||||
|
72,10214,8178,2036,0,1,80.07,1.5974153123164285
|
||||||
|
73,51166,48737,2429,0,5,95.25,1.9054645663135676
|
||||||
|
74,10238,8185,2053,0,1,79.95,1.6050986520804844
|
||||||
|
75,10027,7986,2041,0,1,79.64,1.5802333699012665
|
||||||
|
76,10050,8036,2014,0,1,79.96,1.6217910447761195
|
||||||
|
77,10184,8145,2039,0,1,79.98,1.6089945011783189
|
||||||
|
78,10220,8193,2027,0,1,80.17,1.6072407045009784
|
||||||
|
79,10160,8137,2023,0,1,80.09,1.6166338582677164
|
||||||
|
80,122432,119933,2499,0,12,97.96,1.9536395713538943
|
||||||
|
81,40903,38502,2401,0,4,94.13,1.870425152189326
|
||||||
|
82,81311,78838,2473,0,8,96.96,1.9353961948567844
|
||||||
|
83,10199,8154,2045,0,1,79.95,1.6078046867339935
|
||||||
|
84,10202,8154,2048,0,1,79.93,1.6100764555969418
|
||||||
|
85,20238,17974,2264,0,2,88.81,1.7719142207728036
|
||||||
|
86,10137,8087,2050,0,1,79.78,1.609450527769557
|
||||||
|
87,10143,8102,2041,0,1,79.88,1.5938085379079168
|
||||||
|
88,10110,8073,2037,0,1,79.85,1.5952522255192878
|
||||||
|
89,10221,8176,2045,0,1,79.99,1.609822913609236
|
||||||
|
90,40845,38443,2402,0,4,94.12,1.9007467254253887
|
||||||
|
91,10242,8201,2041,0,1,80.07,1.5639523530560437
|
||||||
|
92,20294,18022,2272,0,2,88.8,1.7786537892973293
|
||||||
|
93,40970,38565,2405,0,4,94.13,1.8723456187454235
|
||||||
|
94,30953,28591,2362,0,3,92.37,1.8392724453203244
|
||||||
|
95,20475,18207,2268,0,2,88.92,1.773040293040293
|
||||||
|
96,10000,7977,2023,0,1,79.77,1.5817
|
||||||
|
97,10281,8238,2043,0,1,80.13,1.6159906623869273
|
||||||
|
98,10136,8094,2042,0,1,79.85,1.6071428571428572
|
||||||
|
99,20392,18127,2265,0,2,88.89,1.7948705374656728
|
||||||
|
100,10191,8155,2036,0,1,80.02,1.5958198410362083
|
||||||
|
101
experiments/No_Refresh_4_0s_ttl/hit_age.csv
Normal file
101
experiments/No_Refresh_4_0s_ttl/hit_age.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,hit_rate,avg_age
|
||||||
|
1,0.8886713971127966,2.0094713656387664
|
||||||
|
2,0.9695530176233139,2.0121982178670255
|
||||||
|
3,0.8022961665693715,2.007882609750182
|
||||||
|
4,0.8881442790972701,2.0080448291167334
|
||||||
|
5,0.7983184965380811,2.0016107049931855
|
||||||
|
6,0.9409068506653524,2.0109213765648737
|
||||||
|
7,0.9696646565671422,2.0025659499702955
|
||||||
|
8,0.7974064837905237,1.9686014510883163
|
||||||
|
9,0.9228451663610165,1.9988289567068842
|
||||||
|
10,0.888713807366555,2.0043218085106385
|
||||||
|
11,0.9601108484799087,1.99229175863357
|
||||||
|
12,0.7997852401405701,2.0164774807762726
|
||||||
|
13,0.8021775055895791,1.9859428017450316
|
||||||
|
14,0.8004497457958545,1.9942591914010015
|
||||||
|
15,0.798798503052984,1.9769448896560227
|
||||||
|
16,0.8000389218643573,1.9861347603989297
|
||||||
|
17,0.8006405901193827,2.0008485877076008
|
||||||
|
18,0.8888943200703882,2.012207863623866
|
||||||
|
19,0.9524611018690674,2.006061726872971
|
||||||
|
20,0.8015841971445336,1.994754178357936
|
||||||
|
21,0.8896018667055564,1.9934972677595628
|
||||||
|
22,0.8893546500292455,2.00559026635975
|
||||||
|
23,0.9914472705637364,1.9910904862896461
|
||||||
|
24,0.8025230470645318,2.001813784764208
|
||||||
|
25,0.8884471927758146,1.9867425288626195
|
||||||
|
26,0.8887363983923144,1.9868188837414515
|
||||||
|
27,0.7971086739780658,2.013383364602877
|
||||||
|
28,0.7971358024691358,1.9930615784908934
|
||||||
|
29,0.9778659001792019,1.9931504985166975
|
||||||
|
30,0.8002944062806673,2.009319435928878
|
||||||
|
31,0.8886929257299627,1.9845644983461963
|
||||||
|
32,0.8003132341425215,2.0
|
||||||
|
33,0.8007629107981221,2.004152925369488
|
||||||
|
34,0.8015252437493967,1.9850656389256895
|
||||||
|
35,0.802368117058144,2.0196760647870424
|
||||||
|
36,0.8886433937251436,1.9998342449859108
|
||||||
|
37,0.8888616170045653,2.003976362732645
|
||||||
|
38,0.9225150528082124,2.0242527997717383
|
||||||
|
39,0.8885614655468789,2.0003869113420296
|
||||||
|
40,0.7992950851772077,1.9952229299363058
|
||||||
|
41,0.887977467015862,2.007456872565387
|
||||||
|
42,0.94102382059882,2.0049170092096364
|
||||||
|
43,0.922798711119879,1.998824200099765
|
||||||
|
44,0.7993923951391612,1.994605859997548
|
||||||
|
45,0.8015458937198068,1.9705882352941178
|
||||||
|
46,0.888273680047459,1.9885351736420303
|
||||||
|
47,0.8022340942204954,1.9975783993219518
|
||||||
|
48,0.8001368925393566,1.992301112061591
|
||||||
|
49,0.9412542223527683,2.0124824465595257
|
||||||
|
50,0.8028971511347175,2.0104642771229253
|
||||||
|
51,0.8006605789780454,1.993933511283669
|
||||||
|
52,0.79986312084474,2.0210243246546877
|
||||||
|
53,0.9696564908883687,1.9994691808955676
|
||||||
|
54,0.888513678852836,2.0134398237400166
|
||||||
|
55,0.7987019372603009,1.9961832061068703
|
||||||
|
56,0.799194023982701,1.9901611117943672
|
||||||
|
57,0.8010149311993754,1.988182261208577
|
||||||
|
58,0.8016784026237098,2.01804836963061
|
||||||
|
59,0.8002539558507521,2.013426095447333
|
||||||
|
60,0.8018702513150204,2.005709426627794
|
||||||
|
61,0.7974533609712763,1.9899740066839955
|
||||||
|
62,0.8001955034213099,2.01600293183484
|
||||||
|
63,0.8014734774066797,2.020100502512563
|
||||||
|
64,0.8896040569533841,2.0143608857706643
|
||||||
|
65,0.8006612213146636,2.006801068739373
|
||||||
|
66,0.9229763733211332,1.9756762498229712
|
||||||
|
67,0.7992524835251303,2.0542702436623186
|
||||||
|
68,0.7959852926562655,2.001123595505618
|
||||||
|
69,0.8876777486003072,2.0023442732752845
|
||||||
|
70,0.8901263861314223,1.9998367968664998
|
||||||
|
71,0.8014784554031709,1.974635922330097
|
||||||
|
72,0.8006657528881926,1.9951088285644412
|
||||||
|
73,0.9525270687565962,2.0004308841332046
|
||||||
|
74,0.7994725532330533,2.007697006719609
|
||||||
|
75,0.7964495861174828,1.9840971700475833
|
||||||
|
76,0.7996019900497513,2.0282478845196614
|
||||||
|
77,0.7997839748625295,2.0117863720073665
|
||||||
|
78,0.8016634050880627,2.004882216526303
|
||||||
|
79,0.8008858267716535,2.0185572078161487
|
||||||
|
80,0.9795886696288552,1.9943468436543736
|
||||||
|
81,0.9413001491333154,1.9870656069814554
|
||||||
|
82,0.969585910885366,1.9961059387604962
|
||||||
|
83,0.7994901460927542,2.011037527593819
|
||||||
|
84,0.7992550480297981,2.0144714250674514
|
||||||
|
85,0.8881312382646507,1.9951040391676866
|
||||||
|
86,0.7977705435533196,2.017435390132311
|
||||||
|
87,0.7987774820072957,1.9953098000493705
|
||||||
|
88,0.7985163204747775,1.9977703455964326
|
||||||
|
89,0.799921729772038,2.0124755381604698
|
||||||
|
90,0.9411923124005386,2.0195094035325027
|
||||||
|
91,0.8007225151337629,1.9531764418973296
|
||||||
|
92,0.8880457278013206,2.002885362334924
|
||||||
|
93,0.9412985111056871,1.9891092959937768
|
||||||
|
94,0.9236907569540916,1.99122101360568
|
||||||
|
95,0.8892307692307693,1.9939034437304333
|
||||||
|
96,0.7977,1.9828256236680457
|
||||||
|
97,0.8012839217974905,2.0167516387472686
|
||||||
|
98,0.7985398579321231,2.0126019273535953
|
||||||
|
99,0.8889270302079246,2.019142715286589
|
||||||
|
100,0.8002158767539986,1.9942366646229308
|
||||||
|
BIN
experiments/No_Refresh_4_0s_ttl/lambda_distribution.pdf
Normal file
BIN
experiments/No_Refresh_4_0s_ttl/lambda_distribution.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_4_0s_ttl/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_4_0s_ttl/lambda_vs_access_count.pdf
Normal file
Binary file not shown.
BIN
experiments/No_Refresh_4_0s_ttl/objects_in_cache_over_time.pdf
Normal file
BIN
experiments/No_Refresh_4_0s_ttl/objects_in_cache_over_time.pdf
Normal file
Binary file not shown.
9
experiments/No_Refresh_4_0s_ttl/overall_hit_age.csv
Normal file
9
experiments/No_Refresh_4_0s_ttl/overall_hit_age.csv
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
,hit_rate,avg_age
|
||||||
|
count,100.0,100.0
|
||||||
|
mean,0.8510557628431259,2.0010172191143316
|
||||||
|
std,0.06321177863870277,0.014208951960786203
|
||||||
|
min,0.7959852926562655,1.9531764418973296
|
||||||
|
25%,0.7999070775402135,1.9931282685102465
|
||||||
|
50%,0.8017743269693651,2.0006397359204025
|
||||||
|
75%,0.8892617394303883,2.011224738697206
|
||||||
|
max,0.9914472705637364,2.0542702436623186
|
||||||
|
101
experiments/No_Refresh_5_0s_ttl/details.csv
Normal file
101
experiments/No_Refresh_5_0s_ttl/details.csv
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
obj_id,access_count,hits,misses,mu,lambda,hit_rate,avg_age
|
||||||
|
1,20339,18479,1860,0,2,90.86,2.27017060819116
|
||||||
|
2,10130,8439,1691,0,1,83.31,2.0746298124383022
|
||||||
|
3,10236,8533,1703,0,1,83.36,2.1051191871824932
|
||||||
|
4,10206,8504,1702,0,1,83.32,2.067705271408975
|
||||||
|
5,337084,335059,2025,0,33,99.4,2.4886942127184914
|
||||||
|
6,10235,8540,1695,0,1,83.44,2.0965315095261357
|
||||||
|
7,10061,8368,1693,0,1,83.17,2.1009839976145512
|
||||||
|
8,20019,18166,1853,0,2,90.74,2.2494130575952846
|
||||||
|
9,40733,38791,1942,0,4,95.23,2.3839147619865955
|
||||||
|
10,10170,8483,1687,0,1,83.41,2.0863323500491644
|
||||||
|
11,60945,58976,1969,0,6,96.77,2.429977848880138
|
||||||
|
12,20228,18381,1847,0,2,90.87,2.245451848922286
|
||||||
|
13,30786,28873,1913,0,3,93.79,2.340446956408757
|
||||||
|
14,20305,18456,1849,0,2,90.89,2.2825412459985226
|
||||||
|
15,10133,8430,1703,0,1,83.19,2.1018454554426134
|
||||||
|
16,10232,8535,1697,0,1,83.41,2.083463643471462
|
||||||
|
17,20384,18527,1857,0,2,90.89,2.282182103610675
|
||||||
|
18,172949,170936,2013,0,17,98.84,2.476631839443998
|
||||||
|
19,10273,8579,1694,0,1,83.51,2.06823712644797
|
||||||
|
20,10053,8356,1697,0,1,83.12,2.0936038993335324
|
||||||
|
21,40600,38661,1939,0,4,95.22,2.3798029556650246
|
||||||
|
22,10251,8545,1706,0,1,83.36,2.0913081650570677
|
||||||
|
23,10000,8294,1706,0,1,82.94,2.0405
|
||||||
|
24,10159,8461,1698,0,1,83.29,2.059553105620632
|
||||||
|
25,10015,8309,1706,0,1,82.97,2.059211183225162
|
||||||
|
26,10136,8428,1708,0,1,83.15,2.0944159431728493
|
||||||
|
27,10193,8498,1695,0,1,83.37,2.0631806141469635
|
||||||
|
28,51036,49073,1963,0,5,96.15,2.4281879457637747
|
||||||
|
29,70592,68613,1979,0,7,97.2,2.430969514959202
|
||||||
|
30,10219,8513,1706,0,1,83.31,2.111361189940307
|
||||||
|
31,10178,8483,1695,0,1,83.35,2.1005109058754177
|
||||||
|
32,81130,79143,1987,0,8,97.55,2.4394675212621717
|
||||||
|
33,30477,28564,1913,0,3,93.72,2.350854742920891
|
||||||
|
34,10178,8470,1708,0,1,83.22,2.1021811750835133
|
||||||
|
35,91956,89964,1992,0,9,97.83,2.4512592979250947
|
||||||
|
36,10253,8552,1701,0,1,83.41,2.094703989076368
|
||||||
|
37,10180,8484,1696,0,1,83.34,2.0740667976424363
|
||||||
|
38,20269,18418,1851,0,2,90.87,2.2567467561300507
|
||||||
|
39,20493,18637,1856,0,2,90.94,2.272092909774069
|
||||||
|
40,10164,8460,1704,0,1,83.23,2.0839236521054705
|
||||||
|
41,20209,18358,1851,0,2,90.84,2.261715077440744
|
||||||
|
42,10327,8624,1703,0,1,83.51,2.048997772828508
|
||||||
|
43,10160,8465,1695,0,1,83.32,2.0996062992125983
|
||||||
|
44,112266,110266,2000,0,11,98.22,2.4545454545454546
|
||||||
|
45,10315,8608,1707,0,1,83.45,2.0952011633543384
|
||||||
|
46,10300,8595,1705,0,1,83.45,2.0733009708737864
|
||||||
|
47,10086,8397,1689,0,1,83.25,2.0808050763434465
|
||||||
|
48,10211,8497,1714,0,1,83.21,2.055528351777495
|
||||||
|
49,152402,150392,2010,0,15,98.68,2.4713061508379157
|
||||||
|
50,20385,18531,1854,0,2,90.91,2.281236203090508
|
||||||
|
51,20085,18237,1848,0,2,90.8,2.275379636544685
|
||||||
|
52,10124,8433,1691,0,1,83.3,2.0587712366653497
|
||||||
|
53,71299,69318,1981,0,7,97.22,2.4399220185416346
|
||||||
|
54,10042,8346,1696,0,1,83.11,2.057159928301135
|
||||||
|
55,10076,8394,1682,0,1,83.31,2.0668916236601826
|
||||||
|
56,20766,18911,1855,0,2,91.07,2.2754502552248868
|
||||||
|
57,10246,8566,1680,0,1,83.6,2.0716377122779623
|
||||||
|
58,20214,18359,1855,0,2,90.82,2.290739091718611
|
||||||
|
59,71129,69150,1979,0,7,97.22,2.4332269538444233
|
||||||
|
60,10144,8445,1699,0,1,83.25,2.071076498422713
|
||||||
|
61,20377,18529,1848,0,2,90.93,2.266329685429651
|
||||||
|
62,10267,8564,1703,0,1,83.41,2.077237752021038
|
||||||
|
63,10030,8344,1686,0,1,83.19,2.089531405782652
|
||||||
|
64,10058,8366,1692,0,1,83.18,2.100914694770332
|
||||||
|
65,30672,28760,1912,0,3,93.77,2.324954355764215
|
||||||
|
66,10239,8538,1701,0,1,83.39,2.088289872057818
|
||||||
|
67,10131,8433,1698,0,1,83.24,2.0949560754121013
|
||||||
|
68,10031,8343,1688,0,1,83.17,2.0731731631940984
|
||||||
|
69,10269,8565,1704,0,1,83.41,2.0710877397993963
|
||||||
|
70,305170,303147,2023,0,30,99.34,2.4785332765343906
|
||||||
|
71,10134,8450,1684,0,1,83.38,2.0746003552397867
|
||||||
|
72,10387,8682,1705,0,1,83.59,2.091364205256571
|
||||||
|
73,40590,38651,1939,0,4,95.22,2.3761763981276176
|
||||||
|
74,40322,38388,1934,0,4,95.2,2.3638956400972173
|
||||||
|
75,20298,18443,1855,0,2,90.86,2.264952212040595
|
||||||
|
76,10017,8330,1687,0,1,83.16,2.1029250274533293
|
||||||
|
77,20194,18338,1856,0,2,90.81,2.257056551450926
|
||||||
|
78,10215,8527,1688,0,1,83.48,2.052080274106706
|
||||||
|
79,10126,8421,1705,0,1,83.16,2.097768121666996
|
||||||
|
80,10243,8537,1706,0,1,83.34,2.0985062969833055
|
||||||
|
81,10068,8374,1694,0,1,83.17,2.0969408025427096
|
||||||
|
82,40821,38880,1941,0,4,95.25,2.3762769162930844
|
||||||
|
83,10119,8420,1699,0,1,83.21,2.0855815792074317
|
||||||
|
84,10048,8359,1689,0,1,83.19,2.082703025477707
|
||||||
|
85,40534,38594,1940,0,4,95.21,2.3784477228992946
|
||||||
|
86,20327,18477,1850,0,2,90.9,2.283219363408275
|
||||||
|
87,10035,8339,1696,0,1,83.1,2.0907822620827106
|
||||||
|
88,10202,8494,1708,0,1,83.26,2.0655753773769847
|
||||||
|
89,10273,8565,1708,0,1,83.37,2.0735909666115058
|
||||||
|
90,10116,8408,1708,0,1,83.12,2.0856069592724396
|
||||||
|
91,30630,28719,1911,0,3,93.76,2.3531178583088477
|
||||||
|
92,30356,28444,1912,0,3,93.7,2.324548688891817
|
||||||
|
93,10237,8535,1702,0,1,83.37,2.092214515971476
|
||||||
|
94,10219,8521,1698,0,1,83.38,2.0911048047754184
|
||||||
|
95,20157,18306,1851,0,2,90.82,2.2860048618345985
|
||||||
|
96,20564,18712,1852,0,2,90.99,2.271250729430072
|
||||||
|
97,10253,8569,1684,0,1,83.58,2.0926558080561786
|
||||||
|
98,10125,8417,1708,0,1,83.13,2.089283950617284
|
||||||
|
99,20511,18658,1853,0,2,90.97,2.265321047242943
|
||||||
|
100,61194,59224,1970,0,6,96.78,2.42376703598392
|
||||||
|
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.9085500762082698,2.4986741706802316
|
||||||
|
2,0.8330700888450148,2.4903424576371607
|
||||||
|
3,0.8336264165689723,2.5252548927692486
|
||||||
|
4,0.8332353517538703,2.48153809971778
|
||||||
|
5,0.9939925953174876,2.503735163060834
|
||||||
|
6,0.8343917928676111,2.512646370023419
|
||||||
|
7,0.8317264685418945,2.5260516252390057
|
||||||
|
8,0.9074379339627354,2.478861609600352
|
||||||
|
9,0.9523236687697936,2.5032610657111185
|
||||||
|
10,0.8341199606686333,2.501237769656961
|
||||||
|
11,0.9676921814751005,2.5111062126966903
|
||||||
|
12,0.9086909234724144,2.471084271802405
|
||||||
|
13,0.9378613655557722,2.495514840854778
|
||||||
|
14,0.9089386850529426,2.511215864759428
|
||||||
|
15,0.8319352610283233,2.526453143534994
|
||||||
|
16,0.834147771696638,2.497715289982425
|
||||||
|
17,0.908899136577708,2.510929994062719
|
||||||
|
18,0.9883607306200094,2.5057974914587917
|
||||||
|
19,0.8351017229631071,2.476628977736333
|
||||||
|
20,0.8311946682582314,2.5187888942077548
|
||||||
|
21,0.9522413793103448,2.499159359561315
|
||||||
|
22,0.8335772119793191,2.5088355763604446
|
||||||
|
23,0.8294,2.4602122015915118
|
||||||
|
24,0.8328575647209371,2.472875546625694
|
||||||
|
25,0.8296555167249127,2.482007461788422
|
||||||
|
26,0.8314917127071824,2.5188656858092076
|
||||||
|
27,0.8337094084175415,2.4746999293951517
|
||||||
|
28,0.9615369543067639,2.5253194220854644
|
||||||
|
29,0.971965661831369,2.5010858000670426
|
||||||
|
30,0.8330560720227028,2.534476682720545
|
||||||
|
31,0.8334643348398506,2.5202169043970293
|
||||||
|
32,0.9755084432392457,2.500713897628344
|
||||||
|
33,0.9372313547921384,2.5082971572608876
|
||||||
|
34,0.8321870701513068,2.5260920897284533
|
||||||
|
35,0.9783374657444865,2.505535547552354
|
||||||
|
36,0.8340973373646737,2.511342376052385
|
||||||
|
37,0.8333988212180746,2.4886845827439887
|
||||||
|
38,0.9086782771720361,2.4835487023563907
|
||||||
|
39,0.9094324891426341,2.498363470515641
|
||||||
|
40,0.8323494687131051,2.503664302600473
|
||||||
|
41,0.9084071453312881,2.4897592330319207
|
||||||
|
42,0.8350924760336981,2.453617810760668
|
||||||
|
43,0.8331692913385826,2.520023626698169
|
||||||
|
44,0.9821851673703526,2.499065895198883
|
||||||
|
45,0.8345128453708192,2.5106877323420074
|
||||||
|
46,0.8344660194174758,2.484584060500291
|
||||||
|
47,0.8325401546698393,2.499345004168155
|
||||||
|
48,0.8321418078542748,2.470165940920325
|
||||||
|
49,0.9868111967034553,2.50433533698601
|
||||||
|
50,0.9090507726269316,2.5094706168042737
|
||||||
|
51,0.9079910380881254,2.505949443439162
|
||||||
|
52,0.8329711576451996,2.471599667971066
|
||||||
|
53,0.9722155990967615,2.5096511728555355
|
||||||
|
54,0.8311093407687712,2.475197699496765
|
||||||
|
55,0.833068678046844,2.481057898498928
|
||||||
|
56,0.9106712896080131,2.498651578446407
|
||||||
|
57,0.8360335740776889,2.477936026149895
|
||||||
|
58,0.9082319184723459,2.5221961980500027
|
||||||
|
59,0.9721773116450393,2.5028633405639913
|
||||||
|
60,0.8325118296529969,2.487744227353464
|
||||||
|
61,0.9093095156303675,2.4923633223595445
|
||||||
|
62,0.8341287620531801,2.490308267164876
|
||||||
|
63,0.8319042871385842,2.511744966442953
|
||||||
|
64,0.8317757009345794,2.52581879034186
|
||||||
|
65,0.9376630151278038,2.47952016689847
|
||||||
|
66,0.8338704951655435,2.5043335675802294
|
||||||
|
67,0.832395617411904,2.5167793193406856
|
||||||
|
68,0.8317216628451799,2.492628550880978
|
||||||
|
69,0.834063686824423,2.4831290134267365
|
||||||
|
70,0.9933709080184815,2.4950733472539723
|
||||||
|
71,0.8338267219261891,2.4880473372781067
|
||||||
|
72,0.8358525079426206,2.5020732550103664
|
||||||
|
73,0.9522296132052229,2.4953817495019535
|
||||||
|
74,0.9520361093199742,2.4829894758778783
|
||||||
|
75,0.9086116858803823,2.4927614813208265
|
||||||
|
76,0.8315863032844165,2.528811524609844
|
||||||
|
77,0.9080915123303952,2.485494601374196
|
||||||
|
78,0.8347528144884974,2.458308901137563
|
||||||
|
79,0.8316215682401739,2.5225032656454105
|
||||||
|
80,0.8334472322561749,2.5178634180625514
|
||||||
|
81,0.8317441398490266,2.5211368521614523
|
||||||
|
82,0.95245094436687,2.4949074074074074
|
||||||
|
83,0.8320980334025101,2.506413301662708
|
||||||
|
84,0.831906847133758,2.5035291302787415
|
||||||
|
85,0.9521389450831401,2.498004871223506
|
||||||
|
86,0.9089880454567816,2.511825512799697
|
||||||
|
87,0.8309915296462381,2.5160091138026144
|
||||||
|
88,0.8325818466967261,2.480927713680245
|
||||||
|
89,0.8337389272851163,2.487098657326328
|
||||||
|
90,0.8311585606959272,2.509276879162702
|
||||||
|
91,0.9376101860920666,2.5096974128625646
|
||||||
|
92,0.9370140993543287,2.480804387568556
|
||||||
|
93,0.8337403536192244,2.5094317516110136
|
||||||
|
94,0.8338389274880125,2.5078042483276612
|
||||||
|
95,0.9081708587587438,2.5171528460614008
|
||||||
|
96,0.9099397004473838,2.4960453185121847
|
||||||
|
97,0.8357553886667317,2.5039094410082856
|
||||||
|
98,0.8313086419753086,2.513247000118807
|
||||||
|
99,0.9096582321681049,2.490299067424161
|
||||||
|
100,0.9678073013694153,2.5043901121167096
|
||||||
|
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/lambda_vs_access_count.pdf
Normal file
BIN
experiments/No_Refresh_5_0s_ttl/lambda_vs_access_count.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.8785973318800118,2.4997258275889482
|
||||||
|
std,0.056440312317261106,0.01696772212165293
|
||||||
|
min,0.8294,2.453617810760668
|
||||||
|
25%,0.8327886352148843,2.487971559796946
|
||||||
|
50%,0.8344894323941474,2.501655512333664
|
||||||
|
75%,0.9101225977375411,2.511133625712375
|
||||||
|
max,0.9939925953174876,2.534476682720545
|
||||||
|
17
experiments/README.md
Normal file
17
experiments/README.md
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Experiments: No Refresh with variable TTL
|
||||||
|
|
||||||
|
Explanation for files in each experiment:
|
||||||
|
|
||||||
|
- `details.csv`: Access Count, Hit, Miss, Mu, Lambda and Hit Rate for each object
|
||||||
|
- `hit_age.csv`: Shows hit rate/average age at time of request for each object.
|
||||||
|
- `lambda_distribution.pdf`: Lambda Distribution across all objects/discrete
|
||||||
|
values of the Zipf distribution
|
||||||
|
- `lambda_vs_access_count.pdf`: Displays the access count against lambda,
|
||||||
|
expecting a higher lambda to result in a higher access count.
|
||||||
|
- `objects_in_cache_over_time.pdf`: Amount of cache entries at given time.
|
||||||
|
- `overall_hit_age.csv`: Cumulative description of `hit_age.csv`
|
||||||
|
|
||||||
|
Length of simulation doesn't change much since we're not touching the request
|
||||||
|
rate across the simulations.
|
||||||
|
Break condition for the simulation is when the each database object has been
|
||||||
|
requested at least `ACCESS_COUNT_LIMIT` (i.e. 10) times.
|
||||||
8
experiments/avg_ages.md
Normal file
8
experiments/avg_ages.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
| | avg_ages |
|
||||||
|
|:-----|-----------:|
|
||||||
|
| 0.5s | 0.248882 |
|
||||||
|
| 1.0s | 0.499741 |
|
||||||
|
| 2.0s | 1.00137 |
|
||||||
|
| 3.0s | 1.50042 |
|
||||||
|
| 4.0s | 2.00102 |
|
||||||
|
| 5.0s | 2.49973 |
|
||||||
8
experiments/hit_rates.md
Normal file
8
experiments/hit_rates.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
| | hit_rates |
|
||||||
|
|:-----|------------:|
|
||||||
|
| 0.5s | 0.460409 |
|
||||||
|
| 1.0s | 0.633097 |
|
||||||
|
| 2.0s | 0.733979 |
|
||||||
|
| 3.0s | 0.80848 |
|
||||||
|
| 4.0s | 0.851056 |
|
||||||
|
| 5.0s | 0.878597 |
|
||||||
BIN
experiments/hr_and_age_vs_ttl.png
Normal file
BIN
experiments/hr_and_age_vs_ttl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
100
export.csv
100
export.csv
@@ -1,100 +0,0 @@
|
|||||||
,access_count,hits,misses,mu,lambda,hit_rate
|
|
||||||
1,338919,293278,45641,9.45073508577941,1,87.09
|
|
||||||
2,339569,295735,43834,8.14036449596436,1,87.19
|
|
||||||
3,339121,295683,43438,7.841130117448747,1,93.79
|
|
||||||
4,339726,318616,21110,2.2674748477937965,1,78.47
|
|
||||||
5,67728,53145,14583,1.9491614320948918,5,87.79
|
|
||||||
6,339470,298026,41444,6.571586635600101,1,77.43
|
|
||||||
7,170195,131783,38412,7.611334405003136,2,29.18
|
|
||||||
8,16126,4705,11421,4.4496294204831255,21,88.2
|
|
||||||
9,339776,299674,40102,5.998373656353862,1,87.76
|
|
||||||
10,339314,297783,41531,6.636819845113485,1,77.12
|
|
||||||
11,170006,131110,38896,8.045921601779977,2,92.35
|
|
||||||
12,338799,312870,25929,2.811627158825997,1,87.45
|
|
||||||
13,338380,295915,42465,7.143615488470383,1,95.62
|
|
||||||
14,339295,324424,14871,1.765483508758194,1,78.89
|
|
||||||
15,168900,133246,35654,5.959911292425263,2,41.86
|
|
||||||
16,37792,15821,21971,9.445879641550164,9,71.36
|
|
||||||
17,42276,30167,12109,1.835890334290284,8,73.65
|
|
||||||
18,113327,83461,29866,4.648600564543203,3,78.27
|
|
||||||
19,169939,133012,36927,6.632144547714242,2,96.59
|
|
||||||
20,339409,327834,11575,1.5219711334160873,1,86.89
|
|
||||||
21,339488,294970,44518,8.640804985015603,1,89.01
|
|
||||||
22,338488,301286,37202,4.948940599763346,1,93.0
|
|
||||||
23,339243,315511,23732,2.5215047387858385,1,93.5
|
|
||||||
24,338961,316939,22022,2.364507987541101,1,87.79
|
|
||||||
25,338323,297005,41318,6.599461843110775,1,78.51
|
|
||||||
26,169708,133242,36466,6.367528014392565,2,89.0
|
|
||||||
27,339195,301871,37324,5.003687539185309,1,86.83
|
|
||||||
28,338836,294227,44609,8.69089847442159,1,89.4
|
|
||||||
29,339057,303133,35924,4.636189613643649,1,79.99
|
|
||||||
30,169136,135290,33846,5.071027599242191,2,89.99
|
|
||||||
31,337940,304106,33834,4.08093995040424,1,23.8
|
|
||||||
32,13512,3216,10296,5.389385006998066,25,76.19
|
|
||||||
33,113049,86130,26919,3.6953335845304562,3,87.95
|
|
||||||
34,339556,298625,40931,6.455201262262219,1,88.24
|
|
||||||
35,339483,299569,39914,5.935488589201371,1,75.63
|
|
||||||
36,113404,85767,27637,3.880596047884128,3,89.06
|
|
||||||
37,339071,301962,37109,4.9810532504276015,1,68.83
|
|
||||||
38,37623,25897,11726,1.842940132793361,9,89.4
|
|
||||||
39,339457,303459,35998,4.646642146558106,1,90.35
|
|
||||||
40,338193,305568,32625,3.841385277835048,1,90.52
|
|
||||||
41,339194,307024,32170,3.755174466816314,1,62.3
|
|
||||||
42,67848,42269,25579,4.791783523908462,5,68.62
|
|
||||||
43,56919,39060,17859,2.5603665363948838,6,85.08
|
|
||||||
44,169214,143969,25245,2.9501977292188872,2,86.87
|
|
||||||
45,339975,295349,44626,8.660786623694852,1,92.94
|
|
||||||
46,339167,315235,23932,2.5477162793599124,1,86.54
|
|
||||||
47,339934,294192,45742,9.754540171481345,1,87.12
|
|
||||||
48,339091,295408,43683,7.997429679411413,1,90.35
|
|
||||||
49,339138,306397,32741,3.884597009502997,1,86.57
|
|
||||||
50,339966,294305,45661,9.586637018141543,1,88.32
|
|
||||||
51,84488,74624,9864,1.4658283776461758,4,97.73
|
|
||||||
52,339140,331438,7702,1.2656689838300985,1,92.44
|
|
||||||
53,339252,313600,25652,2.737252979299571,1,87.02
|
|
||||||
54,339109,295087,44022,8.251086295714982,1,94.48
|
|
||||||
55,339737,320982,18755,2.0610542552665496,1,87.81
|
|
||||||
56,170131,149390,20741,2.3501661595459855,2,18.76
|
|
||||||
57,12099,2270,9829,8.517893008102874,28,86.59
|
|
||||||
58,339603,294064,45539,9.51973718760753,1,79.07
|
|
||||||
59,169388,133936,35452,5.7533658385673965,2,73.65
|
|
||||||
60,112783,83061,29722,4.660963074614197,3,87.12
|
|
||||||
61,339803,296040,43763,8.03102930717676,1,77.07
|
|
||||||
62,169490,130630,38860,8.20890898481475,2,59.28
|
|
||||||
63,68277,40475,27802,6.460946859444955,5,87.65
|
|
||||||
64,340043,298043,42000,6.997089517135705,1,95.75
|
|
||||||
65,339335,324924,14411,1.7111982665882988,1,63.53
|
|
||||||
66,84598,53748,30850,7.195239628139434,4,87.83
|
|
||||||
67,337396,296343,41053,6.468823743568375,1,76.74
|
|
||||||
68,168813,129539,39274,8.584449622455724,2,76.87
|
|
||||||
69,168935,129852,39083,8.31382957264006,2,70.86
|
|
||||||
70,112790,79928,32862,6.32689728463079,3,27.82
|
|
||||||
71,18026,5015,13011,6.059882273135225,19,86.61
|
|
||||||
72,339602,294144,45458,9.326244637290127,1,89.2
|
|
||||||
73,337685,301201,36484,4.734530335572703,1,32.94
|
|
||||||
74,10000,3294,6706,2.0953399483975383,34,96.77
|
|
||||||
75,338999,328054,10945,1.4775733311410093,1,76.91
|
|
||||||
76,169928,130689,39239,8.406951084575,2,87.2
|
|
||||||
77,339808,296317,43491,7.860627209955007,1,91.27
|
|
||||||
78,340016,310335,29681,3.295575301583255,1,89.97
|
|
||||||
79,339322,305288,34034,4.1428568837538,1,61.61
|
|
||||||
80,85030,52384,32646,9.612329081824885,4,64.08
|
|
||||||
81,84888,54399,30489,6.8654731084167215,4,86.01
|
|
||||||
82,169804,146055,23749,2.7190649943185607,2,86.62
|
|
||||||
83,339457,294036,45421,9.374682516586324,1,79.3
|
|
||||||
84,169248,134215,35033,5.59505906586539,2,86.85
|
|
||||||
85,338584,294054,44530,8.791458898209017,1,88.42
|
|
||||||
86,338920,299662,39258,5.68526209949427,1,86.69
|
|
||||||
87,338880,293780,45100,9.141536447646898,1,73.22
|
|
||||||
88,112317,82242,30075,4.8033650741674165,3,89.16
|
|
||||||
89,169307,150951,18356,2.106599827358843,2,87.4
|
|
||||||
90,338997,296291,42706,7.364331823831616,1,86.62
|
|
||||||
91,339905,294417,45488,9.303831880532016,1,33.3
|
|
||||||
92,26197,8723,17474,9.509741988265437,13,87.41
|
|
||||||
93,112773,98573,14200,1.8012576813912844,3,49.96
|
|
||||||
94,48507,24233,24274,7.076409771949383,7,87.43
|
|
||||||
95,339988,297246,42742,7.388599144805513,1,88.05
|
|
||||||
96,338400,297960,40440,6.1158358642271375,1,85.57
|
|
||||||
97,168252,143969,24283,2.8133122321600794,2,87.44
|
|
||||||
98,338729,296200,42529,7.193050310873352,1,95.99
|
|
||||||
99,338235,324673,13562,1.6556673379589992,1,52.28
|
|
||||||
|
511
multi_aoi_cache_simulation.ipynb
Normal file
511
multi_aoi_cache_simulation.ipynb
Normal file
@@ -0,0 +1,511 @@
|
|||||||
|
{
|
||||||
|
"cells": [
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 1,
|
||||||
|
"id": "71f85f2a-423f-44d2-b80d-da9ac8d3961a",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"import simpy\n",
|
||||||
|
"import random\n",
|
||||||
|
"import numpy as np\n",
|
||||||
|
"import matplotlib.pyplot as plt\n",
|
||||||
|
"import pandas as pd\n",
|
||||||
|
"from enum import Enum\n",
|
||||||
|
"import os\n",
|
||||||
|
"import shutil\n",
|
||||||
|
"from tqdm import tqdm\n",
|
||||||
|
"\n",
|
||||||
|
"# Types of cache\n",
|
||||||
|
"class CacheType(Enum):\n",
|
||||||
|
" LRU = 1\n",
|
||||||
|
" RANDOM_EVICTION = 2\n",
|
||||||
|
"\n",
|
||||||
|
"# Constants\n",
|
||||||
|
"SEED = 42\n",
|
||||||
|
"DATABASE_OBJECTS = 100 # Number of objects in the database\n",
|
||||||
|
"ACCESS_COUNT_LIMIT = 10000 # Total time to run the simulation\n",
|
||||||
|
"EXPERIMENT_BASE_DIR = \"./experiments/\"\n",
|
||||||
|
"TEMP_BASE_DIR = \"./.aoi_cache/\"\n",
|
||||||
|
"\n",
|
||||||
|
"ZIPF_CONSTANT = 2 # Shape parameter for the Zipf distribution (controls skewness) Needs to be: 1< \n",
|
||||||
|
"\n",
|
||||||
|
"# Set random seeds\n",
|
||||||
|
"random.seed(SEED)\n",
|
||||||
|
"np.random.seed(SEED)\n",
|
||||||
|
"\n",
|
||||||
|
"os.makedirs(TEMP_BASE_DIR, exist_ok=True)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "markdown",
|
||||||
|
"id": "9a37d7a3-3e11-4b89-8dce-6091dd38b16f",
|
||||||
|
"metadata": {},
|
||||||
|
"source": [
|
||||||
|
"How to set certain parameters for specific scenarios\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
"| Name | Cache Capacity | MAX_REFRESH_RATE | cache_type | CACHE_TTL |\n",
|
||||||
|
"| -------------------- | -------------------- | ---------------- | ------------------------- | --------- |\n",
|
||||||
|
"| Default | DATABASE_OBJECTS | 1< | CacheType.LRU | 5 |\n",
|
||||||
|
"| No Refresh | DATABASE_OBJECTS | 0 | CacheType.LRU | 5 |\n",
|
||||||
|
"| Infinite TTL | DATABASE_OBJECTS / 2 | 0 | CacheType.LRU | 0 |\n",
|
||||||
|
"| Random Eviction (RE) | DATABASE_OBJECTS / 2 | 1< | CacheType.RANDOM_EVICTION | 5 |\n",
|
||||||
|
"| RE without Refresh | DATABASE_OBJECTS / 2 | 0 | CacheType.RANDOM_EVICTION | 5 |\n",
|
||||||
|
"\n",
|
||||||
|
"\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 2,
|
||||||
|
"id": "3d0ab5b1-162a-42c8-80a3-d31f763101f1",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"# Configuration (Just example, will be overwritten in next block\n",
|
||||||
|
"\n",
|
||||||
|
"CACHE_CAPACITY = DATABASE_OBJECTS # Maximum number of objects the cache can hold\n",
|
||||||
|
"\n",
|
||||||
|
"# MAX_REFRESH_RATE is used as the maximum for a uniform\n",
|
||||||
|
"# distribution for mu.\n",
|
||||||
|
"# If MAX_REFRESH_RATE is 0, we do not do any refreshes.\n",
|
||||||
|
"MAX_REFRESH_RATE = 0\n",
|
||||||
|
"\n",
|
||||||
|
"cache_type = CacheType.LRU\n",
|
||||||
|
"\n",
|
||||||
|
"# CACHE_TTL is used to determin which TTL to set when an\n",
|
||||||
|
"# object is pulled into the cache\n",
|
||||||
|
"# If CACHE_TTL is set to 0, the TTL is infinite\n",
|
||||||
|
"CACHE_TTL = 5\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 3,
|
||||||
|
"id": "5cea042f-e9fc-4a1e-9750-de212ca70601",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"class Database:\n",
|
||||||
|
" def __init__(self):\n",
|
||||||
|
" # Each object now has a specific refresh rate 'mu'\n",
|
||||||
|
" self.data = {i: f\"Object {i}\" for i in range(1, DATABASE_OBJECTS + 1)}\n",
|
||||||
|
" self.lambda_values = {i: np.random.zipf(ZIPF_CONSTANT) for i in range(1, DATABASE_OBJECTS + 1)} # Request rate 'lambda' for each object\n",
|
||||||
|
" # Refresh rate 'mu' for each object\n",
|
||||||
|
" if MAX_REFRESH_RATE == 0:\n",
|
||||||
|
" self.mu_values = {i: 0 for i in range(1,DATABASE_OBJECTS + 1)} \n",
|
||||||
|
" else:\n",
|
||||||
|
" self.mu_values = {i: np.random.uniform(1, MAX_REFRESH_RATE) for i in range(1, DATABASE_OBJECTS + 1)}\n",
|
||||||
|
" self.next_request = {i: np.random.exponential(1/self.lambda_values[i]) for i in range(1, DATABASE_OBJECTS + 1)}\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" def get_object(self, obj_id):\n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Database: Fetched {self.data.get(obj_id, 'Unknown')} for ID {obj_id}\")\n",
|
||||||
|
" return self.data.get(obj_id, None)"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 4,
|
||||||
|
"id": "499bf543-b2c6-4e4d-afcc-0a6665ce3ae1",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"class Cache:\n",
|
||||||
|
" def __init__(self, env, db, cache_type):\n",
|
||||||
|
" self.cache_type = cache_type\n",
|
||||||
|
" self.env = env\n",
|
||||||
|
" self.db = db\n",
|
||||||
|
" self.storage = {} # Dictionary to store cached objects\n",
|
||||||
|
" self.ttl = {} # Dictionary to store TTLs\n",
|
||||||
|
" self.age = {} # Dictionary to store age of each object\n",
|
||||||
|
" self.cache_size_over_time = [] # To record cache state at each interval\n",
|
||||||
|
" self.cache_next_request_over_time = []\n",
|
||||||
|
" self.request_log = {i: [] for i in range(1, DATABASE_OBJECTS + 1)}\n",
|
||||||
|
" self.hits = {i: 0 for i in range(1, DATABASE_OBJECTS + 1)} # Track hits per object\n",
|
||||||
|
" self.misses = {i: 0 for i in range(1, DATABASE_OBJECTS + 1)} # Track misses per object\n",
|
||||||
|
" self.cumulative_age = {i: 0 for i in range(1, DATABASE_OBJECTS + 1)} # Track cumulative age per object\n",
|
||||||
|
" self.access_count = {i: 0 for i in range(1, DATABASE_OBJECTS + 1)} # Track access count per object\n",
|
||||||
|
" self.next_refresh = {} # Track the next refresh time for each cached object\n",
|
||||||
|
" \n",
|
||||||
|
" def get(self, obj_id):\n",
|
||||||
|
" if obj_id in self.storage and \\\n",
|
||||||
|
" (self.ttl[obj_id] > env.now or CACHE_TTL == 0):\n",
|
||||||
|
" # Cache hit: increment hit count and update cumulative age\n",
|
||||||
|
" self.hits[obj_id] += 1\n",
|
||||||
|
" self.cumulative_age[obj_id] += self.age[obj_id]\n",
|
||||||
|
" self.access_count[obj_id] += 1\n",
|
||||||
|
" else:\n",
|
||||||
|
" # Cache miss: increment miss count\n",
|
||||||
|
" self.misses[obj_id] += 1\n",
|
||||||
|
" self.cumulative_age[obj_id] += 0\n",
|
||||||
|
" self.access_count[obj_id] += 1\n",
|
||||||
|
" \n",
|
||||||
|
" # Fetch the object from the database if it’s not in cache\n",
|
||||||
|
" obj = self.db.get_object(obj_id)\n",
|
||||||
|
" \n",
|
||||||
|
" # If the cache is full, evict the oldest object\n",
|
||||||
|
" if len(self.storage) > CACHE_CAPACITY:\n",
|
||||||
|
" if self.cache_type == CacheType.LRU:\n",
|
||||||
|
" self.evict_oldest()\n",
|
||||||
|
" elif self.cache_type == CacheType.RANDOM_EVICTION:\n",
|
||||||
|
" self.evict_random()\n",
|
||||||
|
" \n",
|
||||||
|
" # Add the object to cache, set TTL, reset age, and schedule next refresh\n",
|
||||||
|
" self.storage[obj_id] = obj\n",
|
||||||
|
" if CACHE_TTL != 0:\n",
|
||||||
|
" self.ttl[obj_id] = env.now + CACHE_TTL\n",
|
||||||
|
" else:\n",
|
||||||
|
" self.ttl[obj_id] = 0\n",
|
||||||
|
" self.age[obj_id] = 0\n",
|
||||||
|
" if MAX_REFRESH_RATE != 0:\n",
|
||||||
|
" self.next_refresh[obj_id] = env.now + np.random.exponential(1/self.db.mu_values[obj_id]) # Schedule refresh\n",
|
||||||
|
"\n",
|
||||||
|
" \n",
|
||||||
|
" def evict_oldest(self):\n",
|
||||||
|
" \"\"\"Remove the oldest item from the cache to make space.\"\"\"\n",
|
||||||
|
" oldest_id = max(self.age, key=self.age.get) # Find the oldest item by age\n",
|
||||||
|
" print(f\"[{env.now:.2f}] Cache: Evicting oldest object {oldest_id} to make space at {self.ttl[oldest_id]:.2f}\")\n",
|
||||||
|
" del self.storage[oldest_id]\n",
|
||||||
|
" del self.ttl[oldest_id]\n",
|
||||||
|
" del self.age[oldest_id]\n",
|
||||||
|
"\n",
|
||||||
|
" def evict_random(self):\n",
|
||||||
|
" \"\"\"Remove a random item from the cache to make space.\"\"\"\n",
|
||||||
|
" random_id = np.random.choice(list(self.storage.keys())) # Select a random key from the cache\n",
|
||||||
|
" print(f\"[{env.now:.2f}] Cache: Evicting random object {random_id} to make space at {self.ttl[random_id]:.2f}\")\n",
|
||||||
|
" del self.storage[random_id]\n",
|
||||||
|
" del self.ttl[random_id]\n",
|
||||||
|
" del self.age[random_id]\n",
|
||||||
|
" \n",
|
||||||
|
" def refresh_object(self, obj_id):\n",
|
||||||
|
" \"\"\"Refresh the object from the database to keep it up-to-date. TTL is increased on refresh.\"\"\"\n",
|
||||||
|
" obj = self.db.get_object(obj_id)\n",
|
||||||
|
" self.storage[obj_id] = obj\n",
|
||||||
|
" if CACHE_TTL != 0:\n",
|
||||||
|
" self.ttl[obj_id] = env.now + CACHE_TTL\n",
|
||||||
|
" else:\n",
|
||||||
|
" self.ttl[obj_id] = 0\n",
|
||||||
|
" self.age[obj_id] = 0\n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Cache: Refreshed object {obj_id}\")\n",
|
||||||
|
" \n",
|
||||||
|
" def age_objects(self):\n",
|
||||||
|
" \"\"\"Increment age of each cached object.\"\"\"\n",
|
||||||
|
" for obj_id in list(self.age.keys()):\n",
|
||||||
|
" if CACHE_TTL != 0:\n",
|
||||||
|
" if self.ttl[obj_id] > env.now:\n",
|
||||||
|
" self.age[obj_id] += 1\n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Cache: Object {obj_id} aged to {self.age[obj_id]}\")\n",
|
||||||
|
" else:\n",
|
||||||
|
" # Remove object if its TTL expired\n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Cache: Object {obj_id} expired\")\n",
|
||||||
|
" del self.storage[obj_id]\n",
|
||||||
|
" del self.ttl[obj_id]\n",
|
||||||
|
" del self.age[obj_id]\n",
|
||||||
|
" else:\n",
|
||||||
|
" self.age[obj_id] += 1\n",
|
||||||
|
" \n",
|
||||||
|
" def record_cache_state(self):\n",
|
||||||
|
" \"\"\"Record the current cache state (number of objects in cache) over time.\"\"\"\n",
|
||||||
|
" self.cache_size_over_time.append((env.now, len(self.storage)))\n",
|
||||||
|
" self.cache_next_request_over_time.append((env.now, self.db.next_request.copy()))"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 5,
|
||||||
|
"id": "7286d498-aa6c-4efb-bb28-fe29736eab64",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def age_cache_process(env, cache):\n",
|
||||||
|
" \"\"\"Process that ages cache objects over time, removes expired items, and refreshes based on object-specific intervals.\"\"\"\n",
|
||||||
|
" while True:\n",
|
||||||
|
" cache.age_objects() # Age objects and remove expired ones\n",
|
||||||
|
"\n",
|
||||||
|
"\n",
|
||||||
|
" if MAX_REFRESH_RATE != 0:\n",
|
||||||
|
" # Refresh objects based on their individual refresh intervals\n",
|
||||||
|
" for obj_id in list(cache.storage.keys()):\n",
|
||||||
|
" # Check if it's time to refresh this object based on next_refresh\n",
|
||||||
|
" if env.now >= cache.next_refresh[obj_id]:\n",
|
||||||
|
" cache.refresh_object(obj_id)\n",
|
||||||
|
" # Schedule the next refresh based on the object's mu\n",
|
||||||
|
" cache.next_refresh[obj_id] = env.now + np.random.exponential(1/cache.db.mu_values[obj_id])\n",
|
||||||
|
" \n",
|
||||||
|
" cache.record_cache_state() # Record cache state at each time step\n",
|
||||||
|
" yield env.timeout(1) # Run every second\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 6,
|
||||||
|
"id": "687f5634-8edf-4337-b42f-bbb292d47f0f",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"def client_request_process(env, cache, event):\n",
|
||||||
|
" \"\"\"Client process that makes requests for objects from the cache.\"\"\"\n",
|
||||||
|
" last_print = 0\n",
|
||||||
|
" with tqdm(total=ACCESS_COUNT_LIMIT, desc=\"Progress\", leave=True) as pbar:\n",
|
||||||
|
" while True:\n",
|
||||||
|
" obj_id, next_request = min(cache.db.next_request.items(), key=lambda x: x[1])\n",
|
||||||
|
" yield env.timeout(next_request - env.now)\n",
|
||||||
|
" if (int(env.now) % 1) == 0 and int(env.now) != last_print:\n",
|
||||||
|
" last_print = int(env.now)\n",
|
||||||
|
" pbar.n = min(cache.access_count.values())\n",
|
||||||
|
" pbar.refresh()\n",
|
||||||
|
" if env.now >= next_request:\n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Client: Requesting object {obj_id}\")\n",
|
||||||
|
" cache.get(obj_id)\n",
|
||||||
|
" \n",
|
||||||
|
" # print(f\"[{env.now:.2f}] Client: Schedule next request for {obj_id}\")\n",
|
||||||
|
" next_request = env.now + np.random.exponential(1/cache.db.lambda_values[obj_id])\n",
|
||||||
|
" cache.request_log[obj_id].append(next_request)\n",
|
||||||
|
" cache.db.next_request[obj_id] = next_request\n",
|
||||||
|
" if all(access_count >= ACCESS_COUNT_LIMIT for access_count in cache.access_count.values()):\n",
|
||||||
|
" event.succeed()"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 7,
|
||||||
|
"id": "342d1932-94b5-4e0b-89b5-d4edaaccc59c",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": [
|
||||||
|
"configurations = {\n",
|
||||||
|
" \"default\": (DATABASE_OBJECTS, 10, CacheType.LRU, 5),\n",
|
||||||
|
" \"No Refresh\": (DATABASE_OBJECTS, 0, CacheType.LRU, 5),\n",
|
||||||
|
" \"Infinite TTL\": (int(DATABASE_OBJECTS / 2), 0, CacheType.LRU, 0),\n",
|
||||||
|
" \"Random Eviction\": (int(DATABASE_OBJECTS / 2), 10, CacheType.RANDOM_EVICTION, 5),\n",
|
||||||
|
" \"RE without Refresh\": (int(DATABASE_OBJECTS / 2), 0, CacheType.RANDOM_EVICTION, 5),\n",
|
||||||
|
" \"No Refresh (0.5s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 0.5),\n",
|
||||||
|
" \"No Refresh (1.0s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 1),\n",
|
||||||
|
" \"No Refresh (2.0s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 2),\n",
|
||||||
|
" \"No Refresh (3.0s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 3),\n",
|
||||||
|
" \"No Refresh (4.0s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 4),\n",
|
||||||
|
" \"No Refresh (5.0s ttl)\": (DATABASE_OBJECTS, 0, CacheType.LRU, 5),\n",
|
||||||
|
"}\n",
|
||||||
|
"experiments = configurations.keys()\n"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": 8,
|
||||||
|
"id": "6b9680ed-19bc-4f5b-8f22-95ffb319f068",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"data": {
|
||||||
|
"text/plain": [
|
||||||
|
"['No Refresh (0.5s ttl)',\n",
|
||||||
|
" 'No Refresh (1.0s ttl)',\n",
|
||||||
|
" 'No Refresh (2.0s ttl)',\n",
|
||||||
|
" 'No Refresh (3.0s ttl)',\n",
|
||||||
|
" 'No Refresh (4.0s ttl)',\n",
|
||||||
|
" 'No Refresh (5.0s ttl)']"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"execution_count": 8,
|
||||||
|
"metadata": {},
|
||||||
|
"output_type": "execute_result"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"experiments = [e for e in experiments if \"ttl)\" in e]\n",
|
||||||
|
"experiments"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "3ff299ca-ec65-453b-b167-9a0f7728a207",
|
||||||
|
"metadata": {
|
||||||
|
"scrolled": true
|
||||||
|
},
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"name": "stderr",
|
||||||
|
"output_type": "stream",
|
||||||
|
"text": [
|
||||||
|
"Progress: 69%|███████████████████████████████████ | 6876/10000 [00:40<00:18, 169.24it/s]"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"source": [
|
||||||
|
"%%time\n",
|
||||||
|
"for experiment_name in experiments:\n",
|
||||||
|
" config = configurations[experiment_name]\n",
|
||||||
|
"\n",
|
||||||
|
" CACHE_CAPACITY = config[0]\n",
|
||||||
|
" MAX_REFRESH_RATE = config[1]\n",
|
||||||
|
" cache_type = config[2]\n",
|
||||||
|
" CACHE_TTL = config[3]\n",
|
||||||
|
"\n",
|
||||||
|
" # Initialize simulation environment\n",
|
||||||
|
" env = simpy.Environment()\n",
|
||||||
|
"\n",
|
||||||
|
" # Instantiate components\n",
|
||||||
|
" db = Database()\n",
|
||||||
|
" cache = Cache(env, db, cache_type)\n",
|
||||||
|
" stop_event = env.event()\n",
|
||||||
|
"\n",
|
||||||
|
" # Start processes\n",
|
||||||
|
" env.process(age_cache_process(env, cache))\n",
|
||||||
|
" env.process(client_request_process(env, cache, stop_event))\n",
|
||||||
|
"\n",
|
||||||
|
" # Run the simulation\n",
|
||||||
|
" env.run(until=stop_event)\n",
|
||||||
|
"\n",
|
||||||
|
" statistics = []\n",
|
||||||
|
" # Calculate and print hit rate and average age for each object\n",
|
||||||
|
" for obj_id in range(1, DATABASE_OBJECTS + 1):\n",
|
||||||
|
" if cache.access_count[obj_id] != 0:\n",
|
||||||
|
" hit_rate = cache.hits[obj_id] / max(1, cache.access_count[obj_id]) # Avoid division by zero\n",
|
||||||
|
" avg_age = cache.cumulative_age[obj_id] / max(1, cache.hits[obj_id]) # Only average over hits\n",
|
||||||
|
" statistics.append({\"obj_id\": obj_id,\"hit_rate\": hit_rate,\"avg_age\": avg_age})\n",
|
||||||
|
"\n",
|
||||||
|
" stats = pd.DataFrame(statistics)\n",
|
||||||
|
" stats.to_csv(f\"{TEMP_BASE_DIR}/hit_age.csv\",index=False)\n",
|
||||||
|
" stats.drop(\"obj_id\", axis=1).describe().to_csv(f\"{TEMP_BASE_DIR}/overall_hit_age.csv\")\n",
|
||||||
|
"\n",
|
||||||
|
" avg_age = {\n",
|
||||||
|
" obj_id: cache.cumulative_age[obj_id] / max(1, cache.access_count[obj_id]) \n",
|
||||||
|
" for obj_id in range(1, DATABASE_OBJECTS + 1)\n",
|
||||||
|
" }\n",
|
||||||
|
"\n",
|
||||||
|
" hit_rate = {\n",
|
||||||
|
" obj_id: np.round((cache.hits[obj_id] / max(1, cache.access_count[obj_id]))*100,2) \n",
|
||||||
|
" for obj_id in range(1, DATABASE_OBJECTS + 1)\n",
|
||||||
|
" }\n",
|
||||||
|
" \n",
|
||||||
|
" access_count = pd.DataFrame.from_dict(cache.access_count, orient='index', columns=['access_count'])\n",
|
||||||
|
" hits = pd.DataFrame.from_dict(cache.hits, orient='index', columns=['hits'])\n",
|
||||||
|
" misses = pd.DataFrame.from_dict(cache.misses, orient='index', columns=['misses'])\n",
|
||||||
|
" mu = pd.DataFrame.from_dict(db.mu_values, orient='index', columns=['mu'])\n",
|
||||||
|
" lmbda = pd.DataFrame.from_dict(db.lambda_values, orient='index', columns=['lambda'])\n",
|
||||||
|
" hit_rate = pd.DataFrame.from_dict(hit_rate, orient='index', columns=['hit_rate'])\n",
|
||||||
|
" avg_age = pd.DataFrame.from_dict(avg_age, orient='index', columns=['avg_age'])\n",
|
||||||
|
" \n",
|
||||||
|
" merged = access_count.merge(hits, left_index=True, right_index=True).merge(misses, left_index=True, right_index=True)\\\n",
|
||||||
|
" .merge(mu, left_index=True, right_index=True).merge(lmbda, left_index=True, right_index=True)\\\n",
|
||||||
|
" .merge(hit_rate, left_index=True, right_index=True).merge(avg_age, left_index=True, right_index=True)\n",
|
||||||
|
" merged.to_csv(f\"{TEMP_BASE_DIR}/details.csv\", index_label=\"obj_id\")\n",
|
||||||
|
"\n",
|
||||||
|
" # Extract recorded data for plotting\n",
|
||||||
|
" times, cache_sizes = zip(*cache.cache_size_over_time)\n",
|
||||||
|
"\n",
|
||||||
|
" # Plot the cache size over time\n",
|
||||||
|
" plt.figure(figsize=(30, 5))\n",
|
||||||
|
" plt.plot(times, cache_sizes, label=\"Objects in Cache\")\n",
|
||||||
|
" plt.xlabel(\"Time (s)\")\n",
|
||||||
|
" plt.ylabel(\"Number of Cached Objects\")\n",
|
||||||
|
" plt.title(\"Number of Objects in Cache Over Time\")\n",
|
||||||
|
" plt.legend()\n",
|
||||||
|
" plt.grid(True)\n",
|
||||||
|
" plt.savefig(f\"{TEMP_BASE_DIR}/objects_in_cache_over_time.pdf\")\n",
|
||||||
|
"\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
"\n",
|
||||||
|
" from collections import Counter\n",
|
||||||
|
" # Count occurrences of each number\n",
|
||||||
|
" count = Counter(list(db.lambda_values.values()))\n",
|
||||||
|
"\n",
|
||||||
|
" # Separate the counts into two lists for plotting\n",
|
||||||
|
" x = list(count.keys()) # List of unique numbers\n",
|
||||||
|
" y = list(count.values()) # List of their respective counts\n",
|
||||||
|
"\n",
|
||||||
|
" # Plot the data\n",
|
||||||
|
" plt.figure(figsize=(8, 6))\n",
|
||||||
|
" plt.bar(x, y, color='skyblue')\n",
|
||||||
|
"\n",
|
||||||
|
" # Adding labels and title\n",
|
||||||
|
" plt.xlabel('Number')\n",
|
||||||
|
" plt.ylabel('Occurrences')\n",
|
||||||
|
" plt.title('Occurance of each lambda in db')\n",
|
||||||
|
" plt.savefig(f\"{TEMP_BASE_DIR}/lambda_distribution.pdf\")\n",
|
||||||
|
"\n",
|
||||||
|
" # Show the plot\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
"\n",
|
||||||
|
" # Plotting lambda against access_count.\n",
|
||||||
|
"\n",
|
||||||
|
" plt.figure(figsize=(8, 6))\n",
|
||||||
|
" plt.scatter(merged['lambda'], merged['access_count'], alpha=0.7, edgecolor='k')\n",
|
||||||
|
" plt.title('Lambda vs Access Count', fontsize=14)\n",
|
||||||
|
" plt.xlabel('Lambda', fontsize=12)\n",
|
||||||
|
" plt.ylabel('Access Count', fontsize=12)\n",
|
||||||
|
" plt.grid(alpha=0.3)\n",
|
||||||
|
"\n",
|
||||||
|
" plt.savefig(f\"{TEMP_BASE_DIR}/lambda_vs_access_count.pdf\")\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
"\n",
|
||||||
|
" from collections import Counter\n",
|
||||||
|
" # Count occurrences of each number\n",
|
||||||
|
" count = Counter(np.array(list(db.mu_values.values())).round(0))\n",
|
||||||
|
"\n",
|
||||||
|
" # Separate the counts into two lists for plotting\n",
|
||||||
|
" x = list(count.keys()) # List of unique numbers\n",
|
||||||
|
" y = list(count.values()) # List of their respective counts\n",
|
||||||
|
"\n",
|
||||||
|
" # Plot the data\n",
|
||||||
|
" plt.figure(figsize=(8, 6))\n",
|
||||||
|
" plt.bar(x, y, color='skyblue')\n",
|
||||||
|
"\n",
|
||||||
|
" # Adding labels and title\n",
|
||||||
|
" plt.xlabel('Number')\n",
|
||||||
|
" plt.ylabel('Occurrences')\n",
|
||||||
|
" plt.title('Occurance of each mu in db (rounded)')\n",
|
||||||
|
"\n",
|
||||||
|
" # Show the plot\n",
|
||||||
|
" plt.show()\n",
|
||||||
|
"\n",
|
||||||
|
" os.makedirs(EXPERIMENT_BASE_DIR, exist_ok=True)\n",
|
||||||
|
" folder_name = experiment_name.replace(\" \", \"_\").replace(\"(\", \"\").replace(\")\", \"\").replace(\".\", \"_\")\n",
|
||||||
|
" folder_path = os.path.join(EXPERIMENT_BASE_DIR, folder_name)\n",
|
||||||
|
" os.makedirs(folder_path, exist_ok=True)\n",
|
||||||
|
"\n",
|
||||||
|
" file_names = os.listdir(TEMP_BASE_DIR)\n",
|
||||||
|
"\n",
|
||||||
|
" for file_name in file_names:\n",
|
||||||
|
" shutil.move(os.path.join(TEMP_BASE_DIR, file_name), folder_path)\n",
|
||||||
|
"\n",
|
||||||
|
" del env\n",
|
||||||
|
" del cache\n",
|
||||||
|
" del db"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cell_type": "code",
|
||||||
|
"execution_count": null,
|
||||||
|
"id": "b0827d71-e5bd-4303-b806-a19e17b28855",
|
||||||
|
"metadata": {},
|
||||||
|
"outputs": [],
|
||||||
|
"source": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"metadata": {
|
||||||
|
"kernelspec": {
|
||||||
|
"display_name": "graphs",
|
||||||
|
"language": "python",
|
||||||
|
"name": "graphs"
|
||||||
|
},
|
||||||
|
"language_info": {
|
||||||
|
"codemirror_mode": {
|
||||||
|
"name": "ipython",
|
||||||
|
"version": 3
|
||||||
|
},
|
||||||
|
"file_extension": ".py",
|
||||||
|
"mimetype": "text/x-python",
|
||||||
|
"name": "python",
|
||||||
|
"nbconvert_exporter": "python",
|
||||||
|
"pygments_lexer": "ipython3",
|
||||||
|
"version": "3.12.7"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nbformat": 4,
|
||||||
|
"nbformat_minor": 5
|
||||||
|
}
|
||||||
49
note.md
49
note.md
@@ -42,38 +42,45 @@ miss requests and cache updates should not go over the bandwidth
|
|||||||
|
|
||||||
### Two versions
|
### Two versions
|
||||||
|
|
||||||
1.
|
- [x] Default
|
||||||
|
|
||||||
- Do Refresh
|
- Do Refresh
|
||||||
- Do Request
|
- Do Request
|
||||||
|
|
||||||
2.
|
- [x] No Refresh
|
||||||
|
|
||||||
- Just Request
|
- Just Request
|
||||||
- No Refresh
|
- No Refresh
|
||||||
|
|
||||||
3.
|
- [x] Infinite TTL
|
||||||
|
|
||||||
- LRU
|
- LRU
|
||||||
- Infinite TTL
|
- Infinite TTL
|
||||||
- No Refresh
|
- No Refresh
|
||||||
|
|
||||||
4.
|
- [x] Random Eviction
|
||||||
|
|
||||||
- Random eviction
|
- Random eviction
|
||||||
- Regular TTL
|
- Regular TTL
|
||||||
- With Refresh
|
- With Refresh
|
||||||
|
|
||||||
5.
|
|
||||||
|
|
||||||
- Random eviction
|
|
||||||
- Regular TTL
|
|
||||||
- Without Refresh
|
|
||||||
|
|
||||||
|
- [x] Random Eviction w/o Refresh
|
||||||
|
- Random eviction
|
||||||
|
- Regular TTL
|
||||||
|
- No Refresh
|
||||||
|
|
||||||
|
| Name | Cache Capacity | MAX_REFRESH_RATE | cache_type | CACHE_TTL |
|
||||||
|
| -------------------- | -------------------- | ---------------- | ------------------------- | --------- |
|
||||||
|
| Default | DATABASE_OBJECTS | 1< | CacheType.LRU | 5 |
|
||||||
|
| No Refresh | DATABASE_OBJECTS | 0 | CacheType.LRU | 5 |
|
||||||
|
| Infinite TTL | DATABASE_OBJECTS / 2 | 0 | CacheType.LRU | 0 |
|
||||||
|
| Random Eviction (RE) | DATABASE_OBJECTS / 2 | 1< | CacheType.RANDOM_EVICTION | 5 |
|
||||||
|
| RE without Refresh | DATABASE_OBJECTS / 2 | 0 | CacheType.RANDOM_EVICTION | 5 |
|
||||||
|
|
||||||
### Runtime
|
### Runtime
|
||||||
|
|
||||||
CPU times: user 3min 46s, sys: 43 s, total: 4min 29s
|
CPU times: user 3min 46s, sys: 43 s, total: 4min 29s
|
||||||
Wall time: 4min 29s
|
Wall time: 4min 29s
|
||||||
for ACCESS_COUNT_LIMIT = 10_000 # Total time to run the simulation
|
for ACCESS_COUNT_LIMIT = 10_000 # Total time to run the simulation
|
||||||
|
|
||||||
|
## Notes 11/27/2024
|
||||||
|
|||||||
Reference in New Issue
Block a user