-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Simulator
Ben Manes edited this page Jan 18, 2021
·
42 revisions
The simulator includes a family of eviction policies and distribution generators. This helps when investigating whether a policy is a good fit for a usage scenario.
Run the Simulator in an IDE after specifying the desired configuration. Alternatively, run at the command line using gradlew simulator:run
. The following trace formats are supported.
Traces | Location | Traces | Location |
---|---|---|---|
AdaptSize | author's simulator | Address (UCSD) | git repository |
ARC | author's homepage | Cache2k | git repository |
CameLab | project's homepage | Corda | git repository |
Gradle | git repository | Kaggle | project's homepage |
LIRS | git repository | LRB | author's simulator |
Scarab | git repository | SNIA | project's homepage |
project's homepage | UMass | project's homepage | |
WikiBench | project's homepage |
The rewriter utility converts traces from one format to another. This can be helpful when comparing a policy written in an alternative simulator that lacks support for a trace format.
gradlew :simulator:rewrite -PinputFormat=? -PinputFiles=? -PoutputFormat=? -PoutputFile=?
Due to batching and broadcasting, the timings are only comparable when running each policy independently.
╔══════════════════════╤══════════╤════════╤════════╤══════════╤═══════════╤══════════════════╤══════════╗
║ Policy │ Hit rate │ Hits │ Misses │ Requests │ Evictions │ Steps │ Time ║
╠══════════════════════╪══════════╪════════╪════════╪══════════╪═══════════╪══════════════════╪══════════╣
║ opt.Clairvoyant │ 58.79 % │ 9,323 │ 6,535 │ 15,858 │ 6,035 │ ? │ 278.0 ms ║
╟──────────────────────┼──────────┼────────┼────────┼──────────┼───────────┼──────────────────┼──────────╢
║ sketch.WindowTinyLfu │ 56.11 % │ 8,898 │ 6,960 │ 15,858 │ 6,460 │ 15,858 (100 %) │ 315.2 ms ║
╟──────────────────────┼──────────┼────────┼────────┼──────────┼───────────┼──────────────────┼──────────╢
║ irr.Lirs │ 55.97 % │ 8,876 │ 6,982 │ 15,858 │ 6,482 │ 27,689 (174 %) │ 311.0 ms ║
╟──────────────────────┼──────────┼────────┼────────┼──────────┼───────────┼──────────────────┼──────────╢
║ adaptive.Arc │ 49.39 % │ 7,833 │ 8,025 │ 15,858 │ 7,525 │ 15,858 (100 %) │ 166.3 ms ║
╟──────────────────────┼──────────┼────────┼────────┼──────────┼───────────┼──────────────────┼──────────╢
║ linked.Lru │ 46.51 % │ 7,375 │ 8,483 │ 15,858 │ 7,983 │ 15,858 (100 %) │ 128.2 ms ║
╟──────────────────────┼──────────┼────────┼────────┼──────────┼───────────┼──────────────────┼──────────╢
║ linked.Fifo │ 40.72 % │ 6,457 │ 9,401 │ 15,858 │ 8,901 │ 15,858 (100 %) │ 163.6 ms ║
╚══════════════════════╧══════════╧════════╧════════╧══════════╧═══════════╧══════════════════╧══════════╝