-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Simulator zh CN
Ben Manes edited this page Dec 16, 2021
·
19 revisions
模拟器中包含一系列的驱逐策略和数据分发生成器。这将帮助我们了解各个驱逐策略是否适合使用场景。
在配置完所需要的 配置之后,在IDE中运行模拟器。或者也可以选择在命令行中使用:
# Single run, displays ascii table by default
gradlew simulator:run -q
# Multiple runs, writes to a combined file
gradlew simulator:simulate -q \
--maximumSize=<comma separated list; supports _ numeric literal> \
--format=<csv, tsv>
# In both, additional configuration may be supplied as system properties
-Dcaffeine.simulator.files.paths.0=multi3.trace.gz
命令。支持以下几种追踪格式:
仓库 | 位置 | 仓库 | 位置 |
---|---|---|---|
AdaptSize | author's simulator | Address (UCSD) | git repository |
ARC | author's homepage | Cache2k | git repository |
CameLab | project's homepage | Cloud Physics | git repository, lirs2 drive |
Corda | git repository | Gradle | git repository |
Kaggle | project's homepage | LIRS | git repository |
LRB | author's simulator | Scarab | git repository |
SNIA | project's homepage | Tragen | project's homepage |
project's homepage | UMass | project's homepage | |
WikiBench | project's homepage |
由于批处理和数据广播的原因,时间指标只有在独立运行各个策略的时候才有比较的价值。
╔══════════════════════╤══════════╤════════╤════════╤══════════╤═══════════╤══════════════════╤══════════╗
║ 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 ║
╚══════════════════════╧══════════╧════════╧════════╧══════════╧═══════════╧══════════════════╧══════════╝