diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae8959b..c9adf62 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,12 +67,8 @@ jobs: go run . -strategy=$strategy -epoch=1 -smoke done - # Two things block a release and show up in no other check: a module missing - # its licence, and a sibling required at a placeholder version. The second is - # invisible locally, because a replace directive resolves it - and replace - # directives are ignored by anyone consuming the module, so the first person - # to find out is a stranger whose `go get` fails. Neither build, test nor - # lint can see either one. + # Build tracked candidate sources through a temporary module proxy with + # GOWORK=off and fresh consumer caches. External dependencies need network. release-check: name: release-check runs-on: ubuntu-latest @@ -82,5 +78,4 @@ jobs: with: go-version: "1.25" cache-dependency-path: go.sum - # Reads each go.mod through `go mod edit -json`, so no network is needed. - - run: ./scripts/release-check.sh + - run: make python-check script-test evidence-check release-check diff --git a/.gitignore b/.gitignore index 1e1be74..7c24d03 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,9 @@ traces/ cluster0* .DS_Store +# libCacheSim, built by scripts/verify-ref.sh at a pinned commit +.tools/ + # Working material that is not part of the library. These files stay on # disk -- they are the working notes and the article's exhibits -- but the # repository does not ship them. Documentation a reader or an agent should @@ -22,3 +25,7 @@ codemaps/ .reports/ .vscode/ metrics/zzz_refute_probe_test.go + +# Python release-check test bytecode and local Go workspace checksums +__pycache__/ +go.work.sum diff --git a/CHANGELOG.md b/CHANGELOG.md index cab8cc3..f17f5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,123 +4,77 @@ All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and from v0.1.0 the project follows [semantic versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [Unreleased] — v0.4.0 candidate + +### Removed + +- The rendered social-preview image (`site/og.png`) and image-card metadata. + The site uses a summary card while evidence materials show the current version. + +- **Breaking API change:** removed the distributed bandit and the + `bandit/redis` module. This includes `Distributed`/`NewDistributed`, `Config`, + `Mode`, `EvidenceMode`, `MemStore`/`NewMemStore`, `Store`, `Bucket`, `Role`, + `ArmKey`, `ArmCounts`, `SyncRequest`, `SyncResult`, `WindowCounts`, + `ArmEvidence`, `Snapshot`, and their coordination constants and errors: + `ModeLeader`, `ModeSharedPosterior`, `EvidenceAll`, `EvidenceShadowOnly`, + `RoleShadow`, `RoleActive`, `DefaultWindow`, `DefaultDecay`, + `DefaultLocalDiscount`, `DefaultJitter`, `DefaultMaxEvidence`, `ErrNilStore`, + `ErrInvalidCoordinationEpoch`, `ErrInvalidWindow`, `ErrInvalidDecay`, + `ErrInvalidJitter`, `ErrEmptyNamespace`, `ErrShadowOnlyUnderLeader`. + Redis `Options`, `Store` and `New` are removed with that module. Local + `Thompson` and `Greedy` remain. No replacement fleet package is published by + this release; users of the old API must retain the v0.3.1 module family. +- Fleet benchmarks, Redis examples and the unused stitchfix bandit dependency. + Examples now use the repository's native bandits. + +### Changed + +- Bandit callbacks run outside the cache mutex, remain serialized separately, + and stale epoch results are discarded. A slow callback no longer holds the + cache lock; concurrent traffic can advance while selection is in progress. +- Eight published modules use consistent v0.4.0 sibling requirements without + local `replace` directives. A development `go.work` joins the repository's + modules. Release checks now build each module through an isolated external + consumer; a separate check verifies real versions after publication. +- `Keys()` ordering is explicitly policy-specific. Migration documentation + now describes the limits of preserving order across policies. +- Documentation and the site now describe adaptive selection as experimental, + with measured limitations and workload-dependent results. The historical + explorer dataset is removed; final materials show only current measurements. + +### Fixed + +- Shadow reads now insert missed keys even when the active policy hits. Add + fan-out avoids counting that fill twice, so shadow statistics represent the + policy's own read-through behavior. +- Gradual migration excludes its source from shadow filling, preventing zero + placeholder values from being promoted and returned as real cached data. +- Zero-traffic stability gates, request-counted epoch progress, request + attribution across epochs now have corrected behavior and regression tests. +- Evidence now measures misses immediately after a switch; TTL documentation + makes clear that expiry still uses wall time in request-counted replays. ### Added -- **Bug fix: a gradual migration could serve a shadow's zero value as real - data.** While a `MigrationGradual` window is open the source policy is - deliberately not demoted - it holds the only copy of every value not yet - promoted - but it is also not the active policy, so the shadow read fan-out - filled it with zero values on a miss. `promoteLocked` reads those values back - with `Peek`, which cannot tell a zero somebody wrote from a real value still - pending, so the zero was promoted into the active policy and returned to the - caller as a hit. The fan-out now skips the migration source until its window - closes. Reachable whenever the working set exceeds the capacity during a - window; a test whose working set exactly fits never evicts and so could not - catch it, which is why the existing gradual-migration test did not. - -- **Bug fix: shadow policies could only acquire keys the active policy had - missed**, which made every shadow measurement unreliable whenever the active - policy was performing well, and inverted it outright behind a strong one. - `AdaptiveCache.get` fanned out only `Get` to the shadows; the sole insert - path was the caller's `Add`, which a read-through caller makes only on an - active-policy miss. Measured on a cyclic workload with a 94%-hit incumbent, - arms that truly serve 0.00% were reported above 90%, and `Advice()` - recommended switching from the best arm to the worst. A shadow that misses - now fills itself, and the `Add` fan-out skips keys a shadow already holds so - the fill is not double-counted as an access. - - Every measured number in `docs/evidence.md` was re-run. Adaptive selection - now beats the best fixed policy on **two of the six real traces** rather - than one: LIRS `loop` moved from -7.45 points to +0.12, while P3's margin - shrank from +1.13 to +0.05. The synthetic conclusion is unchanged - on - those five workloads it still never beats the best fixed policy. - - `TestShadowsMeasureWhatThePolicyWouldActuallyServe` pins the property that - was missing: a shadow's measured hit rate must equal the same policy - replayed standalone. Every deterministic arm now matches to within 0.005. - -- **S3-FIFO and SIEVE arms** (`policies/fifo`, `ascache.S3FIFO` and - `ascache.SIEVE`) - a new module adapting - [scalalang2/golang-fifo](https://github.com/scalalang2/golang-fifo) v1.2.0 - (MIT), kept separate so that dependency stays out of builds that do not use - these arms. - - **S3-FIFO** uses three static FIFO queues: a small queue holding a tenth of - the cache filters keys requested only once, a ghost queue remembers what it - evicted so a returning key is admitted on its second request rather than - its third, and the main queue evicts by FIFO-reinsertion over a counter - capped at three. Cite: Yang, Zhang, Qiu, Yue & Rashmi, *FIFO Queues are All - You Need for Cache Eviction*, SOSP '23. - - **SIEVE** uses one FIFO queue and a hand that sweeps it, evicting the first - entry it reaches that has not been visited since the hand last passed and - clearing the visited bit of every entry it steps over. No ghost queue, no - counters, no second queue. Cite: Zhang, Yang, Yue, Vigfusson & Rashmi, - *SIEVE is Simpler than LRU*, NSDI '24. - - Both are deterministic and neither reorders anything on a hit. They share one - module and one adapter because they come from one dependency and need the - same four missing methods supplied; giving each its own module would have - duplicated ~300 lines of deadlock-sensitive glue. -- **`benchclient.DefaultArms` now includes S3-FIFO.** The set exists to be - deterministic and unencumbered, and S3-FIFO is both. This changes the arms a - replay through `benchclient` runs, and therefore its numbers. SIEVE is - deliberately not in it: arms are not free, each one thins the evidence every - other arm gets per epoch, and a default set is the wrong place to add a - second policy from the same family. -- **MSR Cambridge trace loader** (`bench.LoadMSRTrace`). Reads the SNIA IOTTA - block I/O layout `Timestamp,Hostname,DiskNumber,Type,Offset,Size,ResponseTime`, - expanding each record's byte length into the block accesses it covers and - namespacing keys by host and disk. Reads only by default; `IncludeWrites` - models a write-back cache instead. `BlockSize` defaults to 512, matching the - Caffeine simulator's reader so numbers are comparable with what is published - from it. -- **Meta kvcache trace loader** (`bench.LoadMetaKVTrace`). Reads the CacheBench - workloads, locating columns by name so both the 2022 layout - (`key,op,size,op_count,key_size`) and the 2024 one (which reordered them and - added five) are read correctly. Expands `op_count`, which is a repeat count - and not a sequence number. -- **`scripts/fetch-traces.sh` fetches a slice of the Meta trace** over a plain - HTTPS byte-range request - the published files are 5 to 10 GB and need no AWS - credentials to read partially. `AS_CACHE_META_BYTES` sets the size. -- **Trace-loader tests run in `make test`**, not only under `make evidence`. - Pinned against fixtures copied from the real files: a format misread is a - correctness bug that produces a plausible-looking workload, and every number - taken from it is wrong. - -### Notes - -- **MSR Cambridge cannot be fetched by script.** SNIA serves the files behind a - click-through licence and a cookie check, so `fetch-traces.sh` prints how to - get them by hand rather than pretending to download them. Any file named - `msr_.csv[.gz]` in the trace directory is picked up automatically. -- **S3-FIFO's ghost queue and the adapter's index both cost memory.** The ghost - queue remembers roughly as many keys as the cache holds, and the adapter - keeps its own copy of the key set on top of that. Values are never - duplicated. The measured total is in - [evidence](docs/evidence.md#memory-and-per-operation-cost). -- **The S3-FIFO adapter pays for four methods `golang-fifo` does not have**: - `Keys`, `Values`, `Resize`, `Cap`, and `Add`'s evicted flag. The costs are - documented on the package and worth reading before quoting this arm's - numbers. The largest is `Resize`, which rebuilds the cache and therefore - discards the ghost queue and every frequency counter - and `AdaptiveCache` - resizes a policy on every promotion and demotion. The adapter also keeps a - second copy of the key set, because the library cannot enumerate its own - contents. -- **Three upstream behaviours the adapter works around.** The eviction callback - runs under the library's mutex, so the adapter's callback must not take its - own lock (it would deadlock; this is why the adapter always builds with a TTL - of zero and therefore no expiry goroutine). S3-FIFO's `Len()` takes no lock, - so the adapter answers `Len` from its own index for both algorithms rather - than depending on which is wrapped. And neither can be built at size zero - - SIEVE panics, S3-FIFO loops waiting to evict from an empty cache and never - returns - so both constructors reject a non-positive size and return an - error, matching `NewLRU`, `NewLFU` and `NewTwoQueue`. An arm built at zero - would accept nothing and report no hits for its whole life, which is a silent - no-op rather than a policy. Resizing an existing cache to zero stays legal, - since `AdaptiveCache.Resize` passes its own capacity through to every arm. -- **Upstream counts a write as an access** for both algorithms - `Set` over a - live key raises S3-FIFO's frequency counter and sets SIEVE's visited bit - - which neither paper does. Shadow policies are driven with `Add`, so these - arms look more used on shadow duty than they should. +- `Settings.MigrationMaxRequests` bounds a gradual migration window by request + count. The default zero retains unlimited request count; see configuration + for its interaction with the existing migration limits. +- MSR Cambridge block-I/O and Meta kvcache trace loaders, fetch support, format + fixtures and independent LRU calibration against pinned libCacheSim. +- Generated [current results](bench/results/current/README.md) with input/output + hashes, sixty LRU calibration points and three consecutive evidence runs. + The tables retain all outcomes, ties, workload context and effective sampling; + they do not assert that adaptive selection always beats the worst fixed policy. +- An offline ObserveOnly sweep on all twelve traces, an object/byte-capacity + comparison for Meta, independent SIEVE diagnostics, and repeated P3 tuning + with request-counted epochs. Raw wall-clock timings are not product claims. +- Experimental S3-FIFO and SIEVE adapters in repository source and the research + suite, planned for v0.5. **The FIFO module is excluded from v0.4.0 publication.** + `benchclient.DefaultArms` retains the four released arms from v0.3.1: + LRU, LFU, 2Q and Random. Random is nondeterministic. + +See [releasing and upgrading](docs/releasing.md) for the module set, checks and +publication procedure. ## [0.3.1] diff --git a/Makefile b/Makefile index 6aea1a5..722823e 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ MODULES := . lfu policies policies/arc policies/fifo policies/tinylfu metrics ba GOLANGCI_LINT_VERSION := v2.8.0 .PHONY: all -all: fmt vet lint test release-check ## Format, vet, lint, test and check releasability +all: fmt vet lint test python-check script-test evidence-check release-check ## Format, vet, lint, test and check releasability .PHONY: lint lint: ## Run golangci-lint across all modules @@ -43,19 +43,29 @@ test: ## Run tests with the race detector across all modules done .PHONY: release-check -release-check: ## Check the repository could actually be released today +release-check: release-check-test ## Build eight candidate modules as external consumers @./scripts/release-check.sh +.PHONY: release-check-test +release-check-test: ## Test the release checker against broken module fixtures + @python3 -m unittest discover -s scripts -p 'release_check_test.py' + +.PHONY: release-check-published +release-check-published: ## Verify actual published tags (only after publication) + @./scripts/release-check.sh --published + .PHONY: evidence -evidence: ## Replay the workload suite and print the policy comparison tables - ( cd bench && go test -count=1 -timeout 20m -v ./... ) +evidence: ## Verify all 13 pinned trace files and replay the complete workload suite + @python3 scripts/trace_inputs.py "$${AS_CACHE_TRACES:?set AS_CACHE_TRACES}" + ( cd bench && go test -count=1 -timeout 45m -v ./... ) + +.PHONY: verify-ref +verify-ref: ## Calibrate the trace loaders and LRU against libCacheSim (needs AS_CACHE_TRACES) + @./scripts/verify-ref.sh .PHONY: tidy tidy: ## Run go mod tidy across all modules - @set -e; for m in $(MODULES); do \ - echo "==> tidy $$m"; \ - ( cd $$m && go mod tidy ); \ - done + @python3 scripts/tidy.py .PHONY: install-tools install-tools: ## Install golangci-lint at the pinned version @@ -65,3 +75,19 @@ install-tools: ## Install golangci-lint at the pinned version help: ## Show this help @grep -hE '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-14s\033[0m %s\n", $$1, $$2}' + +.PHONY: python-check +python-check: ## Lint and check formatting with pinned Ruff + @./scripts/python-check.sh + +.PHONY: script-test +script-test: ## Check trace integrity and simulator export regressions + @python3 -m unittest discover -s scripts -p '*_test.py' + +.PHONY: measure-bytes +measure-bytes: ## Compare Meta LRU with object and byte capacities + @python3 scripts/measure_bytes.py "$${AS_CACHE_TRACES:?set AS_CACHE_TRACES}" "$${AS_CACHE_BYTES_OUT:?set AS_CACHE_BYTES_OUT}" + +.PHONY: evidence-check +evidence-check: ## Verify retained evidence and generated tables without rerunning measurements + @python3 -B scripts/record_evidence.py --verify bench/results/current diff --git a/README.md b/README.md index 481eb98..c7f4bcd 100644 --- a/README.md +++ b/README.md @@ -5,31 +5,35 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/sshaplygin/as-cache)](https://goreportcard.com/report/github.com/sshaplygin/as-cache) [![License: MPL 2.0](https://img.shields.io/badge/License-MPL_2.0-brightgreen.svg)](LICENSE) -Choosing a cache eviction policy is a decision most projects make once, from -intuition, and never revisit. The trouble is that the right answer depends on -traffic you have not seen yet, and it is not stable: replayed against six -published traces, **four different policies win**, and the strongest -general-purpose baseline of them all comes near the bottom on one. Guessing -wrong is not a rounding error either — on one of those traces seven of the nine -policies here serve **0.0%** while one serves 45%. - -as-cache makes the choice at runtime instead. One policy is **active** and -serves every request. The others run as **shadows**: they see each key but -never its value, and answer "would I have had this?" Once per epoch every arm -reports its hit rate, a multi-armed bandit names the winner, and the cache -switches to it — unconditionally by default, or subject to [stability -gates](docs/configuration.md#keeping-switches-stable) you opt into. There is also an observe-only mode -where nothing ever switches and the library simply tells you which policy your -traffic wants — often the more useful half of it. - -It is pre-1.0, the API may still change, and nothing here has run in production -that I know of. What it does have is measurement: every number in these -documents comes from a run you can repeat with `make evidence`, over published -traces and generated workloads both, and the two arms whose results do not -repeat exactly are named wherever their numbers appear. The concurrency has -been exercised under the race detector and adversarially reviewed. It is all in -[the evidence](docs/evidence.md), so you do not have to take "experimental" or -"production-ready" on trust. +as-cache is an experimental Go library for studying adaptive cache-policy +selection. For a general-purpose production cache, start with **otter or +theine**; see the [measured comparison](docs/evidence.md#how-does-it-compare-with-other-go-cache-libraries). + +The best eviction policy depends on the workload. Across twelve published +trace workloads, different fixed policies lead. This library measures that +choice at runtime: one policy is **active** and serves requests, while the +others run as **shadows** that track keys and eviction state without payload +values. Once per epoch a multi-armed bandit selects a policy. Switching is +unconditional by default; optional [stability gates](docs/configuration.md#keeping-switches-stable) +can restrict it. + +Measurement does not guarantee an improvement or a floor relative to a fixed +policy. The [current results](bench/results/current/README.md) report repeated +observations, small margins and ties, effective sampling, an object/byte +comparison and an offline [ObserveOnly](docs/advisor-mode.md) sweep. ObserveOnly +collects advice while keeping the configured policy active. Its final choices +are compared retrospectively with standalone policy medians; those differences +do not measure a serving loss from following advice. + +It is pre-1.0, the API may change, and production use has not been established. +The repository includes nine policy arms; S3-FIFO and SIEVE are experimental +adapters planned for v0.5; their module is excluded from v0.4. The +[evidence](docs/evidence.md) links to raw results, input checksums and the +measured revision. Reproduce the dataset with the +[three-batch recorder](docs/benchmarking.md#saved-baseline); `make evidence` runs +one diagnostic batch. Random sampling, Random and asynchronous W-TinyLFU mean +some numbers vary between runs. `make evidence-check` verifies the retained +measurements and exact generated tables without rerunning the experiments. ## Documentation @@ -42,7 +46,8 @@ been exercised under the race detector and adversarially reviewed. It is all in | [Advisor mode](docs/advisor-mode.md) | `ObserveOnly`, `Advice()`, and the `metrics` module | | [Evidence](docs/evidence.md) | Every measured claim: policy tables, competing libraries, real traces, sampling fidelity | | [Benchmarking](docs/benchmarking.md) | Reproducible replays, `benchclient`, `make evidence` | -| [Project site](https://sshaplygin.github.io/as-cache/) | Landing page, plus an interactive explorer of the bandit's decisions on a phase-shift run | +| [Releasing](docs/releasing.md) | Development workspace, candidate checks, publication and upgrade notes | +| [Project site](https://sshaplygin.github.io/as-cache/) | Project overview and documentation | Past releases are recorded in the [changelog](CHANGELOG.md) and on the [releases page](https://github.com/sshaplygin/as-cache/releases). diff --git a/bandit/go.mod b/bandit/go.mod index 716d6dd..065dc3d 100644 --- a/bandit/go.mod +++ b/bandit/go.mod @@ -3,7 +3,7 @@ module github.com/sshaplygin/as-cache/bandit go 1.25.2 require ( - github.com/sshaplygin/as-cache v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 github.com/stretchr/testify v1.11.1 ) @@ -12,5 +12,3 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => .. diff --git a/bench/competitor_test.go b/bench/competitor_test.go index ff4bf43..987a858 100644 --- a/bench/competitor_test.go +++ b/bench/competitor_test.go @@ -81,15 +81,11 @@ func TestAgainstOtherLibraries(t *testing.T) { } } -// TestRistrettoSetIsLossy records why ristretto's hit rate in the table above -// is not a like-for-like eviction comparison, so nobody has to rediscover it -// from a surprising number. -// -// Its Set is asynchronous and admission-gated: it can return having queued -// nothing at all. Filling a cache well under its capacity and immediately -// reading the keys back should be a hit on any conventional cache; here it is -// not. -func TestRistrettoSetIsLossy(t *testing.T) { +// TestRistrettoImmediateVisibility records the read-after-write behavior of +// asynchronous, admission-gated Set. Depending on scheduling, any number of the +// queued writes may be visible by the time they are read, including all of them. +// The count is a diagnostic; every value that is returned must still be correct. +func TestRistrettoImmediateVisibility(t *testing.T) { if testing.Short() { t.Skip("evidence run; use make evidence") } @@ -115,28 +111,22 @@ func TestRistrettoSetIsLossy(t *testing.T) { found := 0 for i := range written { - if _, ok := cache.Get(strconv.Itoa(i)); ok { + if value, ok := cache.Get(strconv.Itoa(i)); ok { + assert.Equal(t, i, value, "value associated with key %d", i) found++ } } t.Logf("ristretto retained %d/%d keys written into a cache of %d", found, written, size) - assert.Less(t, found, written, - "if this ever passes with every key present, ristretto's Set became synchronous "+ - "and the caveat documented on the adapter should be revisited") } // TestCompetitorCapacityHonesty guards the assumption every hit-rate number in // this file rests on: a cache asked to hold N entries holds about N. // -// It exists because otter did not. Admission runs on the caller's goroutine -// and eviction on a maintenance pass, so a replay that writes flat out leaves -// the cache far over its limit - 1916 entries resident against a MaximumSize -// of 500, measured here. Every otter number in the first version of this -// comparison was therefore a cache four times the size of its rivals, which -// read as a decisive win on uniform traffic (44% against everyone else's 10%) -// and was nothing but the extra capacity. The adapter calls CleanUp; this test -// fails if that stops working, or if another library develops the same habit. +// Asynchronous admission/eviction can let a write flood exceed nominal capacity. +// This test checks the configured adapters after that distinct workload; it does +// not measure resident entries during the zipf/loop/uniform hit-rate replays. +// The otter adapter calls CleanUp to finish pending maintenance. func TestCompetitorCapacityHonesty(t *testing.T) { if testing.Short() { t.Skip("evidence run; use make evidence") @@ -145,12 +135,9 @@ func TestCompetitorCapacityHonesty(t *testing.T) { const ( size = 500 written = 5000 - // Half over is slack, not indifference. Approximate accounting is - // normal here and varies run to run: over five runs theine held - // between 500 and 604 entries (up to 1.21x), ristretto 518 to 540, - // sturdyc 476 every time, otter exactly 500 once CleanUp is called. - // A threshold set at the top of that spread would flake; this one sits - // clear of it and still fails the 3.8x that prompted the test. + // Approximate accounting permits slack, but a sustained excess above + // 1.5 times the requested size invalidates this comparison. Current + // observed counts are retained in each evidence log, not copied here. tolerance = 1.5 ) diff --git a/bench/competitors.go b/bench/competitors.go index 67ba396..32d7e62 100644 --- a/bench/competitors.go +++ b/bench/competitors.go @@ -51,23 +51,12 @@ func Competitors() []CompetitorBuilder { // // # Why this calls CleanUp // -// otter admits on the caller's goroutine and evicts on a maintenance pass, so -// under a replay that writes as fast as it can, admission runs far ahead of -// eviction. Measured: 5000 keys written into a cache built with MaximumSize -// 500 left 1916 of them retrievable, and the cache only fell back to 500 once -// maintenance had run. -// -// Left alone, that does not measure otter's policy at capacity 500. It -// measures a cache roughly four times the size every other subject was given, -// and it wins comparisons on that basis alone - which is exactly the sort of -// result that looks like a finding and is an artifact. CleanUp forces the -// pending work through, so the capacity in the table is the capacity being -// compared. -// -// The cost lands in the ns/op column, and it is real: nobody runs otter this -// way in production, where the maintenance pass keeps up because the workload -// is not a tight loop. Read otter's hit rate here as a policy comparison and -// its timing as a floor, not as its throughput. +// Admission and eviction are asynchronous, so a tight write replay can outrun +// maintenance. CleanUp drains pending work before a result is compared. The +// separate capacity-honesty test records retained entries after a write flood; +// it does not establish occupancy or a causal hit-rate advantage on other replays. +// This forced maintenance also affects timings, which are raw diagnostics for +// this harness rather than estimates of production throughput. type otterCompetitor struct { cache *otter.Cache[string, int] } @@ -120,12 +109,11 @@ func (c *theineCompetitor) Add(key string, value int) bool { // Two things about ristretto make its number here worth reading carefully, and // both are properties of the library rather than of this harness. // -// Set is asynchronous: it enqueues the write and returns, so a Get immediately -// after a Set can miss. Set is also admission-gated, and returns false when the -// frequency sketch judges the incoming key less valuable than what is resident, -// in which case the write is dropped entirely. A read-through replay therefore -// measures ristretto as a caller experiences it, which is the point, but its -// hit rate is not directly an eviction-policy comparison. +// New writes are asynchronous: Set can return after enqueueing, so an immediate +// Get can miss. A false return means the write was not queued. Even after a true +// return, the background admission policy can reject a new key. A read-through +// replay therefore measures the caller-visible admission and scheduling effects +// as well as eviction; its hit rate is not just an eviction-policy comparison. // // Calling Wait after every Set would drain the buffers and remove the first // effect, at a cost that would dominate the timing column and measure something diff --git a/bench/evidence_helpers_test.go b/bench/evidence_helpers_test.go new file mode 100644 index 0000000..fb74719 --- /dev/null +++ b/bench/evidence_helpers_test.go @@ -0,0 +1,22 @@ +package bench_test + +import ( + "math" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestEvidenceHelpersEmpty(t *testing.T) { + assert.NotPanics(t, func() { + assert.True(t, math.IsNaN((spread{}).median())) + assert.Equal(t, "n/a", (spread{}).String()) + best, worst := (traceRecord{}).bestAndWorst() + assert.Empty(t, best) + assert.Empty(t, worst) + }) +} + +func TestEvidenceMedianEven(t *testing.T) { + assert.Equal(t, 2.5, (spread{Runs: []float64{4, 1, 2, 3}}).median()) +} diff --git a/bench/evidence_metadata_test.go b/bench/evidence_metadata_test.go new file mode 100644 index 0000000..c5dce20 --- /dev/null +++ b/bench/evidence_metadata_test.go @@ -0,0 +1,82 @@ +package bench_test + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/require" + + ascache "github.com/sshaplygin/as-cache" + "github.com/sshaplygin/as-cache/bandit" + "github.com/sshaplygin/as-cache/bench" +) + +// replayAdaptiveEvidence captures the same configuration and cache instance +// that produce each observation; metadata must not infer settings separately. +func replayAdaptiveEvidence(t *testing.T, capacity int, workload bench.Workload, epochs int, settings *ascache.Settings) adaptiveRecord { + t.Helper() + record := adaptiveRecord{EpochsPerTrace: epochs, EpochRequests: settings.EpochRequests, Settings: *settings} + for run := range traceEvidenceRuns { + arms, err := bench.AdaptiveArms(capacity) + require.NoError(t, err) + cache, err := ascache.NewAdaptiveCache(arms, bandit.NewThompson(0.7, 13), settings) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, cache.Close()) }) + record.HitRate.Runs = append(record.HitRate.Runs, bench.Replay("adaptive", cache, workload).HitRate()*100) + rate := cache.Advice().SampleRate + if run == 0 { + record.EffectiveSampleRate = rate + } else { + require.Equal(t, record.EffectiveSampleRate, rate) + } + require.NoError(t, cache.Close()) + } + return record +} + +func TestEvidenceMetadataUsesMeasuredConfiguration(t *testing.T) { + for _, test := range []struct { + name string + capacity int + requested float64 + floor int + effective float64 + }{ + {"raised floor", 100, 0.05, 64, 0.64}, + {"changed configuration", 100, 0.25, 20, 0.25}, + {"clamped to full cache", 8, 0.05, 64, 1}, + {"library default floor", 1000, 0.1, 0, 0.256}, + } { + t.Run(test.name, func(t *testing.T) { + settings := traceEvidenceSettings(7) + settings.ShadowSampleRate = test.requested + settings.MinShadowCapacity = test.floor + settings.SwitchCooldownEpochs = 9 + settings.MinHitRateImprovement = 0.07 + record := replayAdaptiveEvidence(t, test.capacity, bench.Workload{Keys: []string{"a", "b", "a"}}, 10, settings) + data, err := json.Marshal(record) + require.NoError(t, err) + var decoded adaptiveRecord + require.NoError(t, json.Unmarshal(data, &decoded)) + require.Equal(t, *settings, decoded.Settings) + require.Equal(t, int64(7), decoded.EpochRequests) + require.Equal(t, test.effective, decoded.EffectiveSampleRate) + require.Len(t, decoded.HitRate.Runs, traceEvidenceRuns) + }) + } +} + +func TestReferenceMissPrecisionContract(t *testing.T) { + for _, raw := range []string{"0.0000", "0.1234", "0.9999", "1.0000"} { + _, err := parseReferenceMiss(raw) + require.NoError(t, err, raw) + } + for _, raw := range []string{"0", "1", "0.1", "0.123", "0.12345", "NaN", "+Inf", "1.0001", "-0.0001", "0.abcd", "00.0000", " 0.0000"} { + _, err := parseReferenceMiss(raw) + require.Error(t, err, raw) + } + // Boundary examples retain the existing narrow gate; coarse input cannot + // make a visibly incorrect LRU comparison pass by widening its tolerance. + require.LessOrEqual(t, 0.005, referenceTolerance) + require.Greater(t, 0.0052, referenceTolerance) +} diff --git a/bench/evidence_test.go b/bench/evidence_test.go index 785b702..583b133 100644 --- a/bench/evidence_test.go +++ b/bench/evidence_test.go @@ -21,15 +21,6 @@ import ( // working set makes every policy look identical. const cacheSize = 500 -// tiedArmTolerance is how far below the worst fixed policy adaptive selection -// may land before it counts as having picked badly. -// -// It exists because arms tie. Half a point is roughly five times the -// run-to-run variation these replays show, and a small fraction of any real -// separation between policies, so it absorbs the coin-flip without hiding a -// regression. -const tiedArmTolerance = 0.005 - // workloads returns the suite every comparison runs over. func workloads() []bench.Workload { return []bench.Workload{ @@ -156,25 +147,12 @@ func TestAdaptiveVersusFixed(t *testing.T) { rows = append(rows, summaryRow{w.Name, adaptive.HitRate(), bestFixed.Policy, bestFixed.HitRate(), worstFixed.HitRate()}) - // The claim worth defending is not that adaptive always wins, but - // that it never lands near the bottom: a cache that can pick the - // worst arm is worse than any fixed choice. - // - // "Near the bottom" has to allow for a tie, because on some - // workloads most arms are equivalent. On uniform, six of the seven - // policies sit within a hundredth of a point of each other at - // ~10%, since there is no structure for any of them to exploit. - // Adaptive lands in that same tie, and whether it comes out a - // hundredth above or below the minimum of the group is a property - // of the run, not of the library - asserting strict improvement - // there fails about one run in ten and means nothing when it - // passes. - // - // The tolerance is far above that jitter and far below any real - // separation: the gap between best and worst is 92 points on loop, - // 11 on zipf, 10 on scan. - assert.Greater(t, adaptive.HitRate(), worstFixed.HitRate()-tiedArmTolerance, - "adaptive selection must not land below the worst fixed policy on %s", w.Name) + // Relative performance is an observation, not a correctness gate. + // Every subject must still account for the complete request stream. + for _, result := range all { + assert.Equal(t, int64(w.Len()), result.Hits+result.Misses, + "%s must account for every request on %s", result.Policy, w.Name) + } }) } diff --git a/bench/go.mod b/bench/go.mod index 9f17f7f..04bcd41 100644 --- a/bench/go.mod +++ b/bench/go.mod @@ -6,12 +6,12 @@ require ( github.com/Yiling-J/theine-go v0.6.2 github.com/dgraph-io/ristretto/v2 v2.4.2 github.com/maypok86/otter/v2 v2.3.0 - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/bandit v0.3.1 - github.com/sshaplygin/as-cache/policies v0.3.1 - github.com/sshaplygin/as-cache/policies/arc v0.3.1 - github.com/sshaplygin/as-cache/policies/fifo v0.3.1 - github.com/sshaplygin/as-cache/policies/tinylfu v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/bandit v0.4.0 + github.com/sshaplygin/as-cache/policies v0.4.0 + github.com/sshaplygin/as-cache/policies/arc v0.4.0 + github.com/sshaplygin/as-cache/policies/fifo v0.0.0 // Unreleased; local replace below is required. + github.com/sshaplygin/as-cache/policies/tinylfu v0.4.0 github.com/stretchr/testify v1.11.1 github.com/viccon/sturdyc v1.1.5 ) @@ -26,7 +26,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/scalalang2/golang-fifo v1.2.0 // indirect - github.com/sshaplygin/as-cache/lfu v0.3.1 // indirect + github.com/sshaplygin/as-cache/lfu v0.4.0 // indirect github.com/zeebo/xxh3 v1.0.2 // indirect golang.org/x/sys v0.36.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/bench/observe_evidence_test.go b/bench/observe_evidence_test.go new file mode 100644 index 0000000..09bc4a5 --- /dev/null +++ b/bench/observe_evidence_test.go @@ -0,0 +1,45 @@ +package bench_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + ascache "github.com/sshaplygin/as-cache" + "github.com/sshaplygin/as-cache/bench" +) + +type observeRun struct { + HitRate float64 `json:"hit_rate_percent"` + EpochRequests int64 `json:"epoch_requests"` + Advice ascache.Advice `json:"advice"` + BestName string `json:"best_policy_name"` + Settings ascache.Settings `json:"settings"` +} + +// ObserveOnly holds LRU active; Advice measures all nine policies on the sampled +// stream. This is an offline comparison, not a real-service performance trial. +func observeTrace(t *testing.T, capacity int, w bench.Workload) []observeRun { + t.Helper() + lru, err := fixedPolicy(t, "LRU").Build(capacity) + require.NoError(t, err) + baseline := bench.Replay("LRU", lru, w) + var runs []observeRun + for range traceEvidenceRuns { + arms, buildErr := bench.AdaptiveArms(capacity) + require.NoError(t, buildErr) + settings := traceEvidenceSettings(int64(len(w.Keys) / 20)) + settings.ObserveOnly = true + cache, cacheErr := ascache.NewAdaptiveCache(arms, nil, settings) + require.NoError(t, cacheErr) + t.Cleanup(func() { require.NoError(t, cache.Close()) }) + result := bench.Replay("observe-only", cache, w) + advice := cache.Advice() + require.Equal(t, baseline.Hits, result.Hits, "ObserveOnly must serve the unchanged LRU") + require.Equal(t, ascache.LRU, advice.Active) + require.Len(t, advice.Reports, 9) + runs = append(runs, observeRun{HitRate: result.HitRate() * 100, EpochRequests: settings.EpochRequests, Advice: advice, BestName: advice.Best.String(), Settings: *settings}) + require.NoError(t, cache.Close()) + } + return runs +} diff --git a/bench/reference_test.go b/bench/reference_test.go new file mode 100644 index 0000000..45872e2 --- /dev/null +++ b/bench/reference_test.go @@ -0,0 +1,152 @@ +package bench_test + +import ( + "bufio" + "fmt" + "math" + "os" + "path/filepath" + "strconv" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/sshaplygin/as-cache/bench" +) + +// referenceEnv names the file of libCacheSim results written by +// scripts/verify-ref.sh: one "file, capacity, requests, miss ratio" row per +// point, tab-separated. +const referenceEnv = "AS_CACHE_LRU_REFERENCE" + +// referenceTolerance is the largest miss-ratio difference, in percentage +// points, accepted between this repository and libCacheSim at any one point. +// cachesim prints four decimals, so agreement shows up as a difference no +// larger than its rounding, 0.005 points. +const referenceDecimals = 4 + +// Half the supported miss-ratio rounding quantum, converted to percentage +// points, plus numerical slack. Reject coarser input instead of widening it. +var referenceTolerance = 50/math.Pow10(referenceDecimals) + 0.0001 + +func parseReferenceMiss(raw string) (float64, error) { + parts := strings.Split(raw, ".") + if len(parts) != 2 || (parts[0] != "0" && parts[0] != "1") || len(parts[1]) != referenceDecimals { + return 0, fmt.Errorf("expected pinned %d-decimal miss ratio, got %q", referenceDecimals, raw) + } + for _, digit := range parts[1] { + if digit < '0' || digit > '9' { + return 0, fmt.Errorf("invalid miss ratio %q", raw) + } + } + value, err := strconv.ParseFloat(raw, 64) + if err != nil || value < 0 || value > 1 || math.IsNaN(value) || math.IsInf(value, 0) { + return 0, fmt.Errorf("invalid miss ratio %q", raw) + } + return value, nil +} + +type referencePoint struct { + file string + capacity int + requests int + miss float64 +} + +// TestLRUMatchesReference is the Go half of scripts/verify-ref.sh. It loads +// every trace the reference covers through this repository's loaders, replays +// LRU at each capacity the reference lists, and requires libCacheSim's request +// count and a miss ratio within referenceTolerance. +// +// It skips unless the script has produced a reference, which is why the script +// rather than this test is the gate: the script fails if this test skips. +func TestLRUMatchesReference(t *testing.T) { + path := os.Getenv(referenceEnv) + if path == "" { + t.Skipf("%s is not set; run ./scripts/verify-ref.sh", referenceEnv) + } + dir, err := bench.TraceDir() + require.NoError(t, err) + + points := readReference(t, path) + require.NotEmpty(t, points, "the reference file has no points") + + specs := map[string]traceSpec{} + for _, spec := range append(knownTraces(), msrVolumes(dir)...) { + specs[spec.file] = spec + } + + byFile := map[string][]referencePoint{} + order := []string{} + for _, p := range points { + if _, seen := byFile[p.file]; !seen { + order = append(order, p.file) + } + byFile[p.file] = append(byFile[p.file], p) + } + + for file := range specs { + require.Contains(t, byFile, file, "evidence trace %s has no reference calibration", file) + } + + lru := fixedPolicy(t, "LRU") + for _, file := range order { + spec, ok := specs[file] + require.True(t, ok, "the reference covers %s, which the evidence suite does not read", file) + + t.Run(file, func(t *testing.T) { + w, loadErr := spec.load(filepath.Join(dir, file)) + require.NoError(t, loadErr) + + evidenceCapacityCovered := false + for _, p := range byFile[file] { + evidenceCapacityCovered = evidenceCapacityCovered || p.capacity == spec.cache + + policy, buildErr := lru.Build(p.capacity) + require.NoError(t, buildErr) + miss := 1 - bench.Replay("LRU", policy, w).HitRate() + + delta := math.Abs(miss-p.miss) * 100 + t.Logf("%-26s %6d requests %d/%d miss %.4f/%.4f |d| %.3f pts", + file, p.capacity, len(w.Keys), p.requests, miss, p.miss, delta) + + assert.Equal(t, p.requests, len(w.Keys), + "%s: the loader yields a different request count from the independent expansion", file) + assert.LessOrEqual(t, delta, referenceTolerance, + "%s at capacity %d: LRU miss ratio %.4f against libCacheSim's %.4f", file, p.capacity, miss, p.miss) + } + + assert.True(t, evidenceCapacityCovered, + "%s: the reference does not include capacity %d, the one the evidence suite uses", file, spec.cache) + }) + } +} + +func readReference(t *testing.T, path string) []referencePoint { + t.Helper() + + file, err := os.Open(path) + require.NoError(t, err) + defer func() { _ = file.Close() }() + + var points []referencePoint + scanner := bufio.NewScanner(file) + for scanner.Scan() { + fields := strings.Split(scanner.Text(), "\t") + require.Len(t, fields, 4, "malformed reference row %q", scanner.Text()) + + capacity, capErr := strconv.Atoi(fields[1]) + requests, reqErr := strconv.Atoi(fields[2]) + miss, missErr := parseReferenceMiss(fields[3]) + require.NoError(t, capErr) + require.NoError(t, reqErr) + require.NoError(t, missErr) + + points = append(points, referencePoint{fields[0], capacity, requests, miss}) + } + require.NoError(t, scanner.Err()) + + return points +} diff --git a/bench/results/current/README.md b/bench/results/current/README.md new file mode 100644 index 0000000..871f7b6 --- /dev/null +++ b/bench/results/current/README.md @@ -0,0 +1,282 @@ +# Current measurement results + +Measured source: `1cb65fe0242bfae6312d5c1f54b8660d68e40e24`; clean committed trees; three consecutive full evidence runs. +Nondeterministic subjects have 15 observations (three batches of five). Deterministic fixed arms run once per batch. +Median [min–max] describes these observations, not a confidence interval or a bound on future runs. +All trace-matrix outcomes are retained; relative hit rates do not decide whether this matrix passes. + +## Trace matrix + +All nine arms; request-counted epochs. Actual constructor settings are retained for every adaptive and ObserveOnly cell. +Effective sample rates come from the measured caches' Advice and are shown in the context table. + +| Trace | Best fixed median [min–max] (ties retained) | Worst fixed median [min–max] (ties retained) | 10 epochs | 20 epochs | 50 epochs | +| --- | --- | --- | --- | --- | --- | +| twitter_cluster052.csv | SIEVE 59.78% [59.78–59.78] | LFU 41.44% [41.44–41.44] | 58.68% [58.59–59.03] (-1.10 pp) | 58.80% [58.61–58.97] (-0.98 pp) | 58.19% [57.92–58.35] (-1.60 pp) | +| lirs_loop.trace | W-TinyLFU 49.26% [42.39–59.77] | 2Q 0.00% [0.00–0.00]
ARC 0.00% [0.00–0.00]
LFU 0.00% [0.00–0.00]
LRU 0.00% [0.00–0.00]
S3-FIFO 0.00% [0.00–0.00]
SIEVE 0.00% [0.00–0.00]
TTL 0.00% [0.00–0.00] | 40.67% [35.81–72.96] (-8.58 pp) | 42.86% [39.60–45.53] (-6.39 pp) | 44.08% [41.15–45.69] (-5.17 pp) | +| lirs_2_pools.trace | W-TinyLFU 54.78% [54.59–55.86] | Random 49.95% [49.77–50.05] | 54.41% [54.38–54.43] (-0.37 pp) | 54.40% [54.23–54.69] (-0.38 pp) | 54.23% [54.16–54.28] (-0.55 pp) | +| arc_p3 | W-TinyLFU 12.10% [11.52–12.38] | LRU 1.87% [1.87–1.87]
TTL 1.87% [1.87–1.87] | 12.44% [11.93–12.68] (+0.35 pp) | 12.92% [12.24–13.11] (+0.82 pp) | 12.42% [8.58–13.59] (+0.32 pp) | +| arc_oltp | 2Q 68.25% [68.25–68.25] | LFU 45.43% [45.43–45.43] | 67.51% [67.37–67.74] (-0.74 pp) | 66.92% [66.68–67.22] (-1.34 pp) | 66.14% [65.86–66.59] (-2.11 pp) | +| meta_kvcache_202206_1 | S3-FIFO 69.05% [69.05–69.05] | Random 65.18% [65.17–65.19] | 68.10% [67.74–68.29] (-0.96 pp) | 67.60% [67.42–67.78] (-1.45 pp) | 66.90% [66.74–66.97] (-2.16 pp) | +| msr_hm_0 | 2Q 17.01% [17.01–17.01] | LRU 11.40% [11.40–11.40]
TTL 11.40% [11.40–11.40] | 14.49% [12.53–15.59] (-2.51 pp) | 13.03% [12.12–14.41] (-3.97 pp) | 14.60% [13.48–16.08] (-2.40 pp) | +| msr_prn_0 | LFU 1.06% [1.06–1.06]
SIEVE 1.06% [1.06–1.06] | W-TinyLFU 0.75% [0.67–0.93] | 0.87% [0.84–0.87] (-0.19 pp) | 0.73% [0.70–0.97] (-0.33 pp) | 1.05% [0.98–1.09] (-0.00 pp) | +| msr_proj_0 | S3-FIFO 5.79% [5.79–5.79] | W-TinyLFU 4.26% [4.11–5.06] | 5.14% [5.13–5.35] (-0.66 pp) | 5.09% [5.07–5.18] (-0.70 pp) | 5.39% [5.33–5.56] (-0.41 pp) | +| msr_src1_2 | 2Q 1.77% [1.77–1.77] | W-TinyLFU 1.15% [0.91–1.22] | 1.70% [1.70–1.70] (-0.06 pp) | 1.70% [1.70–1.70] (-0.06 pp) | 1.70% [1.24–1.70] (-0.07 pp) | +| msr_usr_0 | S3-FIFO 3.58% [3.58–3.58] | LFU 1.46% [1.46–1.46]
SIEVE 1.46% [1.46–1.46] | 3.57% [3.00–3.57] (-0.01 pp) | 3.50% [3.47–3.52] (-0.08 pp) | 3.42% [3.41–3.67] (-0.16 pp) | +| msr_web_0 | LFU 2.61% [2.61–2.61]
SIEVE 2.61% [2.61–2.61] | W-TinyLFU 2.28% [2.24–2.32] | 2.35% [2.22–2.35] (-0.26 pp) | 2.41% [2.39–2.41] (-0.20 pp) | 2.44% [2.41–2.48] (-0.17 pp) | + +Adaptive medians trail the best fixed median on 11/12 traces at every tested epoch setting. +Counts below the best fixed median by setting: 10 epochs: 11/12; 20 epochs: 11/12; 50 epochs: 11/12. +Traces above the best fixed median at every setting: arc_p3. +The table compares medians with the best fixed median in this dataset. It makes no claim of a universal maximum deficit. +W-TinyLFU is asynchronous: a short batch may miss another performance mode, especially on LIRS loop. +A winning policy name is not evidence of a material or statistically established advantage. + +Adaptive medians below the worst fixed median in this dataset: + +- msr_prn_0, 20 epochs: -0.0207 percentage points versus W-TinyLFU 0.75% [0.67–0.93]. + +## Workload context + +Compulsory-miss ceiling assumes an empty cache: 100 × (requests − distinct keys) / requests. +The best/runner-up gap includes ties; tiny gaps cannot support a strong policy ranking. + +| Trace | Requests | Distinct keys | Capacity | Capacity/keyspace | Effective sample | Hit ceiling | Best–runner-up | Best–worst | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| twitter_cluster052.csv | 1000000 | 255333 | 10000 | 3.916% | 5.00% | 74.47% | 0.0559 pp | 18.3414 pp | +| lirs_loop.trace | 505500 | 1011 | 500 | 49.456% | 12.80% | 99.80% | 29.5960 pp | 49.2564 pp | +| lirs_2_pools.trace | 100000 | 9939 | 1000 | 10.061% | 6.40% | 90.06% | 0.3640 pp | 4.8260 pp | +| arc_p3 | 2000000 | 426527 | 20000 | 4.689% | 5.00% | 78.67% | 1.3433 pp | 10.2278 pp | +| arc_oltp | 914145 | 186880 | 20000 | 10.702% | 5.00% | 79.56% | 0.4534 pp | 22.8282 pp | +| meta_kvcache_202206_1 | 2000000 | 340723 | 10000 | 2.935% | 5.00% | 82.96% | 0.1303 pp | 3.8695 pp | +| msr_hm_0 | 2000000 | 818034 | 20000 | 2.445% | 5.00% | 59.10% | 0.3573 pp | 5.6098 pp | +| msr_prn_0 | 2000000 | 1900653 | 20000 | 1.052% | 5.00% | 4.97% | 0.0000 pp | 0.3062 pp | +| msr_proj_0 | 2000000 | 1748195 | 20000 | 1.144% | 5.00% | 12.59% | 0.4098 pp | 1.5390 pp | +| msr_src1_2 | 2000000 | 1947636 | 20000 | 1.027% | 5.00% | 2.62% | 0.0393 pp | 0.6143 pp | +| msr_usr_0 | 2000000 | 1778953 | 20000 | 1.124% | 5.00% | 11.05% | 0.0121 pp | 2.1250 pp | +| msr_web_0 | 2000000 | 1855956 | 20000 | 1.078% | 5.00% | 7.20% | 0.0000 pp | 0.3335 pp | + +Use the margins and ties above when interpreting policy names; small differences do not establish a useful ranking. +The cache is roughly 1% of the distinct keyspace on most MSR prefixes; the ceilings above limit the available hit-rate signal. + +## Every fixed arm + +| Trace | Policy | Hit rate | +| --- | --- | --- | +| twitter_cluster052.csv | 2Q | 59.62% [59.62–59.62] | +| twitter_cluster052.csv | ARC | 58.99% [58.99–58.99] | +| twitter_cluster052.csv | LFU | 41.44% [41.44–41.44] | +| twitter_cluster052.csv | LRU | 58.39% [58.39–58.39] | +| twitter_cluster052.csv | Random | 54.80% [54.76–54.83] | +| twitter_cluster052.csv | S3-FIFO | 59.73% [59.73–59.73] | +| twitter_cluster052.csv | SIEVE | 59.78% [59.78–59.78] | +| twitter_cluster052.csv | TTL | 58.39% [58.39–58.39] | +| twitter_cluster052.csv | W-TinyLFU | 57.61% [54.48–58.76] | +| lirs_loop.trace | 2Q | 0.00% [0.00–0.00] | +| lirs_loop.trace | ARC | 0.00% [0.00–0.00] | +| lirs_loop.trace | LFU | 0.00% [0.00–0.00] | +| lirs_loop.trace | LRU | 0.00% [0.00–0.00] | +| lirs_loop.trace | Random | 19.66% [19.61–19.74] | +| lirs_loop.trace | S3-FIFO | 0.00% [0.00–0.00] | +| lirs_loop.trace | SIEVE | 0.00% [0.00–0.00] | +| lirs_loop.trace | TTL | 0.00% [0.00–0.00] | +| lirs_loop.trace | W-TinyLFU | 49.26% [42.39–59.77] | +| lirs_2_pools.trace | 2Q | 54.40% [54.40–54.40] | +| lirs_2_pools.trace | ARC | 54.37% [54.37–54.37] | +| lirs_2_pools.trace | LFU | 54.36% [54.36–54.36] | +| lirs_2_pools.trace | LRU | 54.41% [54.41–54.41] | +| lirs_2_pools.trace | Random | 49.95% [49.77–50.05] | +| lirs_2_pools.trace | S3-FIFO | 54.37% [54.37–54.37] | +| lirs_2_pools.trace | SIEVE | 54.36% [54.36–54.36] | +| lirs_2_pools.trace | TTL | 54.41% [54.41–54.41] | +| lirs_2_pools.trace | W-TinyLFU | 54.78% [54.59–55.86] | +| arc_p3 | 2Q | 7.74% [7.74–7.74] | +| arc_p3 | ARC | 10.25% [10.25–10.25] | +| arc_p3 | LFU | 4.82% [4.82–4.82] | +| arc_p3 | LRU | 1.87% [1.87–1.87] | +| arc_p3 | Random | 3.08% [3.07–3.09] | +| arc_p3 | S3-FIFO | 10.75% [10.75–10.75] | +| arc_p3 | SIEVE | 4.82% [4.82–4.82] | +| arc_p3 | TTL | 1.87% [1.87–1.87] | +| arc_p3 | W-TinyLFU | 12.10% [11.52–12.38] | +| arc_oltp | 2Q | 68.25% [68.25–68.25] | +| arc_oltp | ARC | 67.80% [67.80–67.80] | +| arc_oltp | LFU | 45.43% [45.43–45.43] | +| arc_oltp | LRU | 67.06% [67.06–67.06] | +| arc_oltp | Random | 63.02% [62.97–63.05] | +| arc_oltp | S3-FIFO | 67.79% [67.79–67.79] | +| arc_oltp | SIEVE | 67.72% [67.72–67.72] | +| arc_oltp | TTL | 67.06% [67.06–67.06] | +| arc_oltp | W-TinyLFU | 63.11% [62.04–63.40] | +| meta_kvcache_202206_1 | 2Q | 68.16% [68.16–68.16] | +| meta_kvcache_202206_1 | ARC | 68.27% [68.27–68.27] | +| meta_kvcache_202206_1 | LFU | 66.87% [66.87–66.87] | +| meta_kvcache_202206_1 | LRU | 66.39% [66.39–66.39] | +| meta_kvcache_202206_1 | Random | 65.18% [65.17–65.19] | +| meta_kvcache_202206_1 | S3-FIFO | 69.05% [69.05–69.05] | +| meta_kvcache_202206_1 | SIEVE | 68.92% [68.92–68.92] | +| meta_kvcache_202206_1 | TTL | 66.39% [66.39–66.39] | +| meta_kvcache_202206_1 | W-TinyLFU | 68.53% [68.31–68.72] | +| msr_hm_0 | 2Q | 17.01% [17.01–17.01] | +| msr_hm_0 | ARC | 16.65% [16.65–16.65] | +| msr_hm_0 | LFU | 14.99% [14.99–14.99] | +| msr_hm_0 | LRU | 11.40% [11.40–11.40] | +| msr_hm_0 | Random | 12.62% [12.60–12.64] | +| msr_hm_0 | S3-FIFO | 15.84% [15.84–15.84] | +| msr_hm_0 | SIEVE | 15.19% [15.19–15.19] | +| msr_hm_0 | TTL | 11.40% [11.40–11.40] | +| msr_hm_0 | W-TinyLFU | 16.05% [15.81–16.33] | +| msr_prn_0 | 2Q | 1.04% [1.04–1.04] | +| msr_prn_0 | ARC | 1.02% [1.02–1.02] | +| msr_prn_0 | LFU | 1.06% [1.06–1.06] | +| msr_prn_0 | LRU | 1.00% [1.00–1.00] | +| msr_prn_0 | Random | 0.94% [0.94–0.95] | +| msr_prn_0 | S3-FIFO | 1.01% [1.01–1.01] | +| msr_prn_0 | SIEVE | 1.06% [1.06–1.06] | +| msr_prn_0 | TTL | 1.00% [1.00–1.00] | +| msr_prn_0 | W-TinyLFU | 0.75% [0.67–0.93] | +| msr_proj_0 | 2Q | 5.38% [5.38–5.38] | +| msr_proj_0 | ARC | 5.38% [5.38–5.38] | +| msr_proj_0 | LFU | 4.73% [4.73–4.73] | +| msr_proj_0 | LRU | 5.35% [5.35–5.35] | +| msr_proj_0 | Random | 5.20% [5.20–5.22] | +| msr_proj_0 | S3-FIFO | 5.79% [5.79–5.79] | +| msr_proj_0 | SIEVE | 4.73% [4.73–4.73] | +| msr_proj_0 | TTL | 5.35% [5.35–5.35] | +| msr_proj_0 | W-TinyLFU | 4.26% [4.11–5.06] | +| msr_src1_2 | 2Q | 1.77% [1.77–1.77] | +| msr_src1_2 | ARC | 1.73% [1.73–1.73] | +| msr_src1_2 | LFU | 1.42% [1.42–1.42] | +| msr_src1_2 | LRU | 1.70% [1.70–1.70] | +| msr_src1_2 | Random | 1.63% [1.63–1.64] | +| msr_src1_2 | S3-FIFO | 1.70% [1.70–1.70] | +| msr_src1_2 | SIEVE | 1.42% [1.42–1.42] | +| msr_src1_2 | TTL | 1.70% [1.70–1.70] | +| msr_src1_2 | W-TinyLFU | 1.15% [0.91–1.22] | +| msr_usr_0 | 2Q | 3.57% [3.57–3.57] | +| msr_usr_0 | ARC | 3.55% [3.55–3.55] | +| msr_usr_0 | LFU | 1.46% [1.46–1.46] | +| msr_usr_0 | LRU | 3.57% [3.57–3.57] | +| msr_usr_0 | Random | 3.49% [3.49–3.50] | +| msr_usr_0 | S3-FIFO | 3.58% [3.58–3.58] | +| msr_usr_0 | SIEVE | 1.46% [1.46–1.46] | +| msr_usr_0 | TTL | 3.57% [3.57–3.57] | +| msr_usr_0 | W-TinyLFU | 2.86% [2.23–3.00] | +| msr_web_0 | 2Q | 2.61% [2.61–2.61] | +| msr_web_0 | ARC | 2.60% [2.60–2.60] | +| msr_web_0 | LFU | 2.61% [2.61–2.61] | +| msr_web_0 | LRU | 2.30% [2.30–2.30] | +| msr_web_0 | Random | 2.56% [2.55–2.57] | +| msr_web_0 | S3-FIFO | 2.49% [2.49–2.49] | +| msr_web_0 | SIEVE | 2.61% [2.61–2.61] | +| msr_web_0 | TTL | 2.30% [2.30–2.30] | +| msr_web_0 | W-TinyLFU | 2.28% [2.24–2.32] | + +## ObserveOnly + +LRU remains active, all nine arms are measured, 20 request epochs per replay, the same sample/floor settings. +Every run asserts serving hits equal standalone LRU. Advice rankings measure sampled shadows; they are not full-cache forecasts. +The table counts the final Advice.Best choices across 15 runs; all per-arm hit/miss reports are in traces.json. + +| Trace | Serving hit rate | Recommended policies (count) | +| --- | --- | --- | +| twitter_cluster052.csv | 58.39% [58.39–58.39] | 2Q: 1, S3-FIFO: 1, SIEVE: 4, W-TinyLFU: 9 | +| lirs_loop.trace | 0.00% [0.00–0.00] | W-TinyLFU: 15 | +| lirs_2_pools.trace | 54.41% [54.41–54.41] | LFU: 2, LRU: 4, S3-FIFO: 2, TTL: 1, W-TinyLFU: 6 | +| arc_p3 | 1.87% [1.87–1.87] | W-TinyLFU: 15 | +| arc_oltp | 67.06% [67.06–67.06] | 2Q: 14, ARC: 1 | +| meta_kvcache_202206_1 | 66.39% [66.39–66.39] | W-TinyLFU: 15 | +| msr_hm_0 | 11.40% [11.40–11.40] | 2Q: 9, W-TinyLFU: 6 | +| msr_prn_0 | 1.00% [1.00–1.00] | LFU: 15 | +| msr_proj_0 | 5.35% [5.35–5.35] | S3-FIFO: 7, W-TinyLFU: 8 | +| msr_src1_2 | 1.70% [1.70–1.70] | 2Q: 15 | +| msr_usr_0 | 3.57% [3.57–3.57] | 2Q: 3, LRU: 2, S3-FIFO: 9, TTL: 1 | +| msr_web_0 | 2.30% [2.30–2.30] | 2Q: 9, ARC: 1, LFU: 5 | + +Retrospective modal agreement: 8/12 traces. Each trace counts once, and all tied modal choices must belong to the tied best-fixed set to count as agreement. +Individual final recommendations in the best-fixed set: 114/180 (63.33%). Every run counts once; any tied best-fixed arm counts as agreement. +These compare final sampled Advice choices with standalone full-cache medians in this dataset, not forecast accuracy or a causal cost of following Advice. Serving remained LRU. + +Modal mismatches (each tied nonwinning mode has its own row): + +| Trace | Modal recommendation: standalone median [min–max] | Best fixed median [min–max] | Standalone median difference | +| --- | --- | --- | --- | +| twitter_cluster052.csv | W-TinyLFU 57.61% [54.48–58.76] | SIEVE 59.78% [59.78–59.78] | -2.1785 pp | +| meta_kvcache_202206_1 | W-TinyLFU 68.53% [68.31–68.72] | S3-FIFO 69.05% [69.05–69.05] | -0.5257 pp | +| msr_proj_0 | W-TinyLFU 4.26% [4.11–5.06] | S3-FIFO 5.79% [5.79–5.79] | -1.5390 pp | +| msr_web_0 | 2Q 2.61% [2.61–2.61] | LFU 2.61% [2.61–2.61]
SIEVE 2.61% [2.61–2.61] | -0.0002 pp | + +For example, on twitter_cluster052.csv the modal W-TinyLFU recommendation has a standalone median -2.1785 points relative to the best fixed median. This subtraction compares separate full-cache replays; the sampled ObserveOnly cache did not switch to W-TinyLFU or measure that difference as a serving loss. + +This is an offline sweep, not a service trial or proof that following Advice will improve production traffic. + +## LFU/SIEVE diagnostic + +Each request is checked against an independent visited-bit/hand model. A FIFO control and LFU run on the identical stream. + +| Trace | LFU hits | SIEVE hits | FIFO hits | LFU/SIEVE decisions differ | SIEVE/model disagreements | +| --- | --- | --- | --- | --- | --- | +| twitter_cluster052.csv | 414436 | 597850 | 555634 | 216148 | 0 | +| lirs_loop.trace | 0 | 0 | 0 | 0 | 0 | +| lirs_2_pools.trace | 54361 | 54361 | 49957 | 0 | 0 | +| arc_p3 | 96324 | 96324 | 38093 | 0 | 0 | +| arc_oltp | 415260 | 619036 | 584567 | 230770 | 0 | +| meta_kvcache_202206_1 | 1337313 | 1378480 | 1313815 | 130305 | 0 | +| msr_hm_0 | 299772 | 303745 | 228175 | 34189 | 0 | +| msr_prn_0 | 21119 | 21119 | 20052 | 0 | 0 | +| msr_proj_0 | 94547 | 94547 | 102774 | 0 | 0 | +| msr_src1_2 | 28362 | 28362 | 34051 | 0 | 0 | +| msr_usr_0 | 29176 | 29176 | 70272 | 0 | 0 | +| msr_web_0 | 52205 | 52205 | 45560 | 0 | 0 | + +Equal hit/miss streams do not imply equal eviction state. The nonzero FIFO differences rule out a general reduction to FIFO. +A capacity-2 counterexample separates the mechanisms: a,a,b,b,c,d,a,b gives LFU 3 hits and SIEVE 2; a,b,a,c,a gives SIEVE 2 and FIFO 1. +TestSieveLFUDistinction pins both examples. The real-trace model check tests the adapter without assuming these policies must have different totals. + +## P3 tuning + +This configuration example is restricted to P3; it does not identify a universal production setting. +Every cell retains its actual migration, sampling and stability settings in tuning.json; nine arms are measured. + +| Epochs | Migration | Gates | Hit rate | +| --- | --- | --- | --- | +| 10 | cold | False | 12.10% [11.74–12.39] | +| 10 | cold | True | 7.52% [4.33–7.75] | +| 10 | warm | False | 12.46% [12.09–12.56] | +| 10 | warm | True | 7.93% [7.44–8.27] | +| 20 | cold | False | 13.25% [11.10–13.74] | +| 20 | cold | True | 9.04% [7.35–10.45] | +| 20 | warm | False | 12.83% [12.29–13.12] | +| 20 | warm | True | 9.30% [8.98–10.52] | +| 50 | cold | False | 11.87% [3.71–12.27] | +| 50 | cold | True | 10.03% [7.79–12.26] | +| 50 | warm | False | 12.23% [8.40–13.26] | +| 50 | warm | True | 10.72% [8.31–12.39] | + +## Meta object-count versus byte capacity + +Pinned libCacheSim `1d7415569978330ea95c9cff06a260630406f7e3`, LRU, the same 2000000 GET requests in both modes. +The export retains request-time size + key_size. The pinned simulator charges insertion-time size until eviction; size changes on hits do not resize resident objects. Metadata overhead is excluded. +Byte budget = object capacity × mean first-seen size per distinct key (475.262 bytes), rounded down. +This is a stated budget convention, not proof of equal resident memory. Deltas are request miss ratios, not byte-weighted miss ratios. + +| Objects | Bytes | Ignore sizes: miss | Account sizes: miss | Difference | +| --- | --- | --- | --- | --- | +| 2500 | 1188154 | 39.32% | 39.65% | +0.33 pp | +| 5000 | 2376308 | 36.67% | 37.34% | +0.67 pp | +| 10000 | 4752616 | 33.61% | 34.48% | +0.87 pp | +| 20000 | 9505233 | 29.80% | 30.88% | +1.08 pp | +| 40000 | 19010466 | 25.42% | 26.54% | +1.12 pp | + +## Provenance and limits + +manifest.json is generated by scripts/record_evidence.py and hashes every retained input/output. +The pinned input catalog has 13 files. lirs_multi2.trace.gz is inventoried but not replayed in the 12-trace matrix or reference gate. +Verify with `python3 scripts/record_evidence.py --verify bench/results/current`. +Reference calibration compares independent expansions of the same interpretation and LRU counting; it cannot detect a shared interpretation error. +The reference accepts finite ratios in [0, 1] with exactly four decimals. Tolerance is half that rounding quantum plus numerical slack: 0.0051 percentage points. All loaded traces must have reference coverage. +The byte experiment uses the Meta prefix only. Other traces remain entry-capacity, not equal-memory comparisons. +Per-operation timings and wall-clock experiments remain raw diagnostics in the logs, not stable product claims. + +Reproduce: `AS_CACHE_TRACES=$PWD/traces python3 scripts/record_evidence.py --out `. +A complete run requires the pinned libCacheSim build and three sequential evidence runs. Replace current results after validation; do not create a historical archive. diff --git a/bench/results/current/bytes.json b/bench/results/current/bytes.json new file mode 100644 index 0000000..cdc82df --- /dev/null +++ b/bench/results/current/bytes.json @@ -0,0 +1,91 @@ +{ + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "libcachesim_commit": "1d7415569978330ea95c9cff06a260630406f7e3", + "input": { + "file": "meta_kvcache_202206_1.csv", + "bytes": 134217728, + "sha256": "faaf993d0267a3b68430ec079de6074060cb3593ddff4a9e987c25a5d68cd277" + }, + "requests": 2000000, + "distinct_keys": 340723, + "mean_first_object_bytes": 475.2616671020154, + "size_semantics": "size + key_size; current request size; no metadata overhead", + "budget_semantics": "object_capacity * mean first-seen size per distinct key, rounded down", + "rows": [ + { + "object_capacity": 2500, + "byte_capacity": 1188154, + "objects": { + "requests": 2000000, + "miss_ratio": 0.3932, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1706, interval miss ratio 0.1706\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2736, interval miss ratio 0.3766\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2931, interval miss ratio 0.3320\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.3006, interval miss ratio 0.3233\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.3164, interval miss ratio 0.3795\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3427, interval miss ratio 0.4743\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3558, interval miss ratio 0.4344\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3561, interval miss ratio 0.3582\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3606, interval miss ratio 0.3964\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3628, interval miss ratio 0.3828\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3725, interval miss ratio 0.4698\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3740, interval miss ratio 0.3906\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3739, interval miss ratio 0.3719\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3744, interval miss ratio 0.3817\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3821, interval miss ratio 0.4890\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3882, interval miss ratio 0.4800\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3884, interval miss ratio 0.3919\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3868, interval miss ratio 0.3599\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3882, interval miss ratio 0.4120\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3929, interval miss ratio 0.4834\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3940, interval miss ratio 0.4160\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3923, interval miss ratio 0.3559\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3941, interval miss ratio 0.4340\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 2500, 2000000 req, miss ratio 0.3932, throughput 16.08 MQPS\n" + }, + "bytes": { + "requests": 2000000, + "miss_ratio": 0.3965, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1748, interval miss ratio 0.1748\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2820, interval miss ratio 0.3893\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.3007, interval miss ratio 0.3380\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.3063, interval miss ratio 0.3232\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.3222, interval miss ratio 0.3856\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3486, interval miss ratio 0.4809\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3616, interval miss ratio 0.4393\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3615, interval miss ratio 0.3610\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3656, interval miss ratio 0.3979\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3674, interval miss ratio 0.3842\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3769, interval miss ratio 0.4720\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3781, interval miss ratio 0.3915\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3777, interval miss ratio 0.3719\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3783, interval miss ratio 0.3865\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3855, interval miss ratio 0.4872\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3919, interval miss ratio 0.4865\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3920, interval miss ratio 0.3939\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3903, interval miss ratio 0.3611\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3915, interval miss ratio 0.4131\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3962, interval miss ratio 0.4853\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3973, interval miss ratio 0.4196\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3954, interval miss ratio 0.3570\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3974, interval miss ratio 0.4405\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 1MiB, 2000000 req, miss ratio 0.3965, byte miss ratio 0.4575, throughput 14.05 MQPS\n" + }, + "request_miss_delta_pp": 0.3300000000000025 + }, + { + "object_capacity": 5000, + "byte_capacity": 2376308, + "objects": { + "requests": 2000000, + "miss_ratio": 0.3667, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1555, interval miss ratio 0.1555\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2488, interval miss ratio 0.3422\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2691, interval miss ratio 0.3097\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2771, interval miss ratio 0.3011\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2926, interval miss ratio 0.3547\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3176, interval miss ratio 0.4427\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3300, interval miss ratio 0.4043\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3307, interval miss ratio 0.3352\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3352, interval miss ratio 0.3711\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3374, interval miss ratio 0.3576\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3466, interval miss ratio 0.4382\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3481, interval miss ratio 0.3652\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3481, interval miss ratio 0.3484\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3487, interval miss ratio 0.3562\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3560, interval miss ratio 0.4580\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3617, interval miss ratio 0.4477\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3620, interval miss ratio 0.3658\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3605, interval miss ratio 0.3350\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3618, interval miss ratio 0.3857\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3663, interval miss ratio 0.4528\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3673, interval miss ratio 0.3872\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3658, interval miss ratio 0.3343\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3676, interval miss ratio 0.4064\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 5000, 2000000 req, miss ratio 0.3667, throughput 14.06 MQPS\n" + }, + "bytes": { + "requests": 2000000, + "miss_ratio": 0.3734, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1580, interval miss ratio 0.1580\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2582, interval miss ratio 0.3584\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2773, interval miss ratio 0.3156\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2838, interval miss ratio 0.3033\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2998, interval miss ratio 0.3636\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3256, interval miss ratio 0.4544\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3382, interval miss ratio 0.4142\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3388, interval miss ratio 0.3431\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3428, interval miss ratio 0.3749\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3449, interval miss ratio 0.3631\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3539, interval miss ratio 0.4437\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3552, interval miss ratio 0.3699\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3550, interval miss ratio 0.3533\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3557, interval miss ratio 0.3641\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3625, interval miss ratio 0.4585\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3685, interval miss ratio 0.4585\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3688, interval miss ratio 0.3737\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3672, interval miss ratio 0.3394\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3685, interval miss ratio 0.3910\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3730, interval miss ratio 0.4585\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3740, interval miss ratio 0.3951\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3724, interval miss ratio 0.3378\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3742, interval miss ratio 0.4153\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 2MiB, 2000000 req, miss ratio 0.3734, byte miss ratio 0.4267, throughput 14.26 MQPS\n" + }, + "request_miss_delta_pp": 0.6699999999999984 + }, + { + "object_capacity": 10000, + "byte_capacity": 4752616, + "objects": { + "requests": 2000000, + "miss_ratio": 0.3361, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1466, interval miss ratio 0.1466\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2255, interval miss ratio 0.3044\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2448, interval miss ratio 0.2833\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2528, interval miss ratio 0.2767\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2674, interval miss ratio 0.3258\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2905, interval miss ratio 0.4064\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3019, interval miss ratio 0.3703\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3027, interval miss ratio 0.3078\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3069, interval miss ratio 0.3406\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3090, interval miss ratio 0.3279\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3173, interval miss ratio 0.4003\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3187, interval miss ratio 0.3343\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3188, interval miss ratio 0.3204\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3194, interval miss ratio 0.3272\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3260, interval miss ratio 0.4186\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3313, interval miss ratio 0.4108\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3316, interval miss ratio 0.3357\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3303, interval miss ratio 0.3077\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3315, interval miss ratio 0.3535\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3357, interval miss ratio 0.4153\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3366, interval miss ratio 0.3546\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3352, interval miss ratio 0.3066\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3369, interval miss ratio 0.3738\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 10000, 2000000 req, miss ratio 0.3361, throughput 13.12 MQPS\n" + }, + "bytes": { + "requests": 2000000, + "miss_ratio": 0.3448, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1473, interval miss ratio 0.1473\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2339, interval miss ratio 0.3205\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2523, interval miss ratio 0.2892\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2589, interval miss ratio 0.2785\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2748, interval miss ratio 0.3384\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2990, interval miss ratio 0.4200\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3110, interval miss ratio 0.3832\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3120, interval miss ratio 0.3190\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3160, interval miss ratio 0.3481\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3178, interval miss ratio 0.3334\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3261, interval miss ratio 0.4094\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3274, interval miss ratio 0.3415\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3273, interval miss ratio 0.3260\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3279, interval miss ratio 0.3364\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3345, interval miss ratio 0.4263\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3401, interval miss ratio 0.4249\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3404, interval miss ratio 0.3452\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3389, interval miss ratio 0.3135\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3402, interval miss ratio 0.3627\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3443, interval miss ratio 0.4233\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3453, interval miss ratio 0.3643\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3438, interval miss ratio 0.3124\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3456, interval miss ratio 0.3861\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 5MiB, 2000000 req, miss ratio 0.3448, byte miss ratio 0.3896, throughput 14.97 MQPS\n" + }, + "request_miss_delta_pp": 0.8699999999999986 + }, + { + "object_capacity": 20000, + "byte_capacity": 9505233, + "objects": { + "requests": 2000000, + "miss_ratio": 0.298, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2083, interval miss ratio 0.2707\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2220, interval miss ratio 0.2494\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2277, interval miss ratio 0.2448\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2397, interval miss ratio 0.2879\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2598, interval miss ratio 0.3602\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2695, interval miss ratio 0.3277\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2699, interval miss ratio 0.2724\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2733, interval miss ratio 0.3007\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2749, interval miss ratio 0.2896\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2820, interval miss ratio 0.3522\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2830, interval miss ratio 0.2945\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2831, interval miss ratio 0.2841\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2836, interval miss ratio 0.2895\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2893, interval miss ratio 0.3704\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2939, interval miss ratio 0.3620\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2941, interval miss ratio 0.2975\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2929, interval miss ratio 0.2726\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2939, interval miss ratio 0.3118\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2976, interval miss ratio 0.3687\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2984, interval miss ratio 0.3137\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2972, interval miss ratio 0.2723\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2987, interval miss ratio 0.3312\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 20000, 2000000 req, miss ratio 0.2980, throughput 12.03 MQPS\n" + }, + "bytes": { + "requests": 2000000, + "miss_ratio": 0.3088, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2140, interval miss ratio 0.2820\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2285, interval miss ratio 0.2575\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2335, interval miss ratio 0.2483\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2472, interval miss ratio 0.3021\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2685, interval miss ratio 0.3753\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2793, interval miss ratio 0.3437\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2800, interval miss ratio 0.2851\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2835, interval miss ratio 0.3117\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2848, interval miss ratio 0.2962\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2922, interval miss ratio 0.3667\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2932, interval miss ratio 0.3039\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2931, interval miss ratio 0.2918\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2936, interval miss ratio 0.3000\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2996, interval miss ratio 0.3831\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3045, interval miss ratio 0.3791\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3049, interval miss ratio 0.3102\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3036, interval miss ratio 0.2826\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3046, interval miss ratio 0.3226\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3084, interval miss ratio 0.3795\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3092, interval miss ratio 0.3249\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3079, interval miss ratio 0.2807\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3095, interval miss ratio 0.3463\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 9MiB, 2000000 req, miss ratio 0.3088, byte miss ratio 0.3432, throughput 14.56 MQPS\n" + }, + "request_miss_delta_pp": 1.0800000000000032 + }, + { + "object_capacity": 40000, + "byte_capacity": 19010466, + "objects": { + "requests": 2000000, + "miss_ratio": 0.2542, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2033, interval miss ratio 0.2606\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2079, interval miss ratio 0.2170\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2082, interval miss ratio 0.2094\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2153, interval miss ratio 0.2434\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2302, interval miss ratio 0.3047\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2369, interval miss ratio 0.2773\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2361, interval miss ratio 0.2302\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2380, interval miss ratio 0.2532\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2385, interval miss ratio 0.2435\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2439, interval miss ratio 0.2973\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2441, interval miss ratio 0.2466\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2437, interval miss ratio 0.2389\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2437, interval miss ratio 0.2438\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2483, interval miss ratio 0.3133\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2519, interval miss ratio 0.3052\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2520, interval miss ratio 0.2534\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2508, interval miss ratio 0.2300\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2514, interval miss ratio 0.2630\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2544, interval miss ratio 0.3108\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2549, interval miss ratio 0.2650\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2537, interval miss ratio 0.2295\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2548, interval miss ratio 0.2785\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 40000, 2000000 req, miss ratio 0.2542, throughput 14.41 MQPS\n" + }, + "bytes": { + "requests": 2000000, + "miss_ratio": 0.2654, + "output": "\u001b[32m[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1\n\u001b[0m\u001b[36m[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2034, interval miss ratio 0.2609\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2109, interval miss ratio 0.2259\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2119, interval miss ratio 0.2148\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2201, interval miss ratio 0.2528\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2369, interval miss ratio 0.3212\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2452, interval miss ratio 0.2947\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2450, interval miss ratio 0.2435\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2475, interval miss ratio 0.2676\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2477, interval miss ratio 0.2498\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2534, interval miss ratio 0.3108\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2538, interval miss ratio 0.2573\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2533, interval miss ratio 0.2475\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2533, interval miss ratio 0.2533\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2583, interval miss ratio 0.3289\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2622, interval miss ratio 0.3198\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2626, interval miss ratio 0.2690\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2614, interval miss ratio 0.2415\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2621, interval miss ratio 0.2752\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2652, interval miss ratio 0.3241\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2658, interval miss ratio 0.2778\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2647, interval miss ratio 0.2408\n\u001b[0m\u001b[32m[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2660, interval miss ratio 0.2952\n\u001b[0m/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 18MiB, 2000000 req, miss ratio 0.2654, byte miss ratio 0.2887, throughput 13.74 MQPS\n" + }, + "request_miss_delta_pp": 1.1200000000000043 + } + ] +} diff --git a/bench/results/current/bytes.log b/bench/results/current/bytes.log new file mode 100644 index 0000000..9288890 --- /dev/null +++ b/bench/results/current/bytes.log @@ -0,0 +1,280 @@ +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 2500 --ignore-obj-size true --num-thread 1 +[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1706, interval miss ratio 0.1706 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2736, interval miss ratio 0.3766 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2931, interval miss ratio 0.3320 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.3006, interval miss ratio 0.3233 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.3164, interval miss ratio 0.3795 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3427, interval miss ratio 0.4743 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3558, interval miss ratio 0.4344 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3561, interval miss ratio 0.3582 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3606, interval miss ratio 0.3964 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3628, interval miss ratio 0.3828 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3725, interval miss ratio 0.4698 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3740, interval miss ratio 0.3906 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3739, interval miss ratio 0.3719 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3744, interval miss ratio 0.3817 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3821, interval miss ratio 0.4890 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3882, interval miss ratio 0.4800 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3884, interval miss ratio 0.3919 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3868, interval miss ratio 0.3599 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3882, interval miss ratio 0.4120 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3929, interval miss ratio 0.4834 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3940, interval miss ratio 0.4160 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3923, interval miss ratio 0.3559 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3941, interval miss ratio 0.4340 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 2500, 2000000 req, miss ratio 0.3932, throughput 16.08 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 1188154 --ignore-obj-size false --num-thread 1 +[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1748, interval miss ratio 0.1748 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2820, interval miss ratio 0.3893 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.3007, interval miss ratio 0.3380 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.3063, interval miss ratio 0.3232 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.3222, interval miss ratio 0.3856 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3486, interval miss ratio 0.4809 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3616, interval miss ratio 0.4393 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3615, interval miss ratio 0.3610 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3656, interval miss ratio 0.3979 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3674, interval miss ratio 0.3842 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3769, interval miss ratio 0.4720 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3781, interval miss ratio 0.3915 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3777, interval miss ratio 0.3719 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3783, interval miss ratio 0.3865 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3855, interval miss ratio 0.4872 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3919, interval miss ratio 0.4865 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3920, interval miss ratio 0.3939 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3903, interval miss ratio 0.3611 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3915, interval miss ratio 0.4131 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3962, interval miss ratio 0.4853 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3973, interval miss ratio 0.4196 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3954, interval miss ratio 0.3570 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3974, interval miss ratio 0.4405 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 1MiB, 2000000 req, miss ratio 0.3965, byte miss ratio 0.4575, throughput 14.05 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 5000 --ignore-obj-size true --num-thread 1 +[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1555, interval miss ratio 0.1555 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2488, interval miss ratio 0.3422 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2691, interval miss ratio 0.3097 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2771, interval miss ratio 0.3011 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2926, interval miss ratio 0.3547 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3176, interval miss ratio 0.4427 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3300, interval miss ratio 0.4043 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3307, interval miss ratio 0.3352 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3352, interval miss ratio 0.3711 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3374, interval miss ratio 0.3576 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3466, interval miss ratio 0.4382 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3481, interval miss ratio 0.3652 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3481, interval miss ratio 0.3484 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3487, interval miss ratio 0.3562 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3560, interval miss ratio 0.4580 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3617, interval miss ratio 0.4477 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3620, interval miss ratio 0.3658 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3605, interval miss ratio 0.3350 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3618, interval miss ratio 0.3857 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3663, interval miss ratio 0.4528 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3673, interval miss ratio 0.3872 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3658, interval miss ratio 0.3343 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3676, interval miss ratio 0.4064 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 5000, 2000000 req, miss ratio 0.3667, throughput 14.06 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 2376308 --ignore-obj-size false --num-thread 1 +[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1580, interval miss ratio 0.1580 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2582, interval miss ratio 0.3584 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2773, interval miss ratio 0.3156 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2838, interval miss ratio 0.3033 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2998, interval miss ratio 0.3636 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.3256, interval miss ratio 0.4544 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3382, interval miss ratio 0.4142 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3388, interval miss ratio 0.3431 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3428, interval miss ratio 0.3749 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3449, interval miss ratio 0.3631 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3539, interval miss ratio 0.4437 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3552, interval miss ratio 0.3699 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3550, interval miss ratio 0.3533 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3557, interval miss ratio 0.3641 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3625, interval miss ratio 0.4585 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3685, interval miss ratio 0.4585 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3688, interval miss ratio 0.3737 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3672, interval miss ratio 0.3394 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3685, interval miss ratio 0.3910 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3730, interval miss ratio 0.4585 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3740, interval miss ratio 0.3951 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3724, interval miss ratio 0.3378 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3742, interval miss ratio 0.4153 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 2MiB, 2000000 req, miss ratio 0.3734, byte miss ratio 0.4267, throughput 14.26 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 10000 --ignore-obj-size true --num-thread 1 +[INFO] 10-07-2026 01:42:28 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:28 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1466, interval miss ratio 0.1466 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2255, interval miss ratio 0.3044 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2448, interval miss ratio 0.2833 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2528, interval miss ratio 0.2767 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2674, interval miss ratio 0.3258 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2905, interval miss ratio 0.4064 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3019, interval miss ratio 0.3703 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3027, interval miss ratio 0.3078 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3069, interval miss ratio 0.3406 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3090, interval miss ratio 0.3279 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3173, interval miss ratio 0.4003 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3187, interval miss ratio 0.3343 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3188, interval miss ratio 0.3204 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3194, interval miss ratio 0.3272 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3260, interval miss ratio 0.4186 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3313, interval miss ratio 0.4108 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3316, interval miss ratio 0.3357 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3303, interval miss ratio 0.3077 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3315, interval miss ratio 0.3535 +[INFO] 10-07-2026 01:42:28 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3357, interval miss ratio 0.4153 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3366, interval miss ratio 0.3546 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3352, interval miss ratio 0.3066 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3369, interval miss ratio 0.3738 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 10000, 2000000 req, miss ratio 0.3361, throughput 13.12 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 4752616 --ignore-obj-size false --num-thread 1 +[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1473, interval miss ratio 0.1473 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2339, interval miss ratio 0.3205 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2523, interval miss ratio 0.2892 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2589, interval miss ratio 0.2785 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2748, interval miss ratio 0.3384 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2990, interval miss ratio 0.4200 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.3110, interval miss ratio 0.3832 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.3120, interval miss ratio 0.3190 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.3160, interval miss ratio 0.3481 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.3178, interval miss ratio 0.3334 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.3261, interval miss ratio 0.4094 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.3274, interval miss ratio 0.3415 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.3273, interval miss ratio 0.3260 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.3279, interval miss ratio 0.3364 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.3345, interval miss ratio 0.4263 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3401, interval miss ratio 0.4249 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3404, interval miss ratio 0.3452 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3389, interval miss ratio 0.3135 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3402, interval miss ratio 0.3627 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3443, interval miss ratio 0.4233 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3453, interval miss ratio 0.3643 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3438, interval miss ratio 0.3124 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3456, interval miss ratio 0.3861 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 5MiB, 2000000 req, miss ratio 0.3448, byte miss ratio 0.3896, throughput 14.97 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 20000 --ignore-obj-size true --num-thread 1 +[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2083, interval miss ratio 0.2707 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2220, interval miss ratio 0.2494 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2277, interval miss ratio 0.2448 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2397, interval miss ratio 0.2879 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2598, interval miss ratio 0.3602 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2695, interval miss ratio 0.3277 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2699, interval miss ratio 0.2724 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2733, interval miss ratio 0.3007 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2749, interval miss ratio 0.2896 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2820, interval miss ratio 0.3522 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2830, interval miss ratio 0.2945 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2831, interval miss ratio 0.2841 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2836, interval miss ratio 0.2895 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2893, interval miss ratio 0.3704 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2939, interval miss ratio 0.3620 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2941, interval miss ratio 0.2975 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2929, interval miss ratio 0.2726 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2939, interval miss ratio 0.3118 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2976, interval miss ratio 0.3687 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2984, interval miss ratio 0.3137 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2972, interval miss ratio 0.2723 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2987, interval miss ratio 0.3312 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 20000, 2000000 req, miss ratio 0.2980, throughput 12.03 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 9505233 --ignore-obj-size false --num-thread 1 +[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2140, interval miss ratio 0.2820 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2285, interval miss ratio 0.2575 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2335, interval miss ratio 0.2483 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2472, interval miss ratio 0.3021 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2685, interval miss ratio 0.3753 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2793, interval miss ratio 0.3437 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2800, interval miss ratio 0.2851 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2835, interval miss ratio 0.3117 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2848, interval miss ratio 0.2962 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2922, interval miss ratio 0.3667 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2932, interval miss ratio 0.3039 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2931, interval miss ratio 0.2918 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2936, interval miss ratio 0.3000 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2996, interval miss ratio 0.3831 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.3045, interval miss ratio 0.3791 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.3049, interval miss ratio 0.3102 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.3036, interval miss ratio 0.2826 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.3046, interval miss ratio 0.3226 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.3084, interval miss ratio 0.3795 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.3092, interval miss ratio 0.3249 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.3079, interval miss ratio 0.2807 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.3095, interval miss ratio 0.3463 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 9MiB, 2000000 req, miss ratio 0.3088, byte miss ratio 0.3432, throughput 14.56 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 40000 --ignore-obj-size true --num-thread 1 +[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru, ignore object size +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 1, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 1, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2033, interval miss ratio 0.2606 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2079, interval miss ratio 0.2170 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2082, interval miss ratio 0.2094 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2153, interval miss ratio 0.2434 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2302, interval miss ratio 0.3047 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2369, interval miss ratio 0.2773 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2361, interval miss ratio 0.2302 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2380, interval miss ratio 0.2532 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2385, interval miss ratio 0.2435 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2439, interval miss ratio 0.2973 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2441, interval miss ratio 0.2466 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2437, interval miss ratio 0.2389 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2437, interval miss ratio 0.2438 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2483, interval miss ratio 0.3133 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2519, interval miss ratio 0.3052 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2520, interval miss ratio 0.2534 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2508, interval miss ratio 0.2300 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2514, interval miss ratio 0.2630 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2544, interval miss ratio 0.3108 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2549, interval miss ratio 0.2650 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2537, interval miss ratio 0.2295 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2548, interval miss ratio 0.2785 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 40000, 2000000 req, miss ratio 0.2542, throughput 14.41 MQPS +$ /Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim/_build/bin/cachesim /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin oracleGeneralBin lru 19010466 --ignore-obj-size false --num-thread 1 +[INFO] 10-07-2026 01:42:29 cli_parser.c:559 (tid=8615423040): trace path: /var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin, trace_type ORACLE_GENERAL_TRACE, ofilepath result/meta.bin.cachesim, 1 threads, warmup -1 sec, total 1 algo x 1 size = 1 caches, lru +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 0, id 1, size 40, cost 1, op nop, valid 1 +[DEBUG] 10-07-2026 01:42:29 request.h:134 (tid=8615423040): req clock_time 1, id 2, size 63, cost 1, op nop, valid 1 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 24.00 hour: 86400 requests, miss ratio 0.1460, interval miss ratio 0.1460 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 48.00 hour: 172800 requests, miss ratio 0.2034, interval miss ratio 0.2609 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 72.00 hour: 259200 requests, miss ratio 0.2109, interval miss ratio 0.2259 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 96.00 hour: 345600 requests, miss ratio 0.2119, interval miss ratio 0.2148 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 120.00 hour: 432000 requests, miss ratio 0.2201, interval miss ratio 0.2528 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 144.00 hour: 518400 requests, miss ratio 0.2369, interval miss ratio 0.3212 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 168.00 hour: 604800 requests, miss ratio 0.2452, interval miss ratio 0.2947 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 192.00 hour: 691200 requests, miss ratio 0.2450, interval miss ratio 0.2435 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 216.00 hour: 777600 requests, miss ratio 0.2475, interval miss ratio 0.2676 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 240.00 hour: 864000 requests, miss ratio 0.2477, interval miss ratio 0.2498 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 264.00 hour: 950400 requests, miss ratio 0.2534, interval miss ratio 0.3108 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 288.00 hour: 1036800 requests, miss ratio 0.2538, interval miss ratio 0.2573 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 312.00 hour: 1123200 requests, miss ratio 0.2533, interval miss ratio 0.2475 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 336.00 hour: 1209600 requests, miss ratio 0.2533, interval miss ratio 0.2533 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 360.00 hour: 1296000 requests, miss ratio 0.2583, interval miss ratio 0.3289 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 384.00 hour: 1382400 requests, miss ratio 0.2622, interval miss ratio 0.3198 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 408.00 hour: 1468800 requests, miss ratio 0.2626, interval miss ratio 0.2690 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 432.00 hour: 1555200 requests, miss ratio 0.2614, interval miss ratio 0.2415 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 456.00 hour: 1641600 requests, miss ratio 0.2621, interval miss ratio 0.2752 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 480.00 hour: 1728000 requests, miss ratio 0.2652, interval miss ratio 0.3241 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 504.00 hour: 1814400 requests, miss ratio 0.2658, interval miss ratio 0.2778 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 528.00 hour: 1900800 requests, miss ratio 0.2647, interval miss ratio 0.2408 +[INFO] 10-07-2026 01:42:29 sim.c:71 (tid=8615423040): meta.bin LRU 552.00 hour: 1987200 requests, miss ratio 0.2660, interval miss ratio 0.2952 +/var/folders/f_/6s4f36dj6q5_yslqhpdxk52r0000gn/T/as-cache-bytes-x6ck60oj/meta.bin LRU cache size 18MiB, 2000000 req, miss ratio 0.2654, byte miss ratio 0.2887, throughput 13.74 MQPS diff --git a/bench/results/current/evidence-1.log b/bench/results/current/evidence-1.log new file mode 100644 index 0000000..9e30616 --- /dev/null +++ b/bench/results/current/evidence-1.log @@ -0,0 +1,758 @@ +( cd bench && go test -count=1 -timeout 45m -v ./... ) +=== RUN TestAgainstOtherLibraries +=== RUN TestAgainstOtherLibraries/zipf + competitor_test.go:74: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 73.51% | 318 | + | otter v2 | 73.27% | 488 | + | ristretto | 69.15% | 148 | + | as-cache (adaptive) | 68.15% | 3083 | + | sturdyc | 62.01% | 307 | +=== RUN TestAgainstOtherLibraries/uniform + competitor_test.go:74: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 10.57% | 526 | + | as-cache (adaptive) | 10.04% | 5310 | + | otter v2 | 9.96% | 1227 | + | ristretto | 9.93% | 228 | + | sturdyc | 9.52% | 593 | +=== RUN TestAgainstOtherLibraries/loop + competitor_test.go:74: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | ristretto | 88.73% | 117 | + | theine | 88.58% | 237 | + | otter v2 | 86.82% | 266 | + | as-cache (adaptive) | 86.39% | 2168 | + | sturdyc | 44.77% | 354 | +=== RUN TestAgainstOtherLibraries/scan + competitor_test.go:74: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 39.88% | 400 | + | otter v2 | 39.87% | 791 | + | ristretto | 39.50% | 209 | + | as-cache (adaptive) | 39.45% | 3476 | + | sturdyc | 30.01% | 472 | +=== RUN TestAgainstOtherLibraries/phase-shift + competitor_test.go:74: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 80.00% | 264 | + | otter v2 | 78.33% | 401 | + | as-cache (adaptive) | 75.19% | 2932 | + | ristretto | 72.91% | 151 | + | sturdyc | 53.38% | 350 | +--- PASS: TestAgainstOtherLibraries (5.04s) + --- PASS: TestAgainstOtherLibraries/zipf (0.87s) + --- PASS: TestAgainstOtherLibraries/uniform (1.58s) + --- PASS: TestAgainstOtherLibraries/loop (0.63s) + --- PASS: TestAgainstOtherLibraries/scan (1.07s) + --- PASS: TestAgainstOtherLibraries/phase-shift (0.82s) +=== RUN TestRistrettoImmediateVisibility + competitor_test.go:120: ristretto retained 0/50 keys written into a cache of 500 +--- PASS: TestRistrettoImmediateVisibility (0.00s) +=== RUN TestCompetitorCapacityHonesty +=== RUN TestCompetitorCapacityHonesty/otter_v2 + competitor_test.go:160: otter v2 asked for 500, holds 500 (1.0x) +=== RUN TestCompetitorCapacityHonesty/theine + competitor_test.go:160: theine asked for 500, holds 500 (1.0x) +=== RUN TestCompetitorCapacityHonesty/ristretto + competitor_test.go:160: ristretto asked for 500, holds 527 (1.1x) +=== RUN TestCompetitorCapacityHonesty/sturdyc + competitor_test.go:160: sturdyc asked for 500, holds 476 (1.0x) +--- PASS: TestCompetitorCapacityHonesty (0.01s) + --- PASS: TestCompetitorCapacityHonesty/otter_v2 (0.01s) + --- PASS: TestCompetitorCapacityHonesty/theine (0.00s) + --- PASS: TestCompetitorCapacityHonesty/ristretto (0.00s) + --- PASS: TestCompetitorCapacityHonesty/sturdyc (0.00s) +=== RUN TestEvidenceHelpersEmpty +--- PASS: TestEvidenceHelpersEmpty (0.00s) +=== RUN TestEvidenceMedianEven +--- PASS: TestEvidenceMedianEven (0.00s) +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor +--- PASS: TestEvidenceMetadataUsesMeasuredConfiguration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor (0.00s) +=== RUN TestReferenceMissPrecisionContract +--- PASS: TestReferenceMissPrecisionContract (0.00s) +=== RUN TestFixedPolicyEvidence +=== RUN TestFixedPolicyEvidence/zipf + evidence_test.go:65: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 123 | + | S3-FIFO | 73.49% | 237 | + | LFU | 73.47% | 451 | + | ARC | 73.16% | 140 | + | W-TinyLFU | 72.86% | 153 | + | 2Q | 72.02% | 240 | + | LRU | 66.91% | 66 | + | TTL | 66.91% | 142 | + | Random | 62.66% | 94 | +=== RUN TestFixedPolicyEvidence/uniform + evidence_test.go:65: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.40% | 338 | + | Random | 10.05% | 184 | + | ARC | 10.03% | 412 | + | LFU | 10.02% | 366 | + | LRU | 9.99% | 132 | + | TTL | 9.99% | 224 | + | 2Q | 9.99% | 335 | + | S3-FIFO | 9.99% | 555 | + | SIEVE | 9.98% | 371 | +=== RUN TestFixedPolicyEvidence/loop + evidence_test.go:65: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 92.26% | 76 | + | Random | 82.21% | 42 | + | S3-FIFO | 79.67% | 208 | + | 2Q | 68.60% | 117 | + | ARC | 0.12% | 299 | + | LRU | 0.00% | 94 | + | LFU | 0.00% | 128 | + | TTL | 0.00% | 201 | + | SIEVE | 0.00% | 311 | +=== RUN TestFixedPolicyEvidence/scan + evidence_test.go:65: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 117 | + | 2Q | 39.95% | 249 | + | ARC | 39.95% | 249 | + | S3-FIFO | 39.95% | 380 | + | SIEVE | 39.95% | 242 | + | W-TinyLFU | 39.77% | 234 | + | Random | 32.00% | 134 | + | LRU | 30.00% | 101 | + | TTL | 30.00% | 191 | +=== RUN TestFixedPolicyEvidence/phase-shift + evidence_test.go:65: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 82.68% | 112 | + | S3-FIFO | 71.59% | 248 | + | SIEVE | 69.74% | 134 | + | LFU | 69.66% | 263 | + | Random | 68.44% | 80 | + | 2Q | 61.48% | 159 | + | ARC | 39.92% | 259 | + | LRU | 34.50% | 93 | + | TTL | 34.50% | 187 | +--- PASS: TestFixedPolicyEvidence (1.95s) + --- PASS: TestFixedPolicyEvidence/zipf (0.33s) + --- PASS: TestFixedPolicyEvidence/uniform (0.58s) + --- PASS: TestFixedPolicyEvidence/loop (0.30s) + --- PASS: TestFixedPolicyEvidence/scan (0.38s) + --- PASS: TestFixedPolicyEvidence/phase-shift (0.31s) +=== RUN TestAdaptiveVersusFixed +=== RUN TestAdaptiveVersusFixed/zipf + evidence_test.go:135: + zipf vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 127 | + | S3-FIFO | 73.49% | 240 | + | LFU | 73.47% | 447 | + | ARC | 73.16% | 138 | + | W-TinyLFU | 72.75% | 144 | + | 2Q | 72.02% | 152 | + | LRU | 66.91% | 67 | + | TTL | 66.91% | 145 | + | adaptive | 66.33% | 2984 | + | Random | 62.51% | 93 | +=== RUN TestAdaptiveVersusFixed/uniform + evidence_test.go:135: + uniform vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.24% | 332 | + | ARC | 10.03% | 424 | + | Random | 10.02% | 179 | + | LFU | 10.02% | 390 | + | adaptive | 10.01% | 5478 | + | LRU | 9.99% | 116 | + | TTL | 9.99% | 226 | + | 2Q | 9.99% | 342 | + | S3-FIFO | 9.99% | 549 | + | SIEVE | 9.98% | 368 | +=== RUN TestAdaptiveVersusFixed/loop + evidence_test.go:135: + loop vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 92.18% | 77 | + | adaptive | 86.93% | 2168 | + | Random | 82.10% | 41 | + | S3-FIFO | 79.67% | 195 | + | 2Q | 68.60% | 122 | + | ARC | 0.12% | 329 | + | LRU | 0.00% | 93 | + | LFU | 0.00% | 122 | + | TTL | 0.00% | 210 | + | SIEVE | 0.00% | 323 | +=== RUN TestAdaptiveVersusFixed/scan + evidence_test.go:135: + scan vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 127 | + | 2Q | 39.95% | 239 | + | ARC | 39.95% | 266 | + | S3-FIFO | 39.95% | 385 | + | SIEVE | 39.95% | 241 | + | W-TinyLFU | 39.82% | 236 | + | adaptive | 35.33% | 3979 | + | Random | 31.96% | 136 | + | LRU | 30.00% | 95 | + | TTL | 30.00% | 183 | +=== RUN TestAdaptiveVersusFixed/phase-shift + evidence_test.go:135: + phase-shift vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 83.10% | 115 | + | adaptive | 74.54% | 3075 | + | S3-FIFO | 71.59% | 258 | + | SIEVE | 69.74% | 134 | + | LFU | 69.66% | 256 | + | Random | 68.28% | 79 | + | 2Q | 61.48% | 170 | + | ARC | 39.92% | 260 | + | LRU | 34.50% | 92 | + | TTL | 34.50% | 180 | +=== NAME TestAdaptiveVersusFixed + evidence_test.go:159: + | Workload | Adaptive | Best fixed | Worst fixed | Adaptive vs best | + | --- | --- | --- | --- | --- | + | zipf | 66.33% | SIEVE 73.58% | 62.51% | -7.26 pts | + | uniform | 10.01% | W-TinyLFU 12.24% | 9.98% | -2.23 pts | + | loop | 86.93% | W-TinyLFU 92.18% | 0.00% | -5.25 pts | + | scan | 35.33% | LFU 39.95% | 30.00% | -4.62 pts | + | phase-shift | 74.54% | W-TinyLFU 83.10% | 34.50% | -8.56 pts | + +--- PASS: TestAdaptiveVersusFixed (5.48s) + --- PASS: TestAdaptiveVersusFixed/zipf (0.91s) + --- PASS: TestAdaptiveVersusFixed/uniform (1.68s) + --- PASS: TestAdaptiveVersusFixed/loop (0.74s) + --- PASS: TestAdaptiveVersusFixed/scan (1.18s) + --- PASS: TestAdaptiveVersusFixed/phase-shift (0.92s) +=== RUN TestSamplingPreservesPolicyRanking +=== RUN TestSamplingPreservesPolicyRanking/zipf + evidence_test.go:219: + zipf + full-size shadows ARC=81.62% TwoQueue=81.32% TinyLFU=81.21% LFU=81.19% SIEVE=81.19% S3FIFO=81.12% LRU=79.22% TTL=79.22% Random=76.66% + -> picks ARC + evidence_test.go:233: rate 0.05 ARC=76.03% TinyLFU=75.74% TwoQueue=75.74% S3FIFO=75.64% SIEVE=75.54% LFU=75.54% LRU=72.97% TTL=72.68% Random=69.88% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.10 ARC=74.94% TinyLFU=74.77% TwoQueue=74.64% SIEVE=74.63% LFU=74.63% S3FIFO=74.47% LRU=72.04% TTL=71.89% Random=68.25% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.30 ARC=80.61% TinyLFU=80.44% TwoQueue=80.29% LFU=80.15% SIEVE=80.15% S3FIFO=80.07% LRU=78.14% TTL=78.09% Random=75.27% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.50 ARC=73.07% TinyLFU=72.66% TwoQueue=72.65% LFU=72.44% SIEVE=72.44% S3FIFO=72.37% LRU=69.63% TTL=69.53% Random=65.86% + -> picks ARC, regret 0.00 pts +=== RUN TestSamplingPreservesPolicyRanking/scan + evidence_test.go:219: + scan + full-size shadows SIEVE=28.34% S3FIFO=28.34% ARC=28.34% LFU=28.34% TwoQueue=28.34% TinyLFU=28.21% LRU=21.43% TTL=21.43% Random=18.84% + -> picks SIEVE + evidence_test.go:233: rate 0.05 ARC=28.98% LFU=28.98% TwoQueue=28.98% S3FIFO=28.98% SIEVE=28.98% TinyLFU=28.82% TTL=21.92% LRU=21.92% Random=19.28% + -> picks LFU, regret 0.00 pts + evidence_test.go:233: rate 0.10 LFU=28.56% TwoQueue=28.56% SIEVE=28.56% S3FIFO=28.56% ARC=28.56% TinyLFU=28.47% TTL=21.60% LRU=21.60% Random=18.98% + -> picks LFU, regret 0.00 pts + evidence_test.go:233: rate 0.30 LFU=28.41% SIEVE=28.41% TwoQueue=28.41% S3FIFO=28.41% ARC=28.41% TinyLFU=28.24% TTL=21.49% LRU=21.49% Random=18.95% + -> picks TwoQueue, regret 0.00 pts + evidence_test.go:233: rate 0.50 LFU=28.30% TwoQueue=28.30% S3FIFO=28.30% ARC=28.30% SIEVE=28.30% TinyLFU=27.51% TTL=21.40% LRU=21.40% Random=18.87% + -> picks ARC, regret 0.00 pts +--- PASS: TestSamplingPreservesPolicyRanking (17.69s) + --- PASS: TestSamplingPreservesPolicyRanking/zipf (1.47s) + --- PASS: TestSamplingPreservesPolicyRanking/scan (16.13s) +=== RUN TestSamplingPreservesClearOrderings +=== RUN TestSamplingPreservesClearOrderings/loop + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +=== RUN TestSamplingPreservesClearOrderings/scan + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +--- PASS: TestSamplingPreservesClearOrderings (21.39s) + --- PASS: TestSamplingPreservesClearOrderings/loop (1.72s) + --- PASS: TestSamplingPreservesClearOrderings/scan (19.59s) +=== RUN TestMemoryMultiplier + memory_test.go:117: + memory holding 50000 entries of 256-byte values, 8 policies + single LRU 18.5 MiB (1.00x) + adaptive, no sampling 72.3 MiB (3.92x) + adaptive, sample 0.05 25.7 MiB (1.39x) + memory_test.go:143: each shadow costs 7.7 MiB against a 18.5 MiB full cache (0.42x) +--- PASS: TestMemoryMultiplier (0.34s) +=== RUN TestAllocationsPerOperation + memory_test.go:183: + Get on a warm cache: + memory_test.go:178: single LRU 40.0 ns/op 0 B/op 0 allocs/op + memory_test.go:178: adaptive, no sampling 1276.0 ns/op 4 B/op 0 allocs/op + memory_test.go:178: adaptive, sample 0.05 225.0 ns/op 30 B/op 0 allocs/op +--- PASS: TestAllocationsPerOperation (3.86s) +=== RUN TestLRUMatchesReference + reference_test.go:68: AS_CACHE_LRU_REFERENCE is not set; run ./scripts/verify-ref.sh +--- SKIP: TestLRUMatchesReference (0.00s) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop + shadow_fidelity_test.go:115: TinyLFU standalone 99.38% shadow 88.54% (-10.84 pts) + shadow_fidelity_test.go:115: Random standalone 82.16% shadow 82.19% (+0.03 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 79.73% shadow 79.73% (+0.00 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 68.68% shadow 68.68% (+0.00 pts) + shadow_fidelity_test.go:115: ARC standalone 0.10% shadow 0.10% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: SIEVE standalone 0.00% shadow 0.00% (+0.00 pts) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf + shadow_fidelity_test.go:115: SIEVE standalone 73.58% shadow 73.58% (+0.00 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 73.49% shadow 73.49% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 73.47% shadow 73.47% (+0.00 pts) + shadow_fidelity_test.go:115: ARC standalone 73.16% shadow 73.16% (+0.00 pts) + shadow_fidelity_test.go:115: TinyLFU standalone 73.57% shadow 72.18% (-1.39 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 72.02% shadow 72.02% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: Random standalone 62.49% shadow 62.62% (+0.14 pts) +--- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe (2.10s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop (1.15s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf (0.91s) +=== RUN TestSieveLFUDistinction +=== RUN TestSieveLFUDistinction/cold_scan +=== RUN TestSieveLFUDistinction/protect_visited +=== RUN TestSieveLFUDistinction/frequency_outlives_bit +--- PASS: TestSieveLFUDistinction (0.00s) + --- PASS: TestSieveLFUDistinction/cold_scan (0.00s) + --- PASS: TestSieveLFUDistinction/protect_visited (0.00s) + --- PASS: TestSieveLFUDistinction/frequency_outlives_bit (0.00s) +=== RUN TestActivePolicyTimeline + timeline_test.go:154: + phase-shift timeline (240000 requests, cache 500, 12 phases) + phase Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L--------------------------------------- (Z = zipf phase, L = loop phase) + LRU ######### ####### ######### ########### ######### + LFU ######## + TwoQueue ################ ########## ######## ########## ############ ######### ####### ########## + ARC ###### ######### ###### ###### ###### ####### ####### ####### ####### + TTL ######## ######## ###### #### ####### ####### + TinyLFU ############## ###### ########### ###### ########################################### ############ ####### ### ############## ####### ############ ######## ########### ###### ######## ##### + S3FIFO ###### ####### ##### ##### ########## #### ###### ## ##### + SIEVE ###### ######### ###### + + share of time active: LRU 9%, LFU 2%, TwoQueue 17%, ARC 13%, TTL 8%, TinyLFU 36%, S3FIFO 10%, SIEVE 4% + hit rate 58.34% +--- PASS: TestActivePolicyTimeline (0.16s) +=== RUN TestTraceEvidence +=== RUN TestTraceEvidence/twitter_cluster052.csv + trace_evidence_test.go:166: + twitter_cluster052.csv + Twitter Twemcache production KV cache (OSDI '20) + real trace: 1000000 requests over 255333 distinct keys + cache 10000 entries, 3.9% of the 255333 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | SIEVE | 59.78% | + | S3-FIFO | 59.73% | + | 2Q | 59.62% | + | ARC | 58.99% | + | adaptive, 20 epochs (every 50000 requests) | 58.89% [58.80-58.97] | + | adaptive, 10 epochs (every 100000 requests) | 58.69% [58.67-58.76] | + | LRU | 58.39% | + | TTL | 58.39% | + | adaptive, 50 epochs (every 20000 requests) | 58.20% [58.14-58.23] | + | W-TinyLFU | 56.53% [54.48-58.74] | + | Random | 54.81% [54.76-54.83] | + | LFU | 41.44% | +=== RUN TestTraceEvidence/lirs_loop.trace + trace_evidence_test.go:166: + lirs_loop.trace + LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02) + real trace: 505500 requests over 1011 distinct keys + cache 500 entries, 49.5% of the 1011 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | W-TinyLFU | 52.09% [50.18-59.77] | + | adaptive, 50 epochs (every 10110 requests) | 45.09% [41.15-45.31] | + | adaptive, 20 epochs (every 25275 requests) | 43.63% [39.60-44.49] | + | adaptive, 10 epochs (every 50550 requests) | 39.75% [35.81-40.49] | + | Random | 19.66% [19.63-19.72] | + | 2Q | 0.00% | + | TTL | 0.00% | + | S3-FIFO | 0.00% | + | SIEVE | 0.00% | + | LFU | 0.00% | + | ARC | 0.00% | + | LRU | 0.00% | +=== RUN TestTraceEvidence/lirs_2_pools.trace + trace_evidence_test.go:166: + lirs_2_pools.trace + LIRS 2_pools: two interleaved pools with different locality + real trace: 100000 requests over 9939 distinct keys + cache 1000 entries, 10.1% of the 9939 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | W-TinyLFU | 54.60% [54.59-55.11] | + | adaptive, 10 epochs (every 10000 requests) | 54.42% [54.40-54.43] | + | TTL | 54.41% | + | LRU | 54.41% | + | adaptive, 20 epochs (every 5000 requests) | 54.41% [54.37-54.69] | + | 2Q | 54.40% | + | ARC | 54.37% | + | S3-FIFO | 54.37% | + | LFU | 54.36% | + | SIEVE | 54.36% | + | adaptive, 50 epochs (every 2000 requests) | 54.19% [54.16-54.28] | + | Random | 49.95% [49.88-50.00] | +=== RUN TestTraceEvidence/arc_p3 + trace_evidence_test.go:166: + arc_p3 + ARC paper P3 workstation trace (FAST '03) + ARC trace: 138478 records expanded to 2000000 accesses over 426527 distinct blocks + cache 20000 entries, 4.7% of the 426527 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 20 epochs (every 100000 requests) | 12.64% [12.24-13.00] | + | adaptive, 10 epochs (every 200000 requests) | 12.42% [12.15-12.68] | + | adaptive, 50 epochs (every 40000 requests) | 12.40% [8.58-13.59] | + | W-TinyLFU | 12.23% [12.09-12.38] | + | S3-FIFO | 10.75% | + | ARC | 10.25% | + | 2Q | 7.74% | + | LFU | 4.82% | + | SIEVE | 4.82% | + | Random | 3.08% [3.07-3.09] | + | LRU | 1.87% | + | TTL | 1.87% | +=== RUN TestTraceEvidence/arc_oltp + trace_evidence_test.go:166: + arc_oltp + ARC paper OLTP database trace (FAST '03) + ARC trace: 914145 records expanded to 914145 accesses over 186880 distinct blocks + cache 20000 entries, 10.7% of the 186880 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 68.25% | + | ARC | 67.80% | + | S3-FIFO | 67.79% | + | SIEVE | 67.72% | + | adaptive, 10 epochs (every 91414 requests) | 67.64% [67.46-67.74] | + | TTL | 67.06% | + | LRU | 67.06% | + | adaptive, 20 epochs (every 45707 requests) | 67.05% [66.92-67.22] | + | adaptive, 50 epochs (every 18282 requests) | 66.05% [65.86-66.59] | + | W-TinyLFU | 63.11% [62.04-63.40] | + | Random | 63.02% [63.01-63.05] | + | LFU | 45.43% | +=== RUN TestTraceEvidence/meta_kvcache_202206_1 + trace_evidence_test.go:166: + meta_kvcache_202206_1 + Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206) + Meta kvcache trace: 1160580 rows (942355 reads, 218225 writes) expanded by op_count to 2000000 reads over 340723 distinct keys + cache 10000 entries, 2.9% of the 340723 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 69.05% | + | SIEVE | 68.92% | + | W-TinyLFU | 68.50% [68.44-68.57] | + | ARC | 68.27% | + | 2Q | 68.16% | + | adaptive, 10 epochs (every 200000 requests) | 68.13% [67.84-68.29] | + | adaptive, 20 epochs (every 100000 requests) | 67.64% [67.58-67.74] | + | adaptive, 50 epochs (every 40000 requests) | 66.90% [66.86-66.93] | + | LFU | 66.87% | + | TTL | 66.39% | + | LRU | 66.39% | + | Random | 65.18% [65.17-65.19] | +=== RUN TestTraceEvidence/msr_hm_0 + trace_evidence_test.go:166: + msr_hm_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 418343 records (120058 reads, 298285 writes) expanded to 2000000 block accesses from reads over 818034 distinct 512-byte blocks + cache 20000 entries, 2.4% of the 818034 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 17.01% | + | ARC | 16.65% | + | W-TinyLFU | 16.05% [15.89-16.13] | + | S3-FIFO | 15.84% | + | SIEVE | 15.19% | + | LFU | 14.99% | + | adaptive, 50 epochs (every 40000 requests) | 14.55% [14.20-15.83] | + | adaptive, 10 epochs (every 200000 requests) | 14.45% [14.34-15.12] | + | adaptive, 20 epochs (every 100000 requests) | 12.89% [12.12-13.75] | + | Random | 12.63% [12.60-12.64] | + | TTL | 11.40% | + | LRU | 11.40% | +=== RUN TestTraceEvidence/msr_prn_0 + trace_evidence_test.go:166: + msr_prn_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96363 records (37302 reads, 59061 writes) expanded to 2000000 block accesses from reads over 1900653 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1900653 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | LFU | 1.06% | + | SIEVE | 1.06% | + | adaptive, 50 epochs (every 40000 requests) | 1.06% [1.02-1.07] | + | 2Q | 1.04% | + | ARC | 1.02% | + | S3-FIFO | 1.01% | + | LRU | 1.00% | + | TTL | 1.00% | + | Random | 0.94% [0.94-0.95] | + | adaptive, 20 epochs (every 100000 requests) | 0.93% [0.71-0.97] | + | adaptive, 10 epochs (every 200000 requests) | 0.87% [0.84-0.87] | + | W-TinyLFU | 0.73% [0.69-0.78] | +=== RUN TestTraceEvidence/msr_proj_0 + trace_evidence_test.go:166: + msr_proj_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 73170 records (43792 reads, 29378 writes) expanded to 2000000 block accesses from reads over 1748195 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1748195 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 5.79% | + | adaptive, 50 epochs (every 40000 requests) | 5.42% [5.33-5.56] | + | 2Q | 5.38% | + | ARC | 5.38% | + | TTL | 5.35% | + | LRU | 5.35% | + | Random | 5.20% [5.20-5.21] | + | adaptive, 10 epochs (every 200000 requests) | 5.16% [5.13-5.35] | + | adaptive, 20 epochs (every 100000 requests) | 5.08% [5.08-5.13] | + | SIEVE | 4.73% | + | LFU | 4.73% | + | W-TinyLFU | 4.29% [4.11-4.98] | +=== RUN TestTraceEvidence/msr_src1_2 + trace_evidence_test.go:166: + msr_src1_2 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 52584 records (28999 reads, 23585 writes) expanded to 2000000 block accesses from reads over 1947636 distinct 512-byte blocks + cache 20000 entries, 1.0% of the 1947636 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 1.77% | + | ARC | 1.73% | + | LRU | 1.70% | + | TTL | 1.70% | + | adaptive, 10 epochs (every 200000 requests) | 1.70% | + | adaptive, 20 epochs (every 100000 requests) | 1.70% | + | S3-FIFO | 1.70% | + | adaptive, 50 epochs (every 40000 requests) | 1.70% [1.24-1.70] | + | Random | 1.63% [1.63-1.64] | + | LFU | 1.42% | + | SIEVE | 1.42% | + | W-TinyLFU | 1.14% [0.97-1.22] | +=== RUN TestTraceEvidence/msr_usr_0 + trace_evidence_test.go:166: + msr_usr_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96189 records (40753 reads, 55436 writes) expanded to 2000000 block accesses from reads over 1778953 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1778953 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 50 epochs (every 40000 requests) | 3.66% [3.41-3.67] | + | S3-FIFO | 3.58% | + | 2Q | 3.57% | + | LRU | 3.57% | + | TTL | 3.57% | + | adaptive, 10 epochs (every 200000 requests) | 3.57% [3.00-3.57] | + | ARC | 3.55% | + | adaptive, 20 epochs (every 100000 requests) | 3.50% [3.50-3.52] | + | Random | 3.49% [3.49-3.49] | + | W-TinyLFU | 2.86% [2.82-3.00] | + | LFU | 1.46% | + | SIEVE | 1.46% | +=== RUN TestTraceEvidence/msr_web_0 + trace_evidence_test.go:166: + msr_web_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 71173 records (34449 reads, 36724 writes) expanded to 2000000 block accesses from reads over 1855956 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1855956 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | LFU | 2.61% | + | SIEVE | 2.61% | + | 2Q | 2.61% | + | ARC | 2.60% | + | Random | 2.55% [2.55-2.56] | + | S3-FIFO | 2.49% | + | adaptive, 50 epochs (every 40000 requests) | 2.46% [2.44-2.48] | + | adaptive, 20 epochs (every 100000 requests) | 2.41% [2.41-2.41] | + | adaptive, 10 epochs (every 200000 requests) | 2.35% [2.22-2.35] | + | LRU | 2.30% | + | TTL | 2.30% | + | W-TinyLFU | 2.29% [2.26-2.32] | +=== NAME TestTraceEvidence + trace_evidence_test.go:205: + | Trace | Requests | Best fixed | Worst fixed | Adaptive, 10 epochs | Adaptive, 20 epochs | Adaptive, 50 epochs | + | --- | --- | --- | --- | --- | --- | --- | + | twitter_cluster052.csv | 1000000 | SIEVE 59.78% | LFU 41.44% | 58.69% [58.67-58.76] (-1.10) | 58.89% [58.80-58.97] (-0.89) | 58.20% [58.14-58.23] (-1.59) | + | lirs_loop.trace | 505500 | W-TinyLFU 52.09% [50.18-59.77] | 2Q 0.00% | 39.75% [35.81-40.49] (-12.35) | 43.63% [39.60-44.49] (-8.46) | 45.09% [41.15-45.31] (-7.00) | + | lirs_2_pools.trace | 100000 | W-TinyLFU 54.60% [54.59-55.11] | Random 49.95% [49.88-50.00] | 54.42% [54.40-54.43] (-0.18) | 54.41% [54.37-54.69] (-0.18) | 54.19% [54.16-54.28] (-0.41) | + | arc_p3 | 2000000 | W-TinyLFU 12.23% [12.09-12.38] | LRU 1.87% | 12.42% [12.15-12.68] (+0.19) | 12.64% [12.24-13.00] (+0.41) | 12.40% [8.58-13.59] (+0.17) | + | arc_oltp | 914145 | 2Q 68.25% | LFU 45.43% | 67.64% [67.46-67.74] (-0.61) | 67.05% [66.92-67.22] (-1.20) | 66.05% [65.86-66.59] (-2.20) | + | meta_kvcache_202206_1 | 2000000 | S3-FIFO 69.05% | Random 65.18% [65.17-65.19] | 68.13% [67.84-68.29] (-0.93) | 67.64% [67.58-67.74] (-1.41) | 66.90% [66.86-66.93] (-2.16) | + | msr_hm_0 | 2000000 | 2Q 17.01% | LRU 11.40% | 14.45% [14.34-15.12] (-2.56) | 12.89% [12.12-13.75] (-4.12) | 14.55% [14.20-15.83] (-2.46) | + | msr_prn_0 | 2000000 | LFU 1.06% | W-TinyLFU 0.73% [0.69-0.78] | 0.87% [0.84-0.87] (-0.19) | 0.93% [0.71-0.97] (-0.12) | 1.06% [1.02-1.07] (-0.00) | + | msr_proj_0 | 2000000 | S3-FIFO 5.79% | W-TinyLFU 4.29% [4.11-4.98] | 5.16% [5.13-5.35] (-0.64) | 5.08% [5.08-5.13] (-0.71) | 5.42% [5.33-5.56] (-0.37) | + | msr_src1_2 | 2000000 | 2Q 1.77% | W-TinyLFU 1.14% [0.97-1.22] | 1.70% (-0.06) | 1.70% (-0.06) | 1.70% [1.24-1.70] (-0.07) | + | msr_usr_0 | 2000000 | S3-FIFO 3.58% | LFU 1.46% | 3.57% [3.00-3.57] (-0.01) | 3.50% [3.50-3.52] (-0.08) | 3.66% [3.41-3.67] (+0.07) | + | msr_web_0 | 2000000 | LFU 2.61% | W-TinyLFU 2.29% [2.26-2.32] | 2.35% [2.22-2.35] (-0.26) | 2.41% [2.41-2.41] (-0.20) | 2.46% [2.44-2.48] (-0.15) | + trace_evidence_test.go:206: wrote /private/tmp/claude-501/-Users-sshaplygin-GithubProjects-as-cache/8c03863a-50ed-4a03-b751-0a7c468b2089/scratchpad/evidence-1cb65fe/traces-1.json +--- PASS: TestTraceEvidence (436.64s) + --- PASS: TestTraceEvidence/twitter_cluster052.csv (24.23s) + --- PASS: TestTraceEvidence/lirs_loop.trace (10.71s) + --- PASS: TestTraceEvidence/lirs_2_pools.trace (1.38s) + --- PASS: TestTraceEvidence/arc_p3 (47.50s) + --- PASS: TestTraceEvidence/arc_oltp (19.73s) + --- PASS: TestTraceEvidence/meta_kvcache_202206_1 (29.83s) + --- PASS: TestTraceEvidence/msr_hm_0 (50.74s) + --- PASS: TestTraceEvidence/msr_prn_0 (46.99s) + --- PASS: TestTraceEvidence/msr_proj_0 (44.43s) + --- PASS: TestTraceEvidence/msr_src1_2 (51.60s) + --- PASS: TestTraceEvidence/msr_usr_0 (53.50s) + --- PASS: TestTraceEvidence/msr_web_0 (50.89s) +=== RUN TestLoadMSRTraceExpandsEachRecordIntoItsBlocks +--- PASS: TestLoadMSRTraceExpandsEachRecordIntoItsBlocks (0.00s) +=== RUN TestLoadMSRTraceNamespacesByHostAndDisk +--- PASS: TestLoadMSRTraceNamespacesByHostAndDisk (0.00s) +=== RUN TestLoadMSRTraceSkipsWritesUnlessAsked +--- PASS: TestLoadMSRTraceSkipsWritesUnlessAsked (0.00s) +=== RUN TestLoadMSRTraceHonoursBlockSizeAndLimit +--- PASS: TestLoadMSRTraceHonoursBlockSizeAndLimit (0.00s) +=== RUN TestLoadMSRTraceToleratesHeadersAndTruncation +--- PASS: TestLoadMSRTraceToleratesHeadersAndTruncation (0.00s) +=== RUN TestLoadMSRTraceRejectsAFileWithNoRecords +--- PASS: TestLoadMSRTraceRejectsAFileWithNoRecords (0.00s) +=== RUN TestLoadMetaKVTraceExpandsOpCount +--- PASS: TestLoadMetaKVTraceExpandsOpCount (0.00s) +=== RUN TestLoadMetaKVTraceReadsThe2024Layout +--- PASS: TestLoadMetaKVTraceReadsThe2024Layout (0.00s) +=== RUN TestLoadMetaKVTraceIncludesWritesOnRequest +--- PASS: TestLoadMetaKVTraceIncludesWritesOnRequest (0.00s) +=== RUN TestLoadMetaKVTraceHonoursTheLimitInsideARow +--- PASS: TestLoadMetaKVTraceHonoursTheLimitInsideARow (0.00s) +=== RUN TestLoadMetaKVTraceToleratesATruncatedTail +--- PASS: TestLoadMetaKVTraceToleratesATruncatedTail (0.00s) +=== RUN TestLoadMetaKVTraceRejectsAnUnrecognisedHeader +--- PASS: TestLoadMetaKVTraceRejectsAnUnrecognisedHeader (0.00s) +=== RUN TestEveryArmDrivesAnAdaptiveCache +--- PASS: TestEveryArmDrivesAnAdaptiveCache (0.01s) +=== RUN TestLoadMSRTraceCoversEveryBlockAByteRangeTouches +--- PASS: TestLoadMSRTraceCoversEveryBlockAByteRangeTouches (0.00s) +=== RUN TestLoadMSRTraceSeesReuseBetweenOverlappingRequests +--- PASS: TestLoadMSRTraceSeesReuseBetweenOverlappingRequests (0.00s) +=== RUN TestLoadMSRTraceCapsOneRecordsExpansion +--- PASS: TestLoadMSRTraceCapsOneRecordsExpansion (0.02s) +=== RUN TestLoadMSRTraceRequiresEveryColumn +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_size +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_type +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_time +--- PASS: TestLoadMSRTraceRequiresEveryColumn (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_size (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_type (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_time (0.00s) +=== RUN TestLoadMSRTraceCountsOnlyRecognisedTypes +--- PASS: TestLoadMSRTraceCountsOnlyRecognisedTypes (0.00s) +=== RUN TestLoadMetaKVTraceRequiresOpCount +--- PASS: TestLoadMetaKVTraceRequiresOpCount (0.00s) +=== RUN TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount +--- PASS: TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount (0.00s) +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta +--- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta (0.00s) +=== RUN TestTraceLoaders +=== RUN TestTraceLoaders/lirs_loop.trace.gz +=== RUN TestTraceLoaders/lirs_2_pools.trace.gz +=== RUN TestTraceLoaders/meta_kvcache_202206_1.csv +=== RUN TestTraceLoaders/meta_kvcache_expansion + trace_test.go:216: 1160580 rows (942355 reads, 218225 writes) -> 2000000 requests over 340723 distinct keys +=== RUN TestTraceLoaders/arc_p3_expansion +--- PASS: TestTraceLoaders (2.68s) + --- PASS: TestTraceLoaders/lirs_loop.trace.gz (0.05s) + --- PASS: TestTraceLoaders/lirs_2_pools.trace.gz (0.01s) + --- PASS: TestTraceLoaders/meta_kvcache_202206_1.csv (1.99s) + --- PASS: TestTraceLoaders/meta_kvcache_expansion (0.35s) + --- PASS: TestTraceLoaders/arc_p3_expansion (0.27s) +=== RUN TestAdaptiveTuning + tuning_test.go:68: arc_p3 10 epochs cold gates=false: 12.08% [12.02-12.25] + tuning_test.go:68: arc_p3 10 epochs cold gates=true: 7.52% [4.75-7.73] + tuning_test.go:68: arc_p3 10 epochs warm gates=false: 12.46% [12.09-12.56] + tuning_test.go:68: arc_p3 10 epochs warm gates=true: 7.82% [7.44-8.27] + tuning_test.go:68: arc_p3 20 epochs cold gates=false: 12.65% [11.13-13.74] + tuning_test.go:68: arc_p3 20 epochs cold gates=true: 9.01% [7.43-10.39] + tuning_test.go:68: arc_p3 20 epochs warm gates=false: 12.84% [12.79-13.12] + tuning_test.go:68: arc_p3 20 epochs warm gates=true: 9.28% [8.98-10.47] + tuning_test.go:68: arc_p3 50 epochs cold gates=false: 11.87% [8.10-12.27] + tuning_test.go:68: arc_p3 50 epochs cold gates=true: 9.71% [7.79-11.19] + tuning_test.go:68: arc_p3 50 epochs warm gates=false: 12.23% [12.21-12.43] + tuning_test.go:68: arc_p3 50 epochs warm gates=true: 11.14% [8.31-11.48] +--- PASS: TestAdaptiveTuning (102.35s) +=== RUN TestSwitchWarmupCost + warmup_test.go:120: + hit rate after a switch from LRU to LFU at request 100000 (zipf, 200000 requests, cache 500) + | Configuration | 0-1000 | 1000-5000 | 5000-20000 | 20000-100000 | + | --- | --- | --- | --- | --- | + | LFU all along (no warm-up) | 77.00% | 74.28% | 74.59% | 73.90% | + | LRU, never switched | 70.50% | 67.90% | 67.58% | 66.82% | + | cold | 59.50% | 69.45% | 72.93% | 73.52% | + | warm | 70.50% | 70.03% | 72.91% | 73.55% | + | gradual | 70.40% | 70.12% | 72.88% | 73.52% | + | gradual, capped at 10 Gets | 59.90% | 69.47% | 72.93% | 73.52% | + | gradual, capped at 100 Gets | 63.90% | 69.58% | 72.99% | 73.53% | + | gradual, capped at 1000 Gets | 70.40% | 70.12% | 72.88% | 73.52% | +--- PASS: TestSwitchWarmupCost (0.70s) +PASS +ok github.com/sshaplygin/as-cache/bench 600.721s diff --git a/bench/results/current/evidence-2.log b/bench/results/current/evidence-2.log new file mode 100644 index 0000000..5111433 --- /dev/null +++ b/bench/results/current/evidence-2.log @@ -0,0 +1,758 @@ +( cd bench && go test -count=1 -timeout 45m -v ./... ) +=== RUN TestAgainstOtherLibraries +=== RUN TestAgainstOtherLibraries/zipf + competitor_test.go:74: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | otter v2 | 73.20% | 472 | + | theine | 73.02% | 303 | + | ristretto | 69.42% | 168 | + | as-cache (adaptive) | 67.92% | 2910 | + | sturdyc | 62.02% | 310 | +=== RUN TestAgainstOtherLibraries/uniform + competitor_test.go:74: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 10.48% | 522 | + | otter v2 | 10.04% | 1217 | + | as-cache (adaptive) | 9.98% | 5408 | + | ristretto | 9.97% | 204 | + | sturdyc | 9.50% | 609 | +=== RUN TestAgainstOtherLibraries/loop + competitor_test.go:74: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | ristretto | 88.94% | 145 | + | theine | 88.71% | 262 | + | as-cache (adaptive) | 86.31% | 2528 | + | otter v2 | 85.32% | 371 | + | sturdyc | 44.79% | 381 | +=== RUN TestAgainstOtherLibraries/scan + competitor_test.go:74: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | otter v2 | 39.87% | 898 | + | theine | 39.85% | 401 | + | as-cache (adaptive) | 39.45% | 3682 | + | ristretto | 38.64% | 195 | + | sturdyc | 30.01% | 476 | +=== RUN TestAgainstOtherLibraries/phase-shift + competitor_test.go:74: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | otter v2 | 78.55% | 433 | + | theine | 76.83% | 310 | + | ristretto | 73.95% | 151 | + | as-cache (adaptive) | 70.01% | 3320 | + | sturdyc | 53.08% | 348 | +--- PASS: TestAgainstOtherLibraries (5.29s) + --- PASS: TestAgainstOtherLibraries/zipf (0.83s) + --- PASS: TestAgainstOtherLibraries/uniform (1.59s) + --- PASS: TestAgainstOtherLibraries/loop (0.74s) + --- PASS: TestAgainstOtherLibraries/scan (1.13s) + --- PASS: TestAgainstOtherLibraries/phase-shift (0.91s) +=== RUN TestRistrettoImmediateVisibility + competitor_test.go:120: ristretto retained 0/50 keys written into a cache of 500 +--- PASS: TestRistrettoImmediateVisibility (0.00s) +=== RUN TestCompetitorCapacityHonesty +=== RUN TestCompetitorCapacityHonesty/otter_v2 + competitor_test.go:160: otter v2 asked for 500, holds 500 (1.0x) +=== RUN TestCompetitorCapacityHonesty/theine + competitor_test.go:160: theine asked for 500, holds 500 (1.0x) +=== RUN TestCompetitorCapacityHonesty/ristretto + competitor_test.go:160: ristretto asked for 500, holds 536 (1.1x) +=== RUN TestCompetitorCapacityHonesty/sturdyc + competitor_test.go:160: sturdyc asked for 500, holds 476 (1.0x) +--- PASS: TestCompetitorCapacityHonesty (0.01s) + --- PASS: TestCompetitorCapacityHonesty/otter_v2 (0.01s) + --- PASS: TestCompetitorCapacityHonesty/theine (0.00s) + --- PASS: TestCompetitorCapacityHonesty/ristretto (0.00s) + --- PASS: TestCompetitorCapacityHonesty/sturdyc (0.00s) +=== RUN TestEvidenceHelpersEmpty +--- PASS: TestEvidenceHelpersEmpty (0.00s) +=== RUN TestEvidenceMedianEven +--- PASS: TestEvidenceMedianEven (0.00s) +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor +--- PASS: TestEvidenceMetadataUsesMeasuredConfiguration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor (0.00s) +=== RUN TestReferenceMissPrecisionContract +--- PASS: TestReferenceMissPrecisionContract (0.00s) +=== RUN TestFixedPolicyEvidence +=== RUN TestFixedPolicyEvidence/zipf + evidence_test.go:65: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 128 | + | S3-FIFO | 73.49% | 247 | + | LFU | 73.47% | 461 | + | W-TinyLFU | 73.35% | 162 | + | ARC | 73.16% | 147 | + | 2Q | 72.02% | 168 | + | LRU | 66.91% | 66 | + | TTL | 66.91% | 149 | + | Random | 62.58% | 96 | +=== RUN TestFixedPolicyEvidence/uniform + evidence_test.go:65: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.29% | 351 | + | ARC | 10.03% | 421 | + | LFU | 10.02% | 389 | + | LRU | 9.99% | 129 | + | TTL | 9.99% | 219 | + | Random | 9.99% | 182 | + | 2Q | 9.99% | 333 | + | S3-FIFO | 9.99% | 574 | + | SIEVE | 9.98% | 374 | +=== RUN TestFixedPolicyEvidence/loop + evidence_test.go:65: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 93.93% | 67 | + | Random | 82.10% | 44 | + | S3-FIFO | 79.67% | 197 | + | 2Q | 68.60% | 122 | + | ARC | 0.12% | 305 | + | LRU | 0.00% | 99 | + | LFU | 0.00% | 124 | + | TTL | 0.00% | 211 | + | SIEVE | 0.00% | 329 | +=== RUN TestFixedPolicyEvidence/scan + evidence_test.go:65: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 117 | + | 2Q | 39.95% | 252 | + | ARC | 39.95% | 254 | + | S3-FIFO | 39.95% | 387 | + | SIEVE | 39.95% | 245 | + | W-TinyLFU | 39.84% | 245 | + | Random | 31.99% | 139 | + | LRU | 30.00% | 103 | + | TTL | 30.00% | 199 | +=== RUN TestFixedPolicyEvidence/phase-shift + evidence_test.go:65: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 82.00% | 146 | + | S3-FIFO | 71.59% | 284 | + | SIEVE | 69.74% | 139 | + | LFU | 69.66% | 263 | + | Random | 68.40% | 82 | + | 2Q | 61.48% | 173 | + | ARC | 39.92% | 248 | + | LRU | 34.50% | 98 | + | TTL | 34.50% | 203 | +--- PASS: TestFixedPolicyEvidence (1.99s) + --- PASS: TestFixedPolicyEvidence/zipf (0.33s) + --- PASS: TestFixedPolicyEvidence/uniform (0.59s) + --- PASS: TestFixedPolicyEvidence/loop (0.30s) + --- PASS: TestFixedPolicyEvidence/scan (0.39s) + --- PASS: TestFixedPolicyEvidence/phase-shift (0.33s) +=== RUN TestAdaptiveVersusFixed +=== RUN TestAdaptiveVersusFixed/zipf + evidence_test.go:135: + zipf vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 125 | + | S3-FIFO | 73.49% | 232 | + | LFU | 73.47% | 475 | + | W-TinyLFU | 73.25% | 158 | + | ARC | 73.16% | 159 | + | 2Q | 72.02% | 134 | + | LRU | 66.91% | 80 | + | TTL | 66.91% | 149 | + | adaptive | 66.04% | 3482 | + | Random | 62.58% | 95 | +=== RUN TestAdaptiveVersusFixed/uniform + evidence_test.go:135: + uniform vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.27% | 345 | + | adaptive | 10.06% | 5654 | + | ARC | 10.03% | 429 | + | LFU | 10.02% | 406 | + | Random | 10.02% | 187 | + | LRU | 9.99% | 121 | + | TTL | 9.99% | 237 | + | 2Q | 9.99% | 341 | + | S3-FIFO | 9.99% | 573 | + | SIEVE | 9.98% | 373 | +=== RUN TestAdaptiveVersusFixed/loop + evidence_test.go:135: + loop vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 90.87% | 103 | + | adaptive | 87.13% | 2372 | + | Random | 82.06% | 45 | + | S3-FIFO | 79.67% | 215 | + | 2Q | 68.60% | 124 | + | ARC | 0.12% | 330 | + | LRU | 0.00% | 98 | + | LFU | 0.00% | 133 | + | TTL | 0.00% | 222 | + | SIEVE | 0.00% | 335 | +=== RUN TestAdaptiveVersusFixed/scan + evidence_test.go:135: + scan vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 141 | + | 2Q | 39.95% | 244 | + | ARC | 39.95% | 256 | + | S3-FIFO | 39.95% | 377 | + | SIEVE | 39.95% | 251 | + | W-TinyLFU | 39.80% | 247 | + | adaptive | 34.66% | 5780 | + | Random | 32.00% | 137 | + | LRU | 30.00% | 99 | + | TTL | 30.00% | 204 | +=== RUN TestAdaptiveVersusFixed/phase-shift + evidence_test.go:135: + phase-shift vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 82.34% | 119 | + | adaptive | 72.55% | 3198 | + | S3-FIFO | 71.59% | 262 | + | SIEVE | 69.74% | 155 | + | LFU | 69.66% | 273 | + | Random | 68.40% | 87 | + | 2Q | 61.48% | 191 | + | ARC | 39.92% | 278 | + | LRU | 34.50% | 95 | + | TTL | 34.50% | 198 | +=== NAME TestAdaptiveVersusFixed + evidence_test.go:159: + | Workload | Adaptive | Best fixed | Worst fixed | Adaptive vs best | + | --- | --- | --- | --- | --- | + | zipf | 66.04% | SIEVE 73.58% | 62.58% | -7.55 pts | + | uniform | 10.06% | W-TinyLFU 12.27% | 9.98% | -2.21 pts | + | loop | 87.13% | W-TinyLFU 90.87% | 0.00% | -3.74 pts | + | scan | 34.66% | LFU 39.95% | 30.00% | -5.29 pts | + | phase-shift | 72.55% | W-TinyLFU 82.34% | 34.50% | -9.79 pts | + +--- PASS: TestAdaptiveVersusFixed (6.12s) + --- PASS: TestAdaptiveVersusFixed/zipf (1.02s) + --- PASS: TestAdaptiveVersusFixed/uniform (1.73s) + --- PASS: TestAdaptiveVersusFixed/loop (0.80s) + --- PASS: TestAdaptiveVersusFixed/scan (1.55s) + --- PASS: TestAdaptiveVersusFixed/phase-shift (0.97s) +=== RUN TestSamplingPreservesPolicyRanking +=== RUN TestSamplingPreservesPolicyRanking/zipf + evidence_test.go:219: + zipf + full-size shadows ARC=81.63% TwoQueue=81.33% TinyLFU=81.23% SIEVE=81.20% LFU=81.20% S3FIFO=81.13% LRU=79.22% TTL=79.22% Random=76.68% + -> picks ARC + evidence_test.go:233: rate 0.05 ARC=71.72% TinyLFU=71.62% SIEVE=71.11% LFU=71.11% TwoQueue=71.10% S3FIFO=71.00% LRU=68.20% TTL=67.59% Random=63.04% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.10 ARC=76.31% TinyLFU=76.12% TwoQueue=75.98% SIEVE=75.95% LFU=75.95% S3FIFO=75.65% LRU=73.39% TTL=73.27% Random=70.17% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.30 ARC=86.44% TwoQueue=86.19% TinyLFU=86.18% LFU=86.13% SIEVE=86.13% S3FIFO=86.06% LRU=84.70% TTL=84.57% Random=82.65% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.50 ARC=78.76% TwoQueue=78.42% TinyLFU=78.38% LFU=78.25% SIEVE=78.25% S3FIFO=78.21% LRU=76.04% TTL=76.03% Random=73.13% + -> picks ARC, regret 0.00 pts +=== RUN TestSamplingPreservesPolicyRanking/scan + evidence_test.go:219: + scan + full-size shadows ARC=28.34% LFU=28.34% TwoQueue=28.34% SIEVE=28.34% S3FIFO=28.34% TinyLFU=27.97% LRU=21.43% TTL=21.43% Random=18.88% + -> picks SIEVE + evidence_test.go:233: rate 0.05 LFU=28.83% TwoQueue=28.83% S3FIFO=28.83% ARC=28.83% SIEVE=28.83% TinyLFU=28.73% LRU=21.80% TTL=21.80% Random=19.08% + -> picks TwoQueue, regret 0.00 pts + evidence_test.go:233: rate 0.10 S3FIFO=29.40% SIEVE=29.40% LFU=29.40% TwoQueue=29.40% ARC=29.40% TinyLFU=28.95% TTL=22.24% LRU=22.24% Random=19.38% + -> picks LFU, regret 0.00 pts + evidence_test.go:233: rate 0.30 S3FIFO=27.34% LFU=27.34% TwoQueue=27.34% SIEVE=27.34% ARC=27.34% TinyLFU=26.63% LRU=20.68% TTL=20.68% Random=18.37% + -> picks S3FIFO, regret 0.00 pts + evidence_test.go:233: rate 0.50 TwoQueue=28.06% ARC=28.06% S3FIFO=28.06% SIEVE=28.06% LFU=28.06% TinyLFU=27.23% LRU=21.22% TTL=21.22% Random=18.75% + -> picks TwoQueue, regret 0.00 pts +--- PASS: TestSamplingPreservesPolicyRanking (21.16s) + --- PASS: TestSamplingPreservesPolicyRanking/zipf (1.65s) + --- PASS: TestSamplingPreservesPolicyRanking/scan (19.39s) +=== RUN TestSamplingPreservesClearOrderings +=== RUN TestSamplingPreservesClearOrderings/loop + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +=== RUN TestSamplingPreservesClearOrderings/scan + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +--- PASS: TestSamplingPreservesClearOrderings (21.13s) + --- PASS: TestSamplingPreservesClearOrderings/loop (1.88s) + --- PASS: TestSamplingPreservesClearOrderings/scan (19.17s) +=== RUN TestMemoryMultiplier + memory_test.go:117: + memory holding 50000 entries of 256-byte values, 8 policies + single LRU 18.5 MiB (1.00x) + adaptive, no sampling 72.3 MiB (3.92x) + adaptive, sample 0.05 25.7 MiB (1.39x) + memory_test.go:143: each shadow costs 7.7 MiB against a 18.5 MiB full cache (0.42x) +--- PASS: TestMemoryMultiplier (0.29s) +=== RUN TestAllocationsPerOperation + memory_test.go:183: + Get on a warm cache: + memory_test.go:178: single LRU 32.0 ns/op 0 B/op 0 allocs/op + memory_test.go:178: adaptive, no sampling 852.0 ns/op 3 B/op 0 allocs/op + memory_test.go:178: adaptive, sample 0.05 158.0 ns/op 29 B/op 0 allocs/op +--- PASS: TestAllocationsPerOperation (3.63s) +=== RUN TestLRUMatchesReference + reference_test.go:68: AS_CACHE_LRU_REFERENCE is not set; run ./scripts/verify-ref.sh +--- SKIP: TestLRUMatchesReference (0.00s) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop + shadow_fidelity_test.go:115: TinyLFU standalone 94.96% shadow 87.52% (-7.44 pts) + shadow_fidelity_test.go:115: Random standalone 82.15% shadow 82.28% (+0.14 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 79.73% shadow 79.73% (+0.00 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 68.68% shadow 68.68% (+0.00 pts) + shadow_fidelity_test.go:115: ARC standalone 0.10% shadow 0.10% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: SIEVE standalone 0.00% shadow 0.00% (+0.00 pts) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf + shadow_fidelity_test.go:115: SIEVE standalone 73.58% shadow 73.58% (+0.00 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 73.49% shadow 73.49% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 73.47% shadow 73.47% (+0.00 pts) + shadow_fidelity_test.go:115: TinyLFU standalone 72.77% shadow 73.18% (+0.41 pts) + shadow_fidelity_test.go:115: ARC standalone 73.16% shadow 73.16% (+0.00 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 72.02% shadow 72.02% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: Random standalone 62.41% shadow 62.51% (+0.10 pts) +--- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe (1.83s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop (0.92s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf (0.87s) +=== RUN TestSieveLFUDistinction +=== RUN TestSieveLFUDistinction/cold_scan +=== RUN TestSieveLFUDistinction/protect_visited +=== RUN TestSieveLFUDistinction/frequency_outlives_bit +--- PASS: TestSieveLFUDistinction (0.00s) + --- PASS: TestSieveLFUDistinction/cold_scan (0.00s) + --- PASS: TestSieveLFUDistinction/protect_visited (0.00s) + --- PASS: TestSieveLFUDistinction/frequency_outlives_bit (0.00s) +=== RUN TestActivePolicyTimeline + timeline_test.go:154: + phase-shift timeline (240000 requests, cache 500, 12 phases) + phase Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L--------------------------------------- (Z = zipf phase, L = loop phase) + LRU ######## ######## ########## + LFU ###### ######## + TwoQueue ##################### ############## ######### ##### ############ ############ ######## ########### + ARC ####### ##### #### ####### ####### ###### ###### ###### ####### ###### ####### + TTL #### ####### ######## ########### ######## ### ### + TinyLFU ############ # ##### ##### ############ ############## ######### #### ############################# ############ ############ ############ ##### ##### ############ + S3FIFO ############# ##### #### ######### ##### ######### ########## ###### ##### ###### + SIEVE ####### ######## + + share of time active: LRU 5%, LFU 3%, TwoQueue 19%, ARC 14%, TTL 9%, TinyLFU 31%, S3FIFO 15%, SIEVE 3% + hit rate 59.72% +--- PASS: TestActivePolicyTimeline (0.16s) +=== RUN TestTraceEvidence +=== RUN TestTraceEvidence/twitter_cluster052.csv + trace_evidence_test.go:166: + twitter_cluster052.csv + Twitter Twemcache production KV cache (OSDI '20) + real trace: 1000000 requests over 255333 distinct keys + cache 10000 entries, 3.9% of the 255333 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | SIEVE | 59.78% | + | S3-FIFO | 59.73% | + | 2Q | 59.62% | + | ARC | 58.99% | + | adaptive, 20 epochs (every 50000 requests) | 58.77% [58.61-58.81] | + | adaptive, 10 epochs (every 100000 requests) | 58.70% [58.59-59.03] | + | W-TinyLFU | 58.67% [57.44-58.76] | + | LRU | 58.39% | + | TTL | 58.39% | + | adaptive, 50 epochs (every 20000 requests) | 58.13% [57.92-58.27] | + | Random | 54.80% [54.78-54.82] | + | LFU | 41.44% | +=== RUN TestTraceEvidence/lirs_loop.trace + trace_evidence_test.go:166: + lirs_loop.trace + LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02) + real trace: 505500 requests over 1011 distinct keys + cache 500 entries, 49.5% of the 1011 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 10 epochs (every 50550 requests) | 67.19% [41.81-72.96] | + | W-TinyLFU | 49.26% [49.17-52.87] | + | adaptive, 50 epochs (every 10110 requests) | 43.60% [41.88-45.69] | + | adaptive, 20 epochs (every 25275 requests) | 42.86% [42.00-44.67] | + | Random | 19.68% [19.64-19.74] | + | LRU | 0.00% | + | LFU | 0.00% | + | TTL | 0.00% | + | ARC | 0.00% | + | 2Q | 0.00% | + | S3-FIFO | 0.00% | + | SIEVE | 0.00% | +=== RUN TestTraceEvidence/lirs_2_pools.trace + trace_evidence_test.go:166: + lirs_2_pools.trace + LIRS 2_pools: two interleaved pools with different locality + real trace: 100000 requests over 9939 distinct keys + cache 1000 entries, 10.1% of the 9939 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | W-TinyLFU | 54.84% [54.66-55.86] | + | TTL | 54.41% | + | LRU | 54.41% | + | adaptive, 10 epochs (every 10000 requests) | 54.40% [54.38-54.41] | + | adaptive, 20 epochs (every 5000 requests) | 54.40% [54.23-54.42] | + | 2Q | 54.40% | + | ARC | 54.37% | + | S3-FIFO | 54.37% | + | LFU | 54.36% | + | SIEVE | 54.36% | + | adaptive, 50 epochs (every 2000 requests) | 54.24% [54.18-54.28] | + | Random | 49.92% [49.77-50.04] | +=== RUN TestTraceEvidence/arc_p3 + trace_evidence_test.go:166: + arc_p3 + ARC paper P3 workstation trace (FAST '03) + ARC trace: 138478 records expanded to 2000000 accesses over 426527 distinct blocks + cache 20000 entries, 4.7% of the 426527 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 20 epochs (every 100000 requests) | 12.93% [12.85-13.11] | + | adaptive, 10 epochs (every 200000 requests) | 12.53% [11.97-12.60] | + | adaptive, 50 epochs (every 40000 requests) | 12.42% [12.28-12.81] | + | W-TinyLFU | 12.11% [11.52-12.33] | + | S3-FIFO | 10.75% | + | ARC | 10.25% | + | 2Q | 7.74% | + | LFU | 4.82% | + | SIEVE | 4.82% | + | Random | 3.08% [3.08-3.08] | + | LRU | 1.87% | + | TTL | 1.87% | +=== RUN TestTraceEvidence/arc_oltp + trace_evidence_test.go:166: + arc_oltp + ARC paper OLTP database trace (FAST '03) + ARC trace: 914145 records expanded to 914145 accesses over 186880 distinct blocks + cache 20000 entries, 10.7% of the 186880 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 68.25% | + | ARC | 67.80% | + | S3-FIFO | 67.79% | + | SIEVE | 67.72% | + | adaptive, 10 epochs (every 91414 requests) | 67.46% [67.37-67.64] | + | LRU | 67.06% | + | TTL | 67.06% | + | adaptive, 20 epochs (every 45707 requests) | 66.88% [66.68-66.94] | + | adaptive, 50 epochs (every 18282 requests) | 66.09% [65.86-66.22] | + | W-TinyLFU | 63.13% [62.95-63.20] | + | Random | 63.01% [62.97-63.03] | + | LFU | 45.43% | +=== RUN TestTraceEvidence/meta_kvcache_202206_1 + trace_evidence_test.go:166: + meta_kvcache_202206_1 + Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206) + Meta kvcache trace: 1160580 rows (942355 reads, 218225 writes) expanded by op_count to 2000000 reads over 340723 distinct keys + cache 10000 entries, 2.9% of the 340723 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 69.05% | + | SIEVE | 68.92% | + | W-TinyLFU | 68.66% [68.57-68.72] | + | ARC | 68.27% | + | 2Q | 68.16% | + | adaptive, 10 epochs (every 200000 requests) | 68.11% [67.74-68.17] | + | adaptive, 20 epochs (every 100000 requests) | 67.60% [67.42-67.71] | + | adaptive, 50 epochs (every 40000 requests) | 66.90% [66.74-66.93] | + | LFU | 66.87% | + | TTL | 66.39% | + | LRU | 66.39% | + | Random | 65.19% [65.18-65.19] | +=== RUN TestTraceEvidence/msr_hm_0 + trace_evidence_test.go:166: + msr_hm_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 418343 records (120058 reads, 298285 writes) expanded to 2000000 block accesses from reads over 818034 distinct 512-byte blocks + cache 20000 entries, 2.4% of the 818034 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 17.01% | + | ARC | 16.65% | + | W-TinyLFU | 16.01% [15.82-16.19] | + | S3-FIFO | 15.84% | + | adaptive, 10 epochs (every 200000 requests) | 15.38% [14.33-15.51] | + | SIEVE | 15.19% | + | LFU | 14.99% | + | adaptive, 50 epochs (every 40000 requests) | 14.66% [13.48-16.08] | + | adaptive, 20 epochs (every 100000 requests) | 12.88% [12.42-13.71] | + | Random | 12.62% [12.61-12.63] | + | LRU | 11.40% | + | TTL | 11.40% | +=== RUN TestTraceEvidence/msr_prn_0 + trace_evidence_test.go:166: + msr_prn_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96363 records (37302 reads, 59061 writes) expanded to 2000000 block accesses from reads over 1900653 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1900653 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | LFU | 1.06% | + | SIEVE | 1.06% | + | adaptive, 50 epochs (every 40000 requests) | 1.05% [0.98-1.09] | + | 2Q | 1.04% | + | ARC | 1.02% | + | S3-FIFO | 1.01% | + | LRU | 1.00% | + | TTL | 1.00% | + | Random | 0.94% [0.94-0.95] | + | adaptive, 10 epochs (every 200000 requests) | 0.87% [0.84-0.87] | + | W-TinyLFU | 0.76% [0.74-0.93] | + | adaptive, 20 epochs (every 100000 requests) | 0.73% [0.71-0.84] | +=== RUN TestTraceEvidence/msr_proj_0 + trace_evidence_test.go:166: + msr_proj_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 73170 records (43792 reads, 29378 writes) expanded to 2000000 block accesses from reads over 1748195 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1748195 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 5.79% | + | ARC | 5.38% | + | 2Q | 5.38% | + | adaptive, 50 epochs (every 40000 requests) | 5.37% [5.35-5.53] | + | TTL | 5.35% | + | LRU | 5.35% | + | Random | 5.20% [5.20-5.22] | + | adaptive, 10 epochs (every 200000 requests) | 5.14% [5.13-5.15] | + | adaptive, 20 epochs (every 100000 requests) | 5.08% [5.07-5.12] | + | LFU | 4.73% | + | SIEVE | 4.73% | + | W-TinyLFU | 4.23% [4.17-4.29] | +=== RUN TestTraceEvidence/msr_src1_2 + trace_evidence_test.go:166: + msr_src1_2 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 52584 records (28999 reads, 23585 writes) expanded to 2000000 block accesses from reads over 1947636 distinct 512-byte blocks + cache 20000 entries, 1.0% of the 1947636 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 1.77% | + | ARC | 1.73% | + | LRU | 1.70% | + | TTL | 1.70% | + | adaptive, 10 epochs (every 200000 requests) | 1.70% | + | adaptive, 20 epochs (every 100000 requests) | 1.70% | + | S3-FIFO | 1.70% | + | adaptive, 50 epochs (every 40000 requests) | 1.70% [1.70-1.70] | + | Random | 1.63% [1.63-1.64] | + | LFU | 1.42% | + | SIEVE | 1.42% | + | W-TinyLFU | 1.15% [0.91-1.21] | +=== RUN TestTraceEvidence/msr_usr_0 + trace_evidence_test.go:166: + msr_usr_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96189 records (40753 reads, 55436 writes) expanded to 2000000 block accesses from reads over 1778953 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1778953 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 3.58% | + | 2Q | 3.57% | + | LRU | 3.57% | + | TTL | 3.57% | + | adaptive, 10 epochs (every 200000 requests) | 3.57% [3.55-3.57] | + | ARC | 3.55% | + | adaptive, 20 epochs (every 100000 requests) | 3.50% [3.47-3.50] | + | Random | 3.49% [3.49-3.50] | + | adaptive, 50 epochs (every 40000 requests) | 3.42% [3.41-3.67] | + | W-TinyLFU | 2.84% [2.23-2.86] | + | SIEVE | 1.46% | + | LFU | 1.46% | +=== RUN TestTraceEvidence/msr_web_0 + trace_evidence_test.go:166: + msr_web_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 71173 records (34449 reads, 36724 writes) expanded to 2000000 block accesses from reads over 1855956 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1855956 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | LFU | 2.61% | + | SIEVE | 2.61% | + | 2Q | 2.61% | + | ARC | 2.60% | + | Random | 2.56% [2.55-2.57] | + | S3-FIFO | 2.49% | + | adaptive, 50 epochs (every 40000 requests) | 2.44% [2.43-2.46] | + | adaptive, 20 epochs (every 100000 requests) | 2.41% [2.39-2.41] | + | adaptive, 10 epochs (every 200000 requests) | 2.35% [2.23-2.35] | + | LRU | 2.30% | + | TTL | 2.30% | + | W-TinyLFU | 2.28% [2.24-2.32] | +=== NAME TestTraceEvidence + trace_evidence_test.go:205: + | Trace | Requests | Best fixed | Worst fixed | Adaptive, 10 epochs | Adaptive, 20 epochs | Adaptive, 50 epochs | + | --- | --- | --- | --- | --- | --- | --- | + | twitter_cluster052.csv | 1000000 | SIEVE 59.78% | LFU 41.44% | 58.70% [58.59-59.03] (-1.09) | 58.77% [58.61-58.81] (-1.01) | 58.13% [57.92-58.27] (-1.66) | + | lirs_loop.trace | 505500 | W-TinyLFU 49.26% [49.17-52.87] | 2Q 0.00% | 67.19% [41.81-72.96] (+17.94) | 42.86% [42.00-44.67] (-6.39) | 43.60% [41.88-45.69] (-5.66) | + | lirs_2_pools.trace | 100000 | W-TinyLFU 54.84% [54.66-55.86] | Random 49.92% [49.77-50.04] | 54.40% [54.38-54.41] (-0.44) | 54.40% [54.23-54.42] (-0.44) | 54.24% [54.18-54.28] (-0.60) | + | arc_p3 | 2000000 | W-TinyLFU 12.11% [11.52-12.33] | LRU 1.87% | 12.53% [11.97-12.60] (+0.42) | 12.93% [12.85-13.11] (+0.82) | 12.42% [12.28-12.81] (+0.31) | + | arc_oltp | 914145 | 2Q 68.25% | LFU 45.43% | 67.46% [67.37-67.64] (-0.79) | 66.88% [66.68-66.94] (-1.38) | 66.09% [65.86-66.22] (-2.17) | + | meta_kvcache_202206_1 | 2000000 | S3-FIFO 69.05% | Random 65.19% [65.18-65.19] | 68.11% [67.74-68.17] (-0.94) | 67.60% [67.42-67.71] (-1.45) | 66.90% [66.74-66.93] (-2.15) | + | msr_hm_0 | 2000000 | 2Q 17.01% | LRU 11.40% | 15.38% [14.33-15.51] (-1.62) | 12.88% [12.42-13.71] (-4.12) | 14.66% [13.48-16.08] (-2.35) | + | msr_prn_0 | 2000000 | LFU 1.06% | W-TinyLFU 0.76% [0.74-0.93] | 0.87% [0.84-0.87] (-0.19) | 0.73% [0.71-0.84] (-0.33) | 1.05% [0.98-1.09] (-0.01) | + | msr_proj_0 | 2000000 | S3-FIFO 5.79% | W-TinyLFU 4.23% [4.17-4.29] | 5.14% [5.13-5.15] (-0.66) | 5.08% [5.07-5.12] (-0.71) | 5.37% [5.35-5.53] (-0.43) | + | msr_src1_2 | 2000000 | 2Q 1.77% | W-TinyLFU 1.15% [0.91-1.21] | 1.70% (-0.06) | 1.70% (-0.06) | 1.70% [1.70-1.70] (-0.07) | + | msr_usr_0 | 2000000 | S3-FIFO 3.58% | LFU 1.46% | 3.57% [3.55-3.57] (-0.01) | 3.50% [3.47-3.50] (-0.08) | 3.42% [3.41-3.67] (-0.16) | + | msr_web_0 | 2000000 | LFU 2.61% | W-TinyLFU 2.28% [2.24-2.32] | 2.35% [2.23-2.35] (-0.26) | 2.41% [2.39-2.41] (-0.20) | 2.44% [2.43-2.46] (-0.17) | + trace_evidence_test.go:206: wrote /private/tmp/claude-501/-Users-sshaplygin-GithubProjects-as-cache/8c03863a-50ed-4a03-b751-0a7c468b2089/scratchpad/evidence-1cb65fe/traces-2.json +--- PASS: TestTraceEvidence (444.65s) + --- PASS: TestTraceEvidence/twitter_cluster052.csv (19.68s) + --- PASS: TestTraceEvidence/lirs_loop.trace (10.79s) + --- PASS: TestTraceEvidence/lirs_2_pools.trace (1.39s) + --- PASS: TestTraceEvidence/arc_p3 (54.36s) + --- PASS: TestTraceEvidence/arc_oltp (21.22s) + --- PASS: TestTraceEvidence/meta_kvcache_202206_1 (31.93s) + --- PASS: TestTraceEvidence/msr_hm_0 (48.68s) + --- PASS: TestTraceEvidence/msr_prn_0 (57.11s) + --- PASS: TestTraceEvidence/msr_proj_0 (50.51s) + --- PASS: TestTraceEvidence/msr_src1_2 (48.38s) + --- PASS: TestTraceEvidence/msr_usr_0 (48.01s) + --- PASS: TestTraceEvidence/msr_web_0 (48.23s) +=== RUN TestLoadMSRTraceExpandsEachRecordIntoItsBlocks +--- PASS: TestLoadMSRTraceExpandsEachRecordIntoItsBlocks (0.00s) +=== RUN TestLoadMSRTraceNamespacesByHostAndDisk +--- PASS: TestLoadMSRTraceNamespacesByHostAndDisk (0.00s) +=== RUN TestLoadMSRTraceSkipsWritesUnlessAsked +--- PASS: TestLoadMSRTraceSkipsWritesUnlessAsked (0.00s) +=== RUN TestLoadMSRTraceHonoursBlockSizeAndLimit +--- PASS: TestLoadMSRTraceHonoursBlockSizeAndLimit (0.00s) +=== RUN TestLoadMSRTraceToleratesHeadersAndTruncation +--- PASS: TestLoadMSRTraceToleratesHeadersAndTruncation (0.00s) +=== RUN TestLoadMSRTraceRejectsAFileWithNoRecords +--- PASS: TestLoadMSRTraceRejectsAFileWithNoRecords (0.00s) +=== RUN TestLoadMetaKVTraceExpandsOpCount +--- PASS: TestLoadMetaKVTraceExpandsOpCount (0.00s) +=== RUN TestLoadMetaKVTraceReadsThe2024Layout +--- PASS: TestLoadMetaKVTraceReadsThe2024Layout (0.00s) +=== RUN TestLoadMetaKVTraceIncludesWritesOnRequest +--- PASS: TestLoadMetaKVTraceIncludesWritesOnRequest (0.00s) +=== RUN TestLoadMetaKVTraceHonoursTheLimitInsideARow +--- PASS: TestLoadMetaKVTraceHonoursTheLimitInsideARow (0.00s) +=== RUN TestLoadMetaKVTraceToleratesATruncatedTail +--- PASS: TestLoadMetaKVTraceToleratesATruncatedTail (0.00s) +=== RUN TestLoadMetaKVTraceRejectsAnUnrecognisedHeader +--- PASS: TestLoadMetaKVTraceRejectsAnUnrecognisedHeader (0.00s) +=== RUN TestEveryArmDrivesAnAdaptiveCache +--- PASS: TestEveryArmDrivesAnAdaptiveCache (0.01s) +=== RUN TestLoadMSRTraceCoversEveryBlockAByteRangeTouches +--- PASS: TestLoadMSRTraceCoversEveryBlockAByteRangeTouches (0.00s) +=== RUN TestLoadMSRTraceSeesReuseBetweenOverlappingRequests +--- PASS: TestLoadMSRTraceSeesReuseBetweenOverlappingRequests (0.00s) +=== RUN TestLoadMSRTraceCapsOneRecordsExpansion +--- PASS: TestLoadMSRTraceCapsOneRecordsExpansion (0.01s) +=== RUN TestLoadMSRTraceRequiresEveryColumn +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_size +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_type +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_time +--- PASS: TestLoadMSRTraceRequiresEveryColumn (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_size (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_type (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_time (0.00s) +=== RUN TestLoadMSRTraceCountsOnlyRecognisedTypes +--- PASS: TestLoadMSRTraceCountsOnlyRecognisedTypes (0.00s) +=== RUN TestLoadMetaKVTraceRequiresOpCount +--- PASS: TestLoadMetaKVTraceRequiresOpCount (0.00s) +=== RUN TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount +--- PASS: TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount (0.00s) +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta +--- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta (0.00s) +=== RUN TestTraceLoaders +=== RUN TestTraceLoaders/lirs_loop.trace.gz +=== RUN TestTraceLoaders/lirs_2_pools.trace.gz +=== RUN TestTraceLoaders/meta_kvcache_202206_1.csv +=== RUN TestTraceLoaders/meta_kvcache_expansion + trace_test.go:216: 1160580 rows (942355 reads, 218225 writes) -> 2000000 requests over 340723 distinct keys +=== RUN TestTraceLoaders/arc_p3_expansion +--- PASS: TestTraceLoaders (2.98s) + --- PASS: TestTraceLoaders/lirs_loop.trace.gz (0.07s) + --- PASS: TestTraceLoaders/lirs_2_pools.trace.gz (0.01s) + --- PASS: TestTraceLoaders/meta_kvcache_202206_1.csv (2.21s) + --- PASS: TestTraceLoaders/meta_kvcache_expansion (0.35s) + --- PASS: TestTraceLoaders/arc_p3_expansion (0.34s) +=== RUN TestAdaptiveTuning + tuning_test.go:68: arc_p3 10 epochs cold gates=false: 12.16% [11.78-12.39] + tuning_test.go:68: arc_p3 10 epochs cold gates=true: 7.45% [4.44-7.75] + tuning_test.go:68: arc_p3 10 epochs warm gates=false: 12.44% [12.41-12.56] + tuning_test.go:68: arc_p3 10 epochs warm gates=true: 7.94% [7.70-8.12] + tuning_test.go:68: arc_p3 20 epochs cold gates=false: 13.25% [11.14-13.53] + tuning_test.go:68: arc_p3 20 epochs cold gates=true: 8.97% [7.35-10.26] + tuning_test.go:68: arc_p3 20 epochs warm gates=false: 12.64% [12.47-12.88] + tuning_test.go:68: arc_p3 20 epochs warm gates=true: 9.30% [9.16-10.52] + tuning_test.go:68: arc_p3 50 epochs cold gates=false: 11.77% [3.71-12.12] + tuning_test.go:68: arc_p3 50 epochs cold gates=true: 10.03% [8.85-10.35] + tuning_test.go:68: arc_p3 50 epochs warm gates=false: 12.14% [8.53-13.03] + tuning_test.go:68: arc_p3 50 epochs warm gates=true: 10.69% [10.17-12.39] +--- PASS: TestAdaptiveTuning (97.16s) +=== RUN TestSwitchWarmupCost + warmup_test.go:120: + hit rate after a switch from LRU to LFU at request 100000 (zipf, 200000 requests, cache 500) + | Configuration | 0-1000 | 1000-5000 | 5000-20000 | 20000-100000 | + | --- | --- | --- | --- | --- | + | LFU all along (no warm-up) | 77.00% | 74.28% | 74.59% | 73.90% | + | LRU, never switched | 70.50% | 67.90% | 67.58% | 66.82% | + | cold | 59.50% | 69.45% | 72.93% | 73.52% | + | warm | 70.50% | 70.03% | 72.91% | 73.55% | + | gradual | 70.40% | 70.12% | 72.88% | 73.52% | + | gradual, capped at 10 Gets | 59.90% | 69.47% | 72.93% | 73.52% | + | gradual, capped at 100 Gets | 63.90% | 69.58% | 72.99% | 73.53% | + | gradual, capped at 1000 Gets | 70.40% | 70.12% | 72.88% | 73.52% | +--- PASS: TestSwitchWarmupCost (0.66s) +PASS +ok github.com/sshaplygin/as-cache/bench 607.499s diff --git a/bench/results/current/evidence-3.log b/bench/results/current/evidence-3.log new file mode 100644 index 0000000..eb76ecc --- /dev/null +++ b/bench/results/current/evidence-3.log @@ -0,0 +1,757 @@ +( cd bench && go test -count=1 -timeout 45m -v ./... ) +=== RUN TestAgainstOtherLibraries +=== RUN TestAgainstOtherLibraries/zipf + competitor_test.go:74: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | otter v2 | 73.44% | 457 | + | theine | 72.20% | 320 | + | ristretto | 69.16% | 148 | + | as-cache (adaptive) | 68.05% | 3134 | + | sturdyc | 62.03% | 298 | +=== RUN TestAgainstOtherLibraries/uniform + competitor_test.go:74: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 10.48% | 512 | + | ristretto | 10.01% | 320 | + | as-cache (adaptive) | 10.00% | 5008 | + | otter v2 | 9.98% | 1229 | + | sturdyc | 9.51% | 650 | +=== RUN TestAgainstOtherLibraries/loop + competitor_test.go:74: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | ristretto | 88.78% | 142 | + | theine | 88.62% | 222 | + | otter v2 | 86.62% | 263 | + | as-cache (adaptive) | 86.21% | 2120 | + | sturdyc | 45.17% | 359 | +=== RUN TestAgainstOtherLibraries/scan + competitor_test.go:74: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | theine | 39.88% | 373 | + | otter v2 | 39.87% | 779 | + | as-cache (adaptive) | 39.44% | 3461 | + | ristretto | 37.79% | 288 | + | sturdyc | 30.01% | 459 | +=== RUN TestAgainstOtherLibraries/phase-shift + competitor_test.go:74: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | otter v2 | 78.90% | 391 | + | theine | 77.41% | 282 | + | ristretto | 72.92% | 141 | + | as-cache (adaptive) | 70.55% | 2957 | + | sturdyc | 53.73% | 351 | +--- PASS: TestAgainstOtherLibraries (5.01s) + --- PASS: TestAgainstOtherLibraries/zipf (0.87s) + --- PASS: TestAgainstOtherLibraries/uniform (1.54s) + --- PASS: TestAgainstOtherLibraries/loop (0.62s) + --- PASS: TestAgainstOtherLibraries/scan (1.07s) + --- PASS: TestAgainstOtherLibraries/phase-shift (0.82s) +=== RUN TestRistrettoImmediateVisibility + competitor_test.go:120: ristretto retained 0/50 keys written into a cache of 500 +--- PASS: TestRistrettoImmediateVisibility (0.00s) +=== RUN TestCompetitorCapacityHonesty +=== RUN TestCompetitorCapacityHonesty/otter_v2 + competitor_test.go:160: otter v2 asked for 500, holds 500 (1.0x) +=== RUN TestCompetitorCapacityHonesty/theine + competitor_test.go:160: theine asked for 500, holds 545 (1.1x) +=== RUN TestCompetitorCapacityHonesty/ristretto + competitor_test.go:160: ristretto asked for 500, holds 542 (1.1x) +=== RUN TestCompetitorCapacityHonesty/sturdyc + competitor_test.go:160: sturdyc asked for 500, holds 476 (1.0x) +--- PASS: TestCompetitorCapacityHonesty (0.01s) + --- PASS: TestCompetitorCapacityHonesty/otter_v2 (0.01s) + --- PASS: TestCompetitorCapacityHonesty/theine (0.00s) + --- PASS: TestCompetitorCapacityHonesty/ristretto (0.00s) + --- PASS: TestCompetitorCapacityHonesty/sturdyc (0.00s) +=== RUN TestEvidenceHelpersEmpty +--- PASS: TestEvidenceHelpersEmpty (0.00s) +=== RUN TestEvidenceMedianEven +--- PASS: TestEvidenceMedianEven (0.00s) +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache +=== RUN TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor +--- PASS: TestEvidenceMetadataUsesMeasuredConfiguration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/raised_floor (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/changed_configuration (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/clamped_to_full_cache (0.00s) + --- PASS: TestEvidenceMetadataUsesMeasuredConfiguration/library_default_floor (0.00s) +=== RUN TestReferenceMissPrecisionContract +--- PASS: TestReferenceMissPrecisionContract (0.00s) +=== RUN TestFixedPolicyEvidence +=== RUN TestFixedPolicyEvidence/zipf + evidence_test.go:65: + zipf (200000 requests, cache 500) + skewed popularity; favours frequency-aware policies (LFU, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 138 | + | S3-FIFO | 73.49% | 227 | + | LFU | 73.47% | 446 | + | ARC | 73.16% | 137 | + | W-TinyLFU | 72.47% | 145 | + | 2Q | 72.02% | 149 | + | LRU | 66.91% | 66 | + | TTL | 66.91% | 158 | + | Random | 62.70% | 92 | +=== RUN TestFixedPolicyEvidence/uniform + evidence_test.go:65: + uniform (200000 requests, cache 500) + no reuse structure; random eviction is competitive + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.19% | 338 | + | Random | 10.05% | 180 | + | ARC | 10.03% | 419 | + | LFU | 10.02% | 383 | + | LRU | 9.99% | 118 | + | TTL | 9.99% | 217 | + | 2Q | 9.99% | 335 | + | S3-FIFO | 9.99% | 549 | + | SIEVE | 9.98% | 362 | +=== RUN TestFixedPolicyEvidence/loop + evidence_test.go:65: + loop (200000 requests, cache 500) + cyclic scan just over capacity; pathological for LRU, fine for random + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 92.01% | 78 | + | Random | 82.13% | 43 | + | S3-FIFO | 79.67% | 195 | + | 2Q | 68.60% | 120 | + | ARC | 0.12% | 300 | + | LRU | 0.00% | 88 | + | LFU | 0.00% | 129 | + | TTL | 0.00% | 206 | + | SIEVE | 0.00% | 320 | +=== RUN TestFixedPolicyEvidence/scan + evidence_test.go:65: + scan (200000 requests, cache 500) + hot set plus repeated one-off sweeps; favours scan-resistant policies (2Q, ARC, W-TinyLFU) + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 121 | + | 2Q | 39.95% | 251 | + | ARC | 39.95% | 268 | + | S3-FIFO | 39.95% | 375 | + | SIEVE | 39.95% | 233 | + | W-TinyLFU | 39.80% | 236 | + | Random | 31.98% | 136 | + | LRU | 30.00% | 110 | + | TTL | 30.00% | 184 | +=== RUN TestFixedPolicyEvidence/phase-shift + evidence_test.go:65: + phase-shift (200000 requests, cache 500) + alternating zipf and loop phases; no fixed policy is good in both + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 82.16% | 112 | + | S3-FIFO | 71.59% | 258 | + | SIEVE | 69.74% | 131 | + | LFU | 69.66% | 255 | + | Random | 68.35% | 82 | + | 2Q | 61.48% | 148 | + | ARC | 39.92% | 259 | + | LRU | 34.50% | 109 | + | TTL | 34.50% | 187 | +--- PASS: TestFixedPolicyEvidence (1.94s) + --- PASS: TestFixedPolicyEvidence/zipf (0.31s) + --- PASS: TestFixedPolicyEvidence/uniform (0.58s) + --- PASS: TestFixedPolicyEvidence/loop (0.30s) + --- PASS: TestFixedPolicyEvidence/scan (0.38s) + --- PASS: TestFixedPolicyEvidence/phase-shift (0.31s) +=== RUN TestAdaptiveVersusFixed +=== RUN TestAdaptiveVersusFixed/zipf + evidence_test.go:135: + zipf vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | SIEVE | 73.58% | 124 | + | S3-FIFO | 73.49% | 227 | + | LFU | 73.47% | 449 | + | ARC | 73.16% | 180 | + | W-TinyLFU | 72.87% | 144 | + | 2Q | 72.02% | 131 | + | LRU | 66.91% | 65 | + | TTL | 66.91% | 142 | + | adaptive | 66.28% | 2970 | + | Random | 62.70% | 92 | +=== RUN TestAdaptiveVersusFixed/uniform + evidence_test.go:135: + uniform vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 12.26% | 327 | + | adaptive | 10.05% | 5302 | + | ARC | 10.03% | 420 | + | LFU | 10.02% | 414 | + | LRU | 9.99% | 133 | + | TTL | 9.99% | 213 | + | 2Q | 9.99% | 332 | + | S3-FIFO | 9.99% | 564 | + | SIEVE | 9.98% | 354 | + | Random | 9.96% | 180 | +=== RUN TestAdaptiveVersusFixed/loop + evidence_test.go:135: + loop vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 92.26% | 76 | + | adaptive | 86.34% | 2264 | + | Random | 82.17% | 42 | + | S3-FIFO | 79.67% | 220 | + | 2Q | 68.60% | 144 | + | ARC | 0.12% | 329 | + | LRU | 0.00% | 115 | + | LFU | 0.00% | 108 | + | TTL | 0.00% | 190 | + | SIEVE | 0.00% | 313 | +=== RUN TestAdaptiveVersusFixed/scan + evidence_test.go:135: + scan vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | LFU | 39.95% | 118 | + | 2Q | 39.95% | 250 | + | ARC | 39.95% | 260 | + | S3-FIFO | 39.95% | 378 | + | SIEVE | 39.95% | 238 | + | W-TinyLFU | 39.73% | 238 | + | adaptive | 35.15% | 3878 | + | Random | 32.00% | 137 | + | LRU | 30.00% | 110 | + | TTL | 30.00% | 183 | +=== RUN TestAdaptiveVersusFixed/phase-shift + evidence_test.go:135: + phase-shift vs fixed policies + | Policy | Hit rate | ns/op | + | --- | --- | --- | + | W-TinyLFU | 82.40% | 116 | + | adaptive | 72.60% | 2825 | + | S3-FIFO | 71.59% | 254 | + | SIEVE | 69.74% | 147 | + | LFU | 69.66% | 394 | + | Random | 68.27% | 87 | + | 2Q | 61.48% | 185 | + | ARC | 39.92% | 262 | + | LRU | 34.50% | 116 | + | TTL | 34.50% | 190 | +=== NAME TestAdaptiveVersusFixed + evidence_test.go:159: + | Workload | Adaptive | Best fixed | Worst fixed | Adaptive vs best | + | --- | --- | --- | --- | --- | + | zipf | 66.28% | SIEVE 73.58% | 62.70% | -7.30 pts | + | uniform | 10.05% | W-TinyLFU 12.26% | 9.96% | -2.22 pts | + | loop | 86.34% | W-TinyLFU 92.26% | 0.00% | -5.91 pts | + | scan | 35.15% | LFU 39.95% | 30.00% | -4.80 pts | + | phase-shift | 72.60% | W-TinyLFU 82.40% | 34.50% | -9.81 pts | + +--- PASS: TestAdaptiveVersusFixed (5.44s) + --- PASS: TestAdaptiveVersusFixed/zipf (0.91s) + --- PASS: TestAdaptiveVersusFixed/uniform (1.65s) + --- PASS: TestAdaptiveVersusFixed/loop (0.76s) + --- PASS: TestAdaptiveVersusFixed/scan (1.16s) + --- PASS: TestAdaptiveVersusFixed/phase-shift (0.92s) +=== RUN TestSamplingPreservesPolicyRanking +=== RUN TestSamplingPreservesPolicyRanking/zipf + evidence_test.go:219: + zipf + full-size shadows ARC=81.61% TwoQueue=81.32% TinyLFU=81.24% LFU=81.19% SIEVE=81.19% S3FIFO=81.12% LRU=79.21% TTL=79.21% Random=76.67% + -> picks ARC + evidence_test.go:233: rate 0.05 TinyLFU=74.42% ARC=74.40% TwoQueue=74.38% SIEVE=74.13% LFU=74.13% S3FIFO=73.81% LRU=71.40% TTL=71.22% Random=67.59% + -> picks TinyLFU, regret 0.37 pts + evidence_test.go:233: rate 0.10 ARC=84.10% TinyLFU=83.94% TwoQueue=83.92% LFU=83.76% SIEVE=83.76% S3FIFO=83.72% LRU=82.05% TTL=82.03% Random=79.71% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.30 ARC=79.08% TwoQueue=78.79% TinyLFU=78.75% SIEVE=78.64% LFU=78.64% S3FIFO=78.50% TTL=76.49% LRU=76.47% Random=73.76% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.50 ARC=84.10% TwoQueue=83.86% TinyLFU=83.79% SIEVE=83.77% LFU=83.77% S3FIFO=83.69% TTL=82.08% LRU=82.04% Random=80.03% + -> picks ARC, regret 0.00 pts +=== RUN TestSamplingPreservesPolicyRanking/scan + evidence_test.go:219: + scan + full-size shadows S3FIFO=28.34% SIEVE=28.34% LFU=28.34% ARC=28.34% TwoQueue=28.34% TinyLFU=28.01% TTL=21.43% LRU=21.43% Random=18.85% + -> picks LFU + evidence_test.go:233: rate 0.05 TwoQueue=30.07% ARC=30.07% SIEVE=30.07% LFU=30.07% S3FIFO=30.07% TinyLFU=29.99% TTL=22.74% LRU=22.74% Random=19.69% + -> picks SIEVE, regret 0.00 pts + evidence_test.go:233: rate 0.10 ARC=27.55% TwoQueue=27.55% S3FIFO=27.55% SIEVE=27.55% LFU=27.55% TinyLFU=26.86% LRU=20.84% TTL=20.84% Random=18.48% + -> picks ARC, regret 0.00 pts + evidence_test.go:233: rate 0.30 LFU=28.56% SIEVE=28.56% ARC=28.56% S3FIFO=28.56% TwoQueue=28.56% TinyLFU=28.41% LRU=21.60% TTL=21.60% Random=18.97% + -> picks LFU, regret 0.00 pts + evidence_test.go:233: rate 0.50 SIEVE=28.33% S3FIFO=28.33% LFU=28.33% TwoQueue=28.33% ARC=28.33% TinyLFU=27.57% LRU=21.43% TTL=21.43% Random=18.88% + -> picks S3FIFO, regret 0.00 pts +--- PASS: TestSamplingPreservesPolicyRanking (20.17s) + --- PASS: TestSamplingPreservesPolicyRanking/zipf (1.31s) + --- PASS: TestSamplingPreservesPolicyRanking/scan (18.76s) +=== RUN TestSamplingPreservesClearOrderings +=== RUN TestSamplingPreservesClearOrderings/loop + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +=== RUN TestSamplingPreservesClearOrderings/scan + evidence_test.go:310: rate 0.05: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.10: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.30: 8 clearly separated pairs, 0 inverted + evidence_test.go:310: rate 0.50: 8 clearly separated pairs, 0 inverted +--- PASS: TestSamplingPreservesClearOrderings (22.80s) + --- PASS: TestSamplingPreservesClearOrderings/loop (1.93s) + --- PASS: TestSamplingPreservesClearOrderings/scan (20.79s) +=== RUN TestMemoryMultiplier + memory_test.go:117: + memory holding 50000 entries of 256-byte values, 8 policies + single LRU 18.5 MiB (1.00x) + adaptive, no sampling 72.3 MiB (3.92x) + adaptive, sample 0.05 25.7 MiB (1.39x) + memory_test.go:143: each shadow costs 7.7 MiB against a 18.5 MiB full cache (0.42x) +--- PASS: TestMemoryMultiplier (0.29s) +=== RUN TestAllocationsPerOperation + memory_test.go:183: + Get on a warm cache: + memory_test.go:178: single LRU 32.0 ns/op 0 B/op 0 allocs/op + memory_test.go:178: adaptive, no sampling 905.0 ns/op 3 B/op 0 allocs/op + memory_test.go:178: adaptive, sample 0.05 205.0 ns/op 33 B/op 0 allocs/op +--- PASS: TestAllocationsPerOperation (3.80s) +=== RUN TestLRUMatchesReference + reference_test.go:68: AS_CACHE_LRU_REFERENCE is not set; run ./scripts/verify-ref.sh +--- SKIP: TestLRUMatchesReference (0.00s) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop + shadow_fidelity_test.go:115: TinyLFU standalone 93.13% shadow 86.65% (-6.47 pts) + shadow_fidelity_test.go:115: Random standalone 82.17% shadow 82.16% (-0.01 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 79.73% shadow 79.73% (+0.00 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 68.68% shadow 68.68% (+0.00 pts) + shadow_fidelity_test.go:115: ARC standalone 0.10% shadow 0.10% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 0.00% shadow 0.00% (+0.00 pts) + shadow_fidelity_test.go:115: SIEVE standalone 0.00% shadow 0.00% (+0.00 pts) +=== RUN TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf + shadow_fidelity_test.go:115: SIEVE standalone 73.58% shadow 73.58% (+0.00 pts) + shadow_fidelity_test.go:115: S3FIFO standalone 73.49% shadow 73.49% (+0.00 pts) + shadow_fidelity_test.go:115: LFU standalone 73.47% shadow 73.47% (+0.00 pts) + shadow_fidelity_test.go:115: TinyLFU standalone 72.87% shadow 73.17% (+0.30 pts) + shadow_fidelity_test.go:115: ARC standalone 73.16% shadow 73.16% (+0.00 pts) + shadow_fidelity_test.go:115: TwoQueue standalone 72.02% shadow 72.02% (+0.00 pts) + shadow_fidelity_test.go:115: LRU standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: TTL standalone 66.91% shadow 66.91% (+0.00 pts) + shadow_fidelity_test.go:115: Random standalone 62.61% shadow 62.53% (-0.08 pts) +--- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe (1.97s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/loop (0.96s) + --- PASS: TestShadowsMeasureWhatThePolicyWouldActuallyServe/zipf (0.98s) +=== RUN TestSieveLFUDistinction +=== RUN TestSieveLFUDistinction/cold_scan +=== RUN TestSieveLFUDistinction/protect_visited +=== RUN TestSieveLFUDistinction/frequency_outlives_bit +--- PASS: TestSieveLFUDistinction (0.00s) + --- PASS: TestSieveLFUDistinction/cold_scan (0.00s) + --- PASS: TestSieveLFUDistinction/protect_visited (0.00s) + --- PASS: TestSieveLFUDistinction/frequency_outlives_bit (0.00s) +=== RUN TestActivePolicyTimeline + timeline_test.go:154: + phase-shift timeline (240000 requests, cache 500, 12 phases) + phase Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L---------------------------------------Z---------------------------------------L--------------------------------------- (Z = zipf phase, L = loop phase) + LRU ########## + LFU #### + TwoQueue ######### + ARC ##### ###### + TinyLFU ####### ############################################################################################################################################################################################################################## ########################################################################## ################################################################################################################### + S3FIFO ####### ### + SIEVE ####### ##### ###### + + share of time active: LRU 2%, LFU 1%, TwoQueue 2%, ARC 2%, TinyLFU 87%, S3FIFO 2%, SIEVE 4% + hit rate 78.67% +--- PASS: TestActivePolicyTimeline (0.17s) +=== RUN TestTraceEvidence +=== RUN TestTraceEvidence/twitter_cluster052.csv + trace_evidence_test.go:166: + twitter_cluster052.csv + Twitter Twemcache production KV cache (OSDI '20) + real trace: 1000000 requests over 255333 distinct keys + cache 10000 entries, 3.9% of the 255333 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | SIEVE | 59.78% | + | S3-FIFO | 59.73% | + | 2Q | 59.62% | + | ARC | 58.99% | + | adaptive, 20 epochs (every 50000 requests) | 58.78% [58.77-58.93] | + | adaptive, 10 epochs (every 100000 requests) | 58.67% [58.60-58.72] | + | W-TinyLFU | 58.57% [54.90-58.74] | + | TTL | 58.39% | + | LRU | 58.39% | + | adaptive, 50 epochs (every 20000 requests) | 58.19% [58.06-58.35] | + | Random | 54.80% [54.77-54.82] | + | LFU | 41.44% | +=== RUN TestTraceEvidence/lirs_loop.trace + trace_evidence_test.go:166: + lirs_loop.trace + LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02) + real trace: 505500 requests over 1011 distinct keys + cache 500 entries, 49.5% of the 1011 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | W-TinyLFU | 45.77% [42.39-46.28] | + | adaptive, 50 epochs (every 10110 requests) | 43.49% [43.08-44.60] | + | adaptive, 20 epochs (every 25275 requests) | 42.81% [42.35-45.53] | + | adaptive, 10 epochs (every 50550 requests) | 40.67% [40.05-41.82] | + | Random | 19.66% [19.61-19.74] | + | LFU | 0.00% | + | LRU | 0.00% | + | 2Q | 0.00% | + | TTL | 0.00% | + | ARC | 0.00% | + | S3-FIFO | 0.00% | + | SIEVE | 0.00% | +=== RUN TestTraceEvidence/lirs_2_pools.trace + trace_evidence_test.go:166: + lirs_2_pools.trace + LIRS 2_pools: two interleaved pools with different locality + real trace: 100000 requests over 9939 distinct keys + cache 1000 entries, 10.1% of the 9939 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | W-TinyLFU | 54.77% [54.65-54.95] | + | adaptive, 10 epochs (every 10000 requests) | 54.42% [54.39-54.43] | + | TTL | 54.41% | + | LRU | 54.41% | + | adaptive, 20 epochs (every 5000 requests) | 54.40% [54.40-54.41] | + | 2Q | 54.40% | + | ARC | 54.37% | + | S3-FIFO | 54.37% | + | LFU | 54.36% | + | SIEVE | 54.36% | + | adaptive, 50 epochs (every 2000 requests) | 54.24% [54.19-54.27] | + | Random | 50.00% [49.89-50.05] | +=== RUN TestTraceEvidence/arc_p3 + trace_evidence_test.go:166: + arc_p3 + ARC paper P3 workstation trace (FAST '03) + ARC trace: 138478 records expanded to 2000000 accesses over 426527 distinct blocks + cache 20000 entries, 4.7% of the 426527 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 20 epochs (every 100000 requests) | 12.97% [12.51-13.10] | + | adaptive, 50 epochs (every 40000 requests) | 12.43% [12.10-13.49] | + | adaptive, 10 epochs (every 200000 requests) | 12.30% [11.93-12.55] | + | W-TinyLFU | 11.70% [11.59-11.83] | + | S3-FIFO | 10.75% | + | ARC | 10.25% | + | 2Q | 7.74% | + | SIEVE | 4.82% | + | LFU | 4.82% | + | Random | 3.09% [3.08-3.09] | + | LRU | 1.87% | + | TTL | 1.87% | +=== RUN TestTraceEvidence/arc_oltp + trace_evidence_test.go:166: + arc_oltp + ARC paper OLTP database trace (FAST '03) + ARC trace: 914145 records expanded to 914145 accesses over 186880 distinct blocks + cache 20000 entries, 10.7% of the 186880 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 68.25% | + | ARC | 67.80% | + | S3-FIFO | 67.79% | + | SIEVE | 67.72% | + | adaptive, 10 epochs (every 91414 requests) | 67.48% [67.37-67.73] | + | LRU | 67.06% | + | TTL | 67.06% | + | adaptive, 20 epochs (every 45707 requests) | 66.91% [66.80-67.13] | + | adaptive, 50 epochs (every 18282 requests) | 66.21% [66.03-66.33] | + | W-TinyLFU | 63.11% [63.01-63.17] | + | Random | 63.02% [63.00-63.05] | + | LFU | 45.43% | +=== RUN TestTraceEvidence/meta_kvcache_202206_1 + trace_evidence_test.go:166: + meta_kvcache_202206_1 + Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206) + Meta kvcache trace: 1160580 rows (942355 reads, 218225 writes) expanded by op_count to 2000000 reads over 340723 distinct keys + cache 10000 entries, 2.9% of the 340723 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 69.05% | + | SIEVE | 68.92% | + | W-TinyLFU | 68.51% [68.31-68.53] | + | ARC | 68.27% | + | 2Q | 68.16% | + | adaptive, 10 epochs (every 200000 requests) | 67.96% [67.94-68.11] | + | adaptive, 20 epochs (every 100000 requests) | 67.57% [67.48-67.78] | + | LFU | 66.87% | + | adaptive, 50 epochs (every 40000 requests) | 66.86% [66.82-66.97] | + | TTL | 66.39% | + | LRU | 66.39% | + | Random | 65.18% [65.17-65.19] | +=== RUN TestTraceEvidence/msr_hm_0 + trace_evidence_test.go:166: + msr_hm_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 418343 records (120058 reads, 298285 writes) expanded to 2000000 block accesses from reads over 818034 distinct 512-byte blocks + cache 20000 entries, 2.4% of the 818034 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 17.01% | + | ARC | 16.65% | + | W-TinyLFU | 16.19% [15.81-16.33] | + | S3-FIFO | 15.84% | + | SIEVE | 15.19% | + | adaptive, 10 epochs (every 200000 requests) | 15.13% [12.53-15.59] | + | LFU | 14.99% | + | adaptive, 50 epochs (every 40000 requests) | 14.37% [13.90-15.90] | + | adaptive, 20 epochs (every 100000 requests) | 13.58% [12.89-14.41] | + | Random | 12.62% [12.62-12.64] | + | LRU | 11.40% | + | TTL | 11.40% | +=== RUN TestTraceEvidence/msr_prn_0 + trace_evidence_test.go:166: + msr_prn_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96363 records (37302 reads, 59061 writes) expanded to 2000000 block accesses from reads over 1900653 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1900653 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | adaptive, 50 epochs (every 40000 requests) | 1.08% [0.98-1.08] | + | SIEVE | 1.06% | + | LFU | 1.06% | + | 2Q | 1.04% | + | ARC | 1.02% | + | S3-FIFO | 1.01% | + | TTL | 1.00% | + | LRU | 1.00% | + | Random | 0.95% [0.94-0.95] | + | adaptive, 10 epochs (every 200000 requests) | 0.87% [0.84-0.87] | + | W-TinyLFU | 0.74% [0.67-0.78] | + | adaptive, 20 epochs (every 100000 requests) | 0.72% [0.70-0.85] | +=== RUN TestTraceEvidence/msr_proj_0 + trace_evidence_test.go:166: + msr_proj_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 73170 records (43792 reads, 29378 writes) expanded to 2000000 block accesses from reads over 1748195 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1748195 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 5.79% | + | adaptive, 50 epochs (every 40000 requests) | 5.39% [5.36-5.53] | + | 2Q | 5.38% | + | ARC | 5.38% | + | LRU | 5.35% | + | TTL | 5.35% | + | Random | 5.21% [5.20-5.21] | + | adaptive, 10 epochs (every 200000 requests) | 5.14% [5.13-5.35] | + | adaptive, 20 epochs (every 100000 requests) | 5.10% [5.08-5.18] | + | SIEVE | 4.73% | + | LFU | 4.73% | + | W-TinyLFU | 4.29% [4.13-5.06] | +=== RUN TestTraceEvidence/msr_src1_2 + trace_evidence_test.go:166: + msr_src1_2 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 52584 records (28999 reads, 23585 writes) expanded to 2000000 block accesses from reads over 1947636 distinct 512-byte blocks + cache 20000 entries, 1.0% of the 1947636 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | 2Q | 1.77% | + | ARC | 1.73% | + | TTL | 1.70% | + | LRU | 1.70% | + | adaptive, 10 epochs (every 200000 requests) | 1.70% | + | adaptive, 20 epochs (every 100000 requests) | 1.70% | + | S3-FIFO | 1.70% | + | adaptive, 50 epochs (every 40000 requests) | 1.70% [1.26-1.70] | + | Random | 1.63% [1.63-1.64] | + | SIEVE | 1.42% | + | LFU | 1.42% | + | W-TinyLFU | 1.17% [0.94-1.19] | +=== RUN TestTraceEvidence/msr_usr_0 + trace_evidence_test.go:166: + msr_usr_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 96189 records (40753 reads, 55436 writes) expanded to 2000000 block accesses from reads over 1778953 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1778953 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | S3-FIFO | 3.58% | + | 2Q | 3.57% | + | TTL | 3.57% | + | LRU | 3.57% | + | adaptive, 10 epochs (every 200000 requests) | 3.57% [3.00-3.57] | + | ARC | 3.55% | + | adaptive, 20 epochs (every 100000 requests) | 3.50% [3.50-3.50] | + | Random | 3.49% [3.49-3.50] | + | adaptive, 50 epochs (every 40000 requests) | 3.41% [3.41-3.66] | + | W-TinyLFU | 2.88% [2.23-2.92] | + | LFU | 1.46% | + | SIEVE | 1.46% | +=== RUN TestTraceEvidence/msr_web_0 + trace_evidence_test.go:166: + msr_web_0 + MSR Cambridge enterprise block I/O, read requests (FAST '08) + MSR Cambridge trace: 71173 records (34449 reads, 36724 writes) expanded to 2000000 block accesses from reads over 1855956 distinct 512-byte blocks + cache 20000 entries, 1.1% of the 1855956 distinct keys + trace_evidence_test.go:196: + | Subject | Hit rate, median [min-max] | + | --- | --- | + | SIEVE | 2.61% | + | LFU | 2.61% | + | 2Q | 2.61% | + | ARC | 2.60% | + | Random | 2.56% [2.56-2.56] | + | S3-FIFO | 2.49% | + | adaptive, 50 epochs (every 40000 requests) | 2.44% [2.41-2.44] | + | adaptive, 20 epochs (every 100000 requests) | 2.41% [2.41-2.41] | + | LRU | 2.30% | + | TTL | 2.30% | + | adaptive, 10 epochs (every 200000 requests) | 2.29% [2.28-2.35] | + | W-TinyLFU | 2.26% [2.24-2.31] | +=== NAME TestTraceEvidence + trace_evidence_test.go:205: + | Trace | Requests | Best fixed | Worst fixed | Adaptive, 10 epochs | Adaptive, 20 epochs | Adaptive, 50 epochs | + | --- | --- | --- | --- | --- | --- | --- | + | twitter_cluster052.csv | 1000000 | SIEVE 59.78% | LFU 41.44% | 58.67% [58.60-58.72] (-1.11) | 58.78% [58.77-58.93] (-1.01) | 58.19% [58.06-58.35] (-1.60) | + | lirs_loop.trace | 505500 | W-TinyLFU 45.77% [42.39-46.28] | 2Q 0.00% | 40.67% [40.05-41.82] (-5.09) | 42.81% [42.35-45.53] (-2.96) | 43.49% [43.08-44.60] (-2.28) | + | lirs_2_pools.trace | 100000 | W-TinyLFU 54.77% [54.65-54.95] | Random 50.00% [49.89-50.05] | 54.42% [54.39-54.43] (-0.36) | 54.40% [54.40-54.41] (-0.37) | 54.24% [54.19-54.27] (-0.53) | + | arc_p3 | 2000000 | W-TinyLFU 11.70% [11.59-11.83] | LRU 1.87% | 12.30% [11.93-12.55] (+0.60) | 12.97% [12.51-13.10] (+1.27) | 12.43% [12.10-13.49] (+0.72) | + | arc_oltp | 914145 | 2Q 68.25% | LFU 45.43% | 67.48% [67.37-67.73] (-0.78) | 66.91% [66.80-67.13] (-1.34) | 66.21% [66.03-66.33] (-2.04) | + | meta_kvcache_202206_1 | 2000000 | S3-FIFO 69.05% | Random 65.18% [65.17-65.19] | 67.96% [67.94-68.11] (-1.09) | 67.57% [67.48-67.78] (-1.49) | 66.86% [66.82-66.97] (-2.19) | + | msr_hm_0 | 2000000 | 2Q 17.01% | LRU 11.40% | 15.13% [12.53-15.59] (-1.88) | 13.58% [12.89-14.41] (-3.43) | 14.37% [13.90-15.90] (-2.64) | + | msr_prn_0 | 2000000 | LFU 1.06% | W-TinyLFU 0.74% [0.67-0.78] | 0.87% [0.84-0.87] (-0.19) | 0.72% [0.70-0.85] (-0.33) | 1.08% [0.98-1.08] (+0.02) | + | msr_proj_0 | 2000000 | S3-FIFO 5.79% | W-TinyLFU 4.29% [4.13-5.06] | 5.14% [5.13-5.35] (-0.66) | 5.10% [5.08-5.18] (-0.70) | 5.39% [5.36-5.53] (-0.41) | + | msr_src1_2 | 2000000 | 2Q 1.77% | W-TinyLFU 1.17% [0.94-1.19] | 1.70% (-0.06) | 1.70% (-0.06) | 1.70% [1.26-1.70] (-0.07) | + | msr_usr_0 | 2000000 | S3-FIFO 3.58% | LFU 1.46% | 3.57% [3.00-3.57] (-0.01) | 3.50% [3.50-3.50] (-0.08) | 3.41% [3.41-3.66] (-0.17) | + | msr_web_0 | 2000000 | LFU 2.61% | W-TinyLFU 2.26% [2.24-2.31] | 2.29% [2.28-2.35] (-0.32) | 2.41% [2.41-2.41] (-0.20) | 2.44% [2.41-2.44] (-0.17) | + trace_evidence_test.go:206: wrote /private/tmp/claude-501/-Users-sshaplygin-GithubProjects-as-cache/8c03863a-50ed-4a03-b751-0a7c468b2089/scratchpad/evidence-1cb65fe/traces-3.json +--- PASS: TestTraceEvidence (453.22s) + --- PASS: TestTraceEvidence/twitter_cluster052.csv (18.28s) + --- PASS: TestTraceEvidence/lirs_loop.trace (9.57s) + --- PASS: TestTraceEvidence/lirs_2_pools.trace (1.25s) + --- PASS: TestTraceEvidence/arc_p3 (45.71s) + --- PASS: TestTraceEvidence/arc_oltp (18.89s) + --- PASS: TestTraceEvidence/meta_kvcache_202206_1 (34.10s) + --- PASS: TestTraceEvidence/msr_hm_0 (54.52s) + --- PASS: TestTraceEvidence/msr_prn_0 (56.63s) + --- PASS: TestTraceEvidence/msr_proj_0 (56.25s) + --- PASS: TestTraceEvidence/msr_src1_2 (50.16s) + --- PASS: TestTraceEvidence/msr_usr_0 (52.75s) + --- PASS: TestTraceEvidence/msr_web_0 (51.29s) +=== RUN TestLoadMSRTraceExpandsEachRecordIntoItsBlocks +--- PASS: TestLoadMSRTraceExpandsEachRecordIntoItsBlocks (0.00s) +=== RUN TestLoadMSRTraceNamespacesByHostAndDisk +--- PASS: TestLoadMSRTraceNamespacesByHostAndDisk (0.00s) +=== RUN TestLoadMSRTraceSkipsWritesUnlessAsked +--- PASS: TestLoadMSRTraceSkipsWritesUnlessAsked (0.00s) +=== RUN TestLoadMSRTraceHonoursBlockSizeAndLimit +--- PASS: TestLoadMSRTraceHonoursBlockSizeAndLimit (0.00s) +=== RUN TestLoadMSRTraceToleratesHeadersAndTruncation +--- PASS: TestLoadMSRTraceToleratesHeadersAndTruncation (0.00s) +=== RUN TestLoadMSRTraceRejectsAFileWithNoRecords +--- PASS: TestLoadMSRTraceRejectsAFileWithNoRecords (0.00s) +=== RUN TestLoadMetaKVTraceExpandsOpCount +--- PASS: TestLoadMetaKVTraceExpandsOpCount (0.00s) +=== RUN TestLoadMetaKVTraceReadsThe2024Layout +--- PASS: TestLoadMetaKVTraceReadsThe2024Layout (0.00s) +=== RUN TestLoadMetaKVTraceIncludesWritesOnRequest +--- PASS: TestLoadMetaKVTraceIncludesWritesOnRequest (0.00s) +=== RUN TestLoadMetaKVTraceHonoursTheLimitInsideARow +--- PASS: TestLoadMetaKVTraceHonoursTheLimitInsideARow (0.00s) +=== RUN TestLoadMetaKVTraceToleratesATruncatedTail +--- PASS: TestLoadMetaKVTraceToleratesATruncatedTail (0.00s) +=== RUN TestLoadMetaKVTraceRejectsAnUnrecognisedHeader +--- PASS: TestLoadMetaKVTraceRejectsAnUnrecognisedHeader (0.00s) +=== RUN TestEveryArmDrivesAnAdaptiveCache +--- PASS: TestEveryArmDrivesAnAdaptiveCache (0.01s) +=== RUN TestLoadMSRTraceCoversEveryBlockAByteRangeTouches +--- PASS: TestLoadMSRTraceCoversEveryBlockAByteRangeTouches (0.00s) +=== RUN TestLoadMSRTraceSeesReuseBetweenOverlappingRequests +--- PASS: TestLoadMSRTraceSeesReuseBetweenOverlappingRequests (0.00s) +=== RUN TestLoadMSRTraceCapsOneRecordsExpansion +--- PASS: TestLoadMSRTraceCapsOneRecordsExpansion (0.01s) +=== RUN TestLoadMSRTraceRequiresEveryColumn +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_size +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_type +=== RUN TestLoadMSRTraceRequiresEveryColumn/cut_inside_time +--- PASS: TestLoadMSRTraceRequiresEveryColumn (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_size (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_type (0.00s) + --- PASS: TestLoadMSRTraceRequiresEveryColumn/cut_inside_time (0.00s) +=== RUN TestLoadMSRTraceCountsOnlyRecognisedTypes +--- PASS: TestLoadMSRTraceCountsOnlyRecognisedTypes (0.00s) +=== RUN TestLoadMetaKVTraceRequiresOpCount +--- PASS: TestLoadMetaKVTraceRequiresOpCount (0.00s) +=== RUN TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount +--- PASS: TestLoadMetaKVTraceSkipsRowsWithAnUnreadableOpCount (0.00s) +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr +=== RUN TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta +--- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/msr (0.00s) + --- PASS: TestLoadersReturnWhatTheyReadFromATruncatedGzip/meta (0.00s) +=== RUN TestTraceLoaders +=== RUN TestTraceLoaders/lirs_loop.trace.gz +=== RUN TestTraceLoaders/lirs_2_pools.trace.gz +=== RUN TestTraceLoaders/meta_kvcache_202206_1.csv +=== RUN TestTraceLoaders/meta_kvcache_expansion + trace_test.go:216: 1160580 rows (942355 reads, 218225 writes) -> 2000000 requests over 340723 distinct keys +=== RUN TestTraceLoaders/arc_p3_expansion +--- PASS: TestTraceLoaders (2.76s) + --- PASS: TestTraceLoaders/lirs_loop.trace.gz (0.06s) + --- PASS: TestTraceLoaders/lirs_2_pools.trace.gz (0.01s) + --- PASS: TestTraceLoaders/meta_kvcache_202206_1.csv (2.04s) + --- PASS: TestTraceLoaders/meta_kvcache_expansion (0.35s) + --- PASS: TestTraceLoaders/arc_p3_expansion (0.29s) +=== RUN TestAdaptiveTuning + tuning_test.go:68: arc_p3 10 epochs cold gates=false: 12.10% [11.74-12.39] + tuning_test.go:68: arc_p3 10 epochs cold gates=true: 7.53% [4.33-7.71] + tuning_test.go:68: arc_p3 10 epochs warm gates=false: 12.47% [12.30-12.56] + tuning_test.go:68: arc_p3 10 epochs warm gates=true: 7.93% [7.79-8.17] + tuning_test.go:68: arc_p3 20 epochs cold gates=false: 13.26% [11.10-13.56] + tuning_test.go:68: arc_p3 20 epochs cold gates=true: 9.94% [7.36-10.45] + tuning_test.go:68: arc_p3 20 epochs warm gates=false: 12.64% [12.29-13.12] + tuning_test.go:68: arc_p3 20 epochs warm gates=true: 9.66% [9.25-9.87] + tuning_test.go:68: arc_p3 50 epochs cold gates=false: 12.02% [11.78-12.12] + tuning_test.go:68: arc_p3 50 epochs cold gates=true: 10.29% [8.22-12.26] + tuning_test.go:68: arc_p3 50 epochs warm gates=false: 12.39% [8.40-13.26] + tuning_test.go:68: arc_p3 50 epochs warm gates=true: 10.72% [9.66-11.00] +--- PASS: TestAdaptiveTuning (104.08s) +=== RUN TestSwitchWarmupCost + warmup_test.go:120: + hit rate after a switch from LRU to LFU at request 100000 (zipf, 200000 requests, cache 500) + | Configuration | 0-1000 | 1000-5000 | 5000-20000 | 20000-100000 | + | --- | --- | --- | --- | --- | + | LFU all along (no warm-up) | 77.00% | 74.28% | 74.59% | 73.90% | + | LRU, never switched | 70.50% | 67.90% | 67.58% | 66.82% | + | cold | 59.50% | 69.45% | 72.93% | 73.52% | + | warm | 70.50% | 70.03% | 72.91% | 73.55% | + | gradual | 70.40% | 70.12% | 72.88% | 73.52% | + | gradual, capped at 10 Gets | 59.90% | 69.47% | 72.93% | 73.52% | + | gradual, capped at 100 Gets | 63.90% | 69.58% | 72.99% | 73.53% | + | gradual, capped at 1000 Gets | 70.40% | 70.12% | 72.88% | 73.52% | +--- PASS: TestSwitchWarmupCost (0.66s) +PASS +ok github.com/sshaplygin/as-cache/bench 622.864s diff --git a/bench/results/current/manifest.json b/bench/results/current/manifest.json new file mode 100644 index 0000000..9a5a3f1 --- /dev/null +++ b/bench/results/current/manifest.json @@ -0,0 +1,147 @@ +{ + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "report_generator_commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "started_at": "2026-10-06T23:41:20.981365+00:00", + "platform": "macOS-26.2-arm64-arm-64bit-Mach-O", + "machine": "arm64", + "go": "go version go1.25.5 darwin/arm64", + "files": [ + { + "file": "arc_oltp.gz", + "bytes": 2246479, + "sha256": "9599b313a5662e72734fb499b3513759144d7f80847134f29638567b6a5ab151" + }, + { + "file": "arc_p3.gz", + "bytes": 1441128, + "sha256": "71be839be560a64cc260c6a93fe002b6de5b4d24bdbc885f4a81a65ff84e4cbf" + }, + { + "file": "lirs_2_pools.trace.gz", + "bytes": 171161, + "sha256": "12370af6d9e1b5a4d16642c6a5d0322565f20aed54bed8176901e74f70a4c3ee" + }, + { + "file": "lirs_loop.trace.gz", + "bytes": 17848, + "sha256": "465c1cc6bb08993034fd3597106cb0edc55b25a5984a17a12018f30a06ba60e9" + }, + { + "file": "lirs_multi2.trace.gz", + "bytes": 43980, + "sha256": "3576bc20286f4d204a3c2b6647bb691ed9dde9a923a32624e145873ed830dad5" + }, + { + "file": "meta_kvcache_202206_1.csv", + "bytes": 134217728, + "sha256": "faaf993d0267a3b68430ec079de6074060cb3593ddff4a9e987c25a5d68cd277" + }, + { + "file": "msr_hm_0.csv.gz", + "bytes": 41967571, + "sha256": "06d414bd428b9b77e7ff803c7cc9ec14351283fd9eb45a5d00fdca3aaeeba468" + }, + { + "file": "msr_prn_0.csv.gz", + "bytes": 44469556, + "sha256": "cc98e9e6f0d1d41ae050a78a6bebf1f6031e9c824d84685c7b3d6be73080c1ba" + }, + { + "file": "msr_proj_0.csv.gz", + "bytes": 54999265, + "sha256": "b972f0e6d396a9db13653d7f51a04554dd1f83ea9e91458536bd5e0e9eb24fc2" + }, + { + "file": "msr_src1_2.csv.gz", + "bytes": 21339692, + "sha256": "34539f303ee98222237852610756dc77cac59739e909557fa40baf92c980e12c" + }, + { + "file": "msr_usr_0.csv.gz", + "bytes": 25999401, + "sha256": "094eb4e7c871e4e339682d149ed90fbb8a034968f51ab71da85853f7a2ad8d9c" + }, + { + "file": "msr_web_0.csv.gz", + "bytes": 24066938, + "sha256": "80d026313b52c8288ef2878173b344895637a26a960b1bccde91da9abf34deaa" + }, + { + "file": "twitter_cluster052.csv", + "bytes": 44110178, + "sha256": "f3f47903f0aad7a83260f5df63910c694da94ec7eee91bbde98cc34d46dabfe6" + } + ], + "commands": [ + { + "args": [ + "make", + "verify-ref" + ], + "log": "reference.log", + "exit_code": 0, + "duration_seconds": 63.97003970807418 + }, + { + "args": [ + "python3", + "scripts/measure_bytes.py", + "/Users/sshaplygin/GithubProjects/as-cache/traces", + "/private/tmp/claude-501/-Users-sshaplygin-GithubProjects-as-cache/8c03863a-50ed-4a03-b751-0a7c468b2089/scratchpad/evidence-1cb65fe/bytes.json", + "--libcachesim", + "/Users/sshaplygin/GithubProjects/as-cache/.tools/libCacheSim" + ], + "log": "bytes.log", + "exit_code": 0, + "duration_seconds": 4.836863958276808 + }, + { + "args": [ + "make", + "evidence" + ], + "log": "evidence-1.log", + "exit_code": 0, + "duration_seconds": 601.4871436660178 + }, + { + "args": [ + "make", + "evidence" + ], + "log": "evidence-2.log", + "exit_code": 0, + "duration_seconds": 608.2311230418272 + }, + { + "args": [ + "make", + "evidence" + ], + "log": "evidence-3.log", + "exit_code": 0, + "duration_seconds": 623.8097285837866 + } + ], + "libcachesim_commit": "1d7415569978330ea95c9cff06a260630406f7e3", + "libcachesim_binary_sha256": "a6a60ec8d17c68f00130591cda32e119fa68b7bcbbc7c0c942005dbad8d0597e", + "completed_at": "2026-10-07T00:13:03.545150+00:00", + "artifacts_sha256": { + "README.md": "e7a867e5d6783628f4235384d9b3464dfed1902b04f1d55cdce94964fdfd76f8", + "bytes.json": "18be4f2472e0025f0d08aa1c5ccfaedf2da092bb5a01d76cea2f61a049f473ca", + "bytes.log": "0e50d60cca48845d4b62115f3644fc441be2bf4b292fda2fd2d8d8b179914df7", + "evidence-1.log": "e330c09a26e687131c8a11c1cf09471bb6647e6e20f9b1df62726515ec71afea", + "evidence-2.log": "3100705b6cf5e25be78c10603d8b3ee9f548d212e83d03b543bb3101f807b599", + "evidence-3.log": "aa56e97d1ce75d4b7a2b73f5e500025270bb4eca53af244be1052830b55f119b", + "reference.log": "5a2d5018737946b6f7a9ef9ba822e5dc2678093137ab79d45701a7a67fc38623", + "reference.tsv": "08b801df457a1c5daa05b4edee0d6e4b7361fe3278c6b19ea522a47203363bd2", + "traces-1-tuning.json": "32f8e645a4f0e35d906aaafe01a94ab340dbfb8bb98eb4a8bc6dae1eb8a481d7", + "traces-1.json": "e2cc0f50fca01c050222c30b837cb148f51ef2b068c45f19cb1457df668d8a94", + "traces-2-tuning.json": "63a3da871b862ef7aa6ca998216461fc133c7e4f7bec0a43d4b811f4edac9dc6", + "traces-2.json": "e9f66ffcde971c40acfee00d9218a98f4570dd755f032ca50e61f320b4dc5609", + "traces-3-tuning.json": "cb0101fe5748a38b4e0ad363d04bb0de9627eaba8f6992243e407ce71a9a7721", + "traces-3.json": "28ec8cf1fac07111f6310307c138f5321b6a41a2c34cdbf23424417c8b7e43b2", + "traces.json": "c5a7bc93568322cf7c15530190d153b938d4f4128935cfac85272f48732e2741", + "tuning.json": "cf3f66fa5b33d6c09fcd49e9909e6ddc8c55ca7acb590085ae93b92afc5123b7" + } +} diff --git a/bench/results/current/reference.log b/bench/results/current/reference.log new file mode 100644 index 0000000..6c74fbc --- /dev/null +++ b/bench/results/current/reference.log @@ -0,0 +1,125 @@ +libCacheSim 1d7415569978330ea95c9cff06a260630406f7e3, LRU, object sizes ignored + twitter_cluster052.csv 2500 1000000 requests miss 0.5201 + twitter_cluster052.csv 5000 1000000 requests miss 0.4659 + twitter_cluster052.csv 10000 1000000 requests miss 0.4161 + twitter_cluster052.csv 20000 1000000 requests miss 0.3710 + twitter_cluster052.csv 40000 1000000 requests miss 0.3274 + lirs_loop.trace.gz 125 505500 requests miss 1.0000 + lirs_loop.trace.gz 250 505500 requests miss 1.0000 + lirs_loop.trace.gz 500 505500 requests miss 1.0000 + lirs_loop.trace.gz 1000 505500 requests miss 1.0000 + lirs_loop.trace.gz 2000 505500 requests miss 0.0020 + lirs_2_pools.trace.gz 250 100000 requests miss 0.5829 + lirs_2_pools.trace.gz 500 100000 requests miss 0.4894 + lirs_2_pools.trace.gz 1000 100000 requests miss 0.4558 + lirs_2_pools.trace.gz 2000 100000 requests miss 0.4067 + lirs_2_pools.trace.gz 4000 100000 requests miss 0.3148 + arc_p3.gz 5000 2000000 requests miss 0.9895 + arc_p3.gz 10000 2000000 requests miss 0.9875 + arc_p3.gz 20000 2000000 requests miss 0.9813 + arc_p3.gz 40000 2000000 requests miss 0.9534 + arc_p3.gz 80000 2000000 requests miss 0.7660 + arc_oltp.gz 5000 914145 requests miss 0.4635 + arc_oltp.gz 10000 914145 requests miss 0.3930 + arc_oltp.gz 20000 914145 requests miss 0.3294 + arc_oltp.gz 40000 914145 requests miss 0.2763 + arc_oltp.gz 80000 914145 requests miss 0.2251 + meta_kvcache_202206_1.csv 2500 2000000 requests miss 0.3932 + meta_kvcache_202206_1.csv 5000 2000000 requests miss 0.3667 + meta_kvcache_202206_1.csv 10000 2000000 requests miss 0.3361 + meta_kvcache_202206_1.csv 20000 2000000 requests miss 0.2980 + meta_kvcache_202206_1.csv 40000 2000000 requests miss 0.2542 + msr_hm_0.csv.gz 5000 2000000 requests miss 0.9156 + msr_hm_0.csv.gz 10000 2000000 requests miss 0.9045 + msr_hm_0.csv.gz 20000 2000000 requests miss 0.8860 + msr_hm_0.csv.gz 40000 2000000 requests miss 0.8112 + msr_hm_0.csv.gz 80000 2000000 requests miss 0.6617 + msr_prn_0.csv.gz 5000 2000000 requests miss 0.9913 + msr_prn_0.csv.gz 10000 2000000 requests miss 0.9908 + msr_prn_0.csv.gz 20000 2000000 requests miss 0.9900 + msr_prn_0.csv.gz 40000 2000000 requests miss 0.9877 + msr_prn_0.csv.gz 80000 2000000 requests miss 0.9858 + msr_proj_0.csv.gz 5000 2000000 requests miss 0.9573 + msr_proj_0.csv.gz 10000 2000000 requests miss 0.9522 + msr_proj_0.csv.gz 20000 2000000 requests miss 0.9465 + msr_proj_0.csv.gz 40000 2000000 requests miss 0.9394 + msr_proj_0.csv.gz 80000 2000000 requests miss 0.9279 + msr_src1_2.csv.gz 5000 2000000 requests miss 0.9831 + msr_src1_2.csv.gz 10000 2000000 requests miss 0.9830 + msr_src1_2.csv.gz 20000 2000000 requests miss 0.9830 + msr_src1_2.csv.gz 40000 2000000 requests miss 0.9827 + msr_src1_2.csv.gz 80000 2000000 requests miss 0.9822 + msr_usr_0.csv.gz 5000 2000000 requests miss 0.9703 + msr_usr_0.csv.gz 10000 2000000 requests miss 0.9681 + msr_usr_0.csv.gz 20000 2000000 requests miss 0.9643 + msr_usr_0.csv.gz 40000 2000000 requests miss 0.9552 + msr_usr_0.csv.gz 80000 2000000 requests miss 0.9460 + msr_web_0.csv.gz 5000 2000000 requests miss 0.9798 + msr_web_0.csv.gz 10000 2000000 requests miss 0.9787 + msr_web_0.csv.gz 20000 2000000 requests miss 0.9770 + msr_web_0.csv.gz 40000 2000000 requests miss 0.9694 + msr_web_0.csv.gz 80000 2000000 requests miss 0.9438 + +Replaying the same traces through the Go loaders and LRU + reference_test.go:112: twitter_cluster052.csv 2500 requests 1000000/1000000 miss 0.5201/0.5201 |d| 0.003 pts + reference_test.go:112: twitter_cluster052.csv 5000 requests 1000000/1000000 miss 0.4659/0.4659 |d| 0.003 pts + reference_test.go:112: twitter_cluster052.csv 10000 requests 1000000/1000000 miss 0.4161/0.4161 |d| 0.001 pts + reference_test.go:112: twitter_cluster052.csv 20000 requests 1000000/1000000 miss 0.3710/0.3710 |d| 0.003 pts + reference_test.go:112: twitter_cluster052.csv 40000 requests 1000000/1000000 miss 0.3274/0.3274 |d| 0.001 pts + reference_test.go:112: lirs_loop.trace.gz 125 requests 505500/505500 miss 1.0000/1.0000 |d| 0.000 pts + reference_test.go:112: lirs_loop.trace.gz 250 requests 505500/505500 miss 1.0000/1.0000 |d| 0.000 pts + reference_test.go:112: lirs_loop.trace.gz 500 requests 505500/505500 miss 1.0000/1.0000 |d| 0.000 pts + reference_test.go:112: lirs_loop.trace.gz 1000 requests 505500/505500 miss 1.0000/1.0000 |d| 0.000 pts + reference_test.go:112: lirs_loop.trace.gz 2000 requests 505500/505500 miss 0.0020/0.0020 |d| 0.000 pts + reference_test.go:112: lirs_2_pools.trace.gz 250 requests 100000/100000 miss 0.5829/0.5829 |d| 0.001 pts + reference_test.go:112: lirs_2_pools.trace.gz 500 requests 100000/100000 miss 0.4894/0.4894 |d| 0.002 pts + reference_test.go:112: lirs_2_pools.trace.gz 1000 requests 100000/100000 miss 0.4558/0.4558 |d| 0.005 pts + reference_test.go:112: lirs_2_pools.trace.gz 2000 requests 100000/100000 miss 0.4067/0.4067 |d| 0.004 pts + reference_test.go:112: lirs_2_pools.trace.gz 4000 requests 100000/100000 miss 0.3148/0.3148 |d| 0.001 pts + reference_test.go:112: arc_p3.gz 5000 requests 2000000/2000000 miss 0.9895/0.9895 |d| 0.002 pts + reference_test.go:112: arc_p3.gz 10000 requests 2000000/2000000 miss 0.9875/0.9875 |d| 0.002 pts + reference_test.go:112: arc_p3.gz 20000 requests 2000000/2000000 miss 0.9813/0.9813 |d| 0.002 pts + reference_test.go:112: arc_p3.gz 40000 requests 2000000/2000000 miss 0.9534/0.9534 |d| 0.001 pts + reference_test.go:112: arc_p3.gz 80000 requests 2000000/2000000 miss 0.7660/0.7660 |d| 0.002 pts + reference_test.go:112: arc_oltp.gz 5000 requests 914145/914145 miss 0.4635/0.4635 |d| 0.000 pts + reference_test.go:112: arc_oltp.gz 10000 requests 914145/914145 miss 0.3930/0.3930 |d| 0.002 pts + reference_test.go:112: arc_oltp.gz 20000 requests 914145/914145 miss 0.3294/0.3294 |d| 0.001 pts + reference_test.go:112: arc_oltp.gz 40000 requests 914145/914145 miss 0.2763/0.2763 |d| 0.001 pts + reference_test.go:112: arc_oltp.gz 80000 requests 914145/914145 miss 0.2251/0.2251 |d| 0.004 pts + reference_test.go:112: meta_kvcache_202206_1.csv 2500 requests 2000000/2000000 miss 0.3932/0.3932 |d| 0.003 pts + reference_test.go:112: meta_kvcache_202206_1.csv 5000 requests 2000000/2000000 miss 0.3667/0.3667 |d| 0.004 pts + reference_test.go:112: meta_kvcache_202206_1.csv 10000 requests 2000000/2000000 miss 0.3361/0.3361 |d| 0.001 pts + reference_test.go:112: meta_kvcache_202206_1.csv 20000 requests 2000000/2000000 miss 0.2980/0.2980 |d| 0.002 pts + reference_test.go:112: meta_kvcache_202206_1.csv 40000 requests 2000000/2000000 miss 0.2542/0.2542 |d| 0.000 pts + reference_test.go:112: msr_hm_0.csv.gz 5000 requests 2000000/2000000 miss 0.9156/0.9156 |d| 0.001 pts + reference_test.go:112: msr_hm_0.csv.gz 10000 requests 2000000/2000000 miss 0.9045/0.9045 |d| 0.002 pts + reference_test.go:112: msr_hm_0.csv.gz 20000 requests 2000000/2000000 miss 0.8860/0.8860 |d| 0.003 pts + reference_test.go:112: msr_hm_0.csv.gz 40000 requests 2000000/2000000 miss 0.8112/0.8112 |d| 0.004 pts + reference_test.go:112: msr_hm_0.csv.gz 80000 requests 2000000/2000000 miss 0.6617/0.6617 |d| 0.003 pts + reference_test.go:112: msr_prn_0.csv.gz 5000 requests 2000000/2000000 miss 0.9913/0.9913 |d| 0.000 pts + reference_test.go:112: msr_prn_0.csv.gz 10000 requests 2000000/2000000 miss 0.9908/0.9908 |d| 0.004 pts + reference_test.go:112: msr_prn_0.csv.gz 20000 requests 2000000/2000000 miss 0.9900/0.9900 |d| 0.004 pts + reference_test.go:112: msr_prn_0.csv.gz 40000 requests 2000000/2000000 miss 0.9877/0.9877 |d| 0.003 pts + reference_test.go:112: msr_prn_0.csv.gz 80000 requests 2000000/2000000 miss 0.9858/0.9858 |d| 0.005 pts + reference_test.go:112: msr_proj_0.csv.gz 5000 requests 2000000/2000000 miss 0.9573/0.9573 |d| 0.005 pts + reference_test.go:112: msr_proj_0.csv.gz 10000 requests 2000000/2000000 miss 0.9522/0.9522 |d| 0.001 pts + reference_test.go:112: msr_proj_0.csv.gz 20000 requests 2000000/2000000 miss 0.9465/0.9465 |d| 0.001 pts + reference_test.go:112: msr_proj_0.csv.gz 40000 requests 2000000/2000000 miss 0.9394/0.9394 |d| 0.003 pts + reference_test.go:112: msr_proj_0.csv.gz 80000 requests 2000000/2000000 miss 0.9279/0.9279 |d| 0.002 pts + reference_test.go:112: msr_src1_2.csv.gz 5000 requests 2000000/2000000 miss 0.9831/0.9831 |d| 0.003 pts + reference_test.go:112: msr_src1_2.csv.gz 10000 requests 2000000/2000000 miss 0.9830/0.9830 |d| 0.002 pts + reference_test.go:112: msr_src1_2.csv.gz 20000 requests 2000000/2000000 miss 0.9830/0.9830 |d| 0.002 pts + reference_test.go:112: msr_src1_2.csv.gz 40000 requests 2000000/2000000 miss 0.9827/0.9827 |d| 0.002 pts + reference_test.go:112: msr_src1_2.csv.gz 80000 requests 2000000/2000000 miss 0.9822/0.9822 |d| 0.002 pts + reference_test.go:112: msr_usr_0.csv.gz 5000 requests 2000000/2000000 miss 0.9703/0.9703 |d| 0.003 pts + reference_test.go:112: msr_usr_0.csv.gz 10000 requests 2000000/2000000 miss 0.9681/0.9681 |d| 0.003 pts + reference_test.go:112: msr_usr_0.csv.gz 20000 requests 2000000/2000000 miss 0.9643/0.9643 |d| 0.002 pts + reference_test.go:112: msr_usr_0.csv.gz 40000 requests 2000000/2000000 miss 0.9552/0.9552 |d| 0.004 pts + reference_test.go:112: msr_usr_0.csv.gz 80000 requests 2000000/2000000 miss 0.9460/0.9460 |d| 0.003 pts + reference_test.go:112: msr_web_0.csv.gz 5000 requests 2000000/2000000 miss 0.9798/0.9798 |d| 0.000 pts + reference_test.go:112: msr_web_0.csv.gz 10000 requests 2000000/2000000 miss 0.9787/0.9787 |d| 0.004 pts + reference_test.go:112: msr_web_0.csv.gz 20000 requests 2000000/2000000 miss 0.9770/0.9770 |d| 0.001 pts + reference_test.go:112: msr_web_0.csv.gz 40000 requests 2000000/2000000 miss 0.9694/0.9694 |d| 0.002 pts + reference_test.go:112: msr_web_0.csv.gz 80000 requests 2000000/2000000 miss 0.9438/0.9438 |d| 0.002 pts + +Reference gate passed: 60 points, libCacheSim 1d7415569978330ea95c9cff06a260630406f7e3. diff --git a/bench/results/current/reference.tsv b/bench/results/current/reference.tsv new file mode 100644 index 0000000..46d053c --- /dev/null +++ b/bench/results/current/reference.tsv @@ -0,0 +1,60 @@ +twitter_cluster052.csv 2500 1000000 0.5201 +twitter_cluster052.csv 5000 1000000 0.4659 +twitter_cluster052.csv 10000 1000000 0.4161 +twitter_cluster052.csv 20000 1000000 0.3710 +twitter_cluster052.csv 40000 1000000 0.3274 +lirs_loop.trace.gz 125 505500 1.0000 +lirs_loop.trace.gz 250 505500 1.0000 +lirs_loop.trace.gz 500 505500 1.0000 +lirs_loop.trace.gz 1000 505500 1.0000 +lirs_loop.trace.gz 2000 505500 0.0020 +lirs_2_pools.trace.gz 250 100000 0.5829 +lirs_2_pools.trace.gz 500 100000 0.4894 +lirs_2_pools.trace.gz 1000 100000 0.4558 +lirs_2_pools.trace.gz 2000 100000 0.4067 +lirs_2_pools.trace.gz 4000 100000 0.3148 +arc_p3.gz 5000 2000000 0.9895 +arc_p3.gz 10000 2000000 0.9875 +arc_p3.gz 20000 2000000 0.9813 +arc_p3.gz 40000 2000000 0.9534 +arc_p3.gz 80000 2000000 0.7660 +arc_oltp.gz 5000 914145 0.4635 +arc_oltp.gz 10000 914145 0.3930 +arc_oltp.gz 20000 914145 0.3294 +arc_oltp.gz 40000 914145 0.2763 +arc_oltp.gz 80000 914145 0.2251 +meta_kvcache_202206_1.csv 2500 2000000 0.3932 +meta_kvcache_202206_1.csv 5000 2000000 0.3667 +meta_kvcache_202206_1.csv 10000 2000000 0.3361 +meta_kvcache_202206_1.csv 20000 2000000 0.2980 +meta_kvcache_202206_1.csv 40000 2000000 0.2542 +msr_hm_0.csv.gz 5000 2000000 0.9156 +msr_hm_0.csv.gz 10000 2000000 0.9045 +msr_hm_0.csv.gz 20000 2000000 0.8860 +msr_hm_0.csv.gz 40000 2000000 0.8112 +msr_hm_0.csv.gz 80000 2000000 0.6617 +msr_prn_0.csv.gz 5000 2000000 0.9913 +msr_prn_0.csv.gz 10000 2000000 0.9908 +msr_prn_0.csv.gz 20000 2000000 0.9900 +msr_prn_0.csv.gz 40000 2000000 0.9877 +msr_prn_0.csv.gz 80000 2000000 0.9858 +msr_proj_0.csv.gz 5000 2000000 0.9573 +msr_proj_0.csv.gz 10000 2000000 0.9522 +msr_proj_0.csv.gz 20000 2000000 0.9465 +msr_proj_0.csv.gz 40000 2000000 0.9394 +msr_proj_0.csv.gz 80000 2000000 0.9279 +msr_src1_2.csv.gz 5000 2000000 0.9831 +msr_src1_2.csv.gz 10000 2000000 0.9830 +msr_src1_2.csv.gz 20000 2000000 0.9830 +msr_src1_2.csv.gz 40000 2000000 0.9827 +msr_src1_2.csv.gz 80000 2000000 0.9822 +msr_usr_0.csv.gz 5000 2000000 0.9703 +msr_usr_0.csv.gz 10000 2000000 0.9681 +msr_usr_0.csv.gz 20000 2000000 0.9643 +msr_usr_0.csv.gz 40000 2000000 0.9552 +msr_usr_0.csv.gz 80000 2000000 0.9460 +msr_web_0.csv.gz 5000 2000000 0.9798 +msr_web_0.csv.gz 10000 2000000 0.9787 +msr_web_0.csv.gz 20000 2000000 0.9770 +msr_web_0.csv.gz 40000 2000000 0.9694 +msr_web_0.csv.gz 80000 2000000 0.9438 diff --git a/bench/results/current/traces-1-tuning.json b/bench/results/current/traces-1-tuning.json new file mode 100644 index 0000000..5f5f83c --- /dev/null +++ b/bench/results/current/traces-1-tuning.json @@ -0,0 +1,350 @@ +[ + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.082650000000001, + 12.0152, + 12.250900000000001, + 12.11015, + 12.01725 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 7.5211, + 7.72825, + 7.524400000000001, + 7.649, + 4.748349999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.463799999999999, + 12.557699999999999, + 12.340950000000001, + 12.09465, + 12.5502 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 8.09635, + 8.265450000000001, + 7.8083, + 7.81785, + 7.4352 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 11.4338, + 13.510050000000001, + 12.64795, + 11.128549999999999, + 13.7359 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.0358, + 9.01375, + 7.4294, + 7.63215, + 10.3894 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.8338, + 12.78975, + 12.835849999999999, + 12.953700000000001, + 13.1249 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.1987, + 9.276900000000001, + 9.334299999999999, + 8.981200000000001, + 10.4677 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 11.8685, + 11.7964, + 12.27275, + 12.249500000000001, + 8.097999999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 7.7906, + 10.5512, + 9.71175, + 11.186, + 9.16825 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.2791, + 12.4282, + 12.22125, + 12.22955, + 12.21175 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 8.3146, + 9.64165, + 11.484, + 11.135349999999999, + 11.34585 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + } +] diff --git a/bench/results/current/traces-1.json b/bench/results/current/traces-1.json new file mode 100644 index 0000000..96dd945 --- /dev/null +++ b/bench/results/current/traces-1.json @@ -0,0 +1,6933 @@ +{ + "bandit": "bandit.NewThompson(0.7, 13)", + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "cpus": 10, + "go": "go1.25.5", + "measured_at": "2026-10-06T23:50:45Z", + "platform": "darwin/arm64", + "runs": 5, + "settings": { + "epoch_mode": "requests", + "epochs_per_trace": [ + 10, + 20, + 50 + ], + "location": "adaptive[].settings and observe_only[].settings (actual constructor arguments)" + }, + "traces": [ + { + "trace": "twitter_cluster052.csv", + "source": "Twitter Twemcache production KV cache (OSDI '20)", + "requests": 1000000, + "distinct_keys": 255333, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 59.6242 + ] + }, + "ARC": { + "runs": [ + 58.9894 + ] + }, + "LFU": { + "runs": [ + 41.4436 + ] + }, + "LRU": { + "runs": [ + 58.391000000000005 + ] + }, + "Random": { + "runs": [ + 54.8261, + 54.795899999999996, + 54.7614, + 54.8164, + 54.806999999999995 + ] + }, + "S3-FIFO": { + "runs": [ + 59.7291 + ] + }, + "SIEVE": { + "runs": [ + 59.785 + ] + }, + "TTL": { + "runs": [ + 58.391000000000005 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.480799999999995, + 58.7423, + 56.195499999999996, + 57.606500000000004, + 56.530800000000006 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 58.69839999999999, + 58.755900000000004, + 58.67059999999999, + 58.684000000000005, + 58.687599999999996 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 50000, + "hit_rate_percent": { + "runs": [ + 58.8106, + 58.802299999999995, + 58.9654, + 58.9469, + 58.8916 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 20000, + "hit_rate_percent": { + "runs": [ + 58.228500000000004, + 58.1962, + 58.2232, + 58.1781, + 58.1434 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 20000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.017247374643577507, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22736, + "Misses": 20401, + "Active": false + }, + { + "Policy": 9, + "Hits": 22680, + "Misses": 20457, + "Active": false + }, + { + "Policy": 8, + "Hits": 22565, + "Misses": 20572, + "Active": false + }, + { + "Policy": 3, + "Hits": 22553, + "Misses": 20584, + "Active": false + }, + { + "Policy": 4, + "Hits": 22307, + "Misses": 20830, + "Active": false + }, + { + "Policy": 1, + "Hits": 21992, + "Misses": 21145, + "Active": true + }, + { + "Policy": 6, + "Hits": 21965, + "Misses": 21172, + "Active": false + }, + { + "Policy": 5, + "Hits": 20391, + "Misses": 22746, + "Active": false + }, + { + "Policy": 2, + "Hits": 15918, + "Misses": 27219, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010907936270755925, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 33090, + "Misses": 20449, + "Active": false + }, + { + "Policy": 9, + "Hits": 33069, + "Misses": 20470, + "Active": false + }, + { + "Policy": 8, + "Hits": 33059, + "Misses": 20480, + "Active": false + }, + { + "Policy": 4, + "Hits": 32898, + "Misses": 20641, + "Active": false + }, + { + "Policy": 1, + "Hits": 32506, + "Misses": 21033, + "Active": true + }, + { + "Policy": 6, + "Hits": 32504, + "Misses": 21035, + "Active": false + }, + { + "Policy": 7, + "Hits": 32158, + "Misses": 21381, + "Active": false + }, + { + "Policy": 5, + "Hits": 30873, + "Misses": 22666, + "Active": false + }, + { + "Policy": 2, + "Hits": 26775, + "Misses": 26764, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020372846692362168, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 31502, + "Misses": 19350, + "Active": false + }, + { + "Policy": 8, + "Hits": 31153, + "Misses": 19699, + "Active": false + }, + { + "Policy": 9, + "Hits": 31129, + "Misses": 19723, + "Active": false + }, + { + "Policy": 3, + "Hits": 31122, + "Misses": 19730, + "Active": false + }, + { + "Policy": 4, + "Hits": 30922, + "Misses": 19930, + "Active": false + }, + { + "Policy": 6, + "Hits": 30533, + "Misses": 20319, + "Active": false + }, + { + "Policy": 1, + "Hits": 30466, + "Misses": 20386, + "Active": true + }, + { + "Policy": 5, + "Hits": 28979, + "Misses": 21873, + "Active": false + }, + { + "Policy": 2, + "Hits": 25177, + "Misses": 25675, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.013820401123322279, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 25223, + "Misses": 20000, + "Active": false + }, + { + "Policy": 8, + "Hits": 25174, + "Misses": 20049, + "Active": false + }, + { + "Policy": 7, + "Hits": 25145, + "Misses": 20078, + "Active": false + }, + { + "Policy": 3, + "Hits": 25130, + "Misses": 20093, + "Active": false + }, + { + "Policy": 4, + "Hits": 24940, + "Misses": 20283, + "Active": false + }, + { + "Policy": 6, + "Hits": 24631, + "Misses": 20592, + "Active": false + }, + { + "Policy": 1, + "Hits": 24598, + "Misses": 20625, + "Active": true + }, + { + "Policy": 5, + "Hits": 22912, + "Misses": 22311, + "Active": false + }, + { + "Policy": 2, + "Hits": 18665, + "Misses": 26558, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.022883622185477792, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29598, + "Misses": 19389, + "Active": false + }, + { + "Policy": 9, + "Hits": 29316, + "Misses": 19671, + "Active": false + }, + { + "Policy": 8, + "Hits": 29295, + "Misses": 19692, + "Active": false + }, + { + "Policy": 3, + "Hits": 29131, + "Misses": 19856, + "Active": false + }, + { + "Policy": 4, + "Hits": 28956, + "Misses": 20031, + "Active": false + }, + { + "Policy": 6, + "Hits": 28513, + "Misses": 20474, + "Active": false + }, + { + "Policy": 1, + "Hits": 28477, + "Misses": 20510, + "Active": true + }, + { + "Policy": 5, + "Hits": 26716, + "Misses": 22271, + "Active": false + }, + { + "Policy": 2, + "Hits": 22742, + "Misses": 26245, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 414436, + "sieve_hits": 597850, + "fifo_hits": 555634, + "different_lfu_sieve_decisions": 216148, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_loop.trace", + "source": "LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02)", + "requests": 505500, + "distinct_keys": 1011, + "capacity": 500, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 0 + ] + }, + "ARC": { + "runs": [ + 0 + ] + }, + "LFU": { + "runs": [ + 0 + ] + }, + "LRU": { + "runs": [ + 0 + ] + }, + "Random": { + "runs": [ + 19.660336300692382, + 19.643719090009892, + 19.716122650840752, + 19.62650840751731, + 19.69475766567755 + ] + }, + "S3-FIFO": { + "runs": [ + 0 + ] + }, + "SIEVE": { + "runs": [ + 0 + ] + }, + "TTL": { + "runs": [ + 0 + ] + }, + "W-TinyLFU": { + "runs": [ + 50.18081107814045, + 53.574085064292774, + 52.09376854599407, + 51.44549950544016, + 59.76636993076162 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 50550, + "hit_rate_percent": { + "runs": [ + 39.74619188921859, + 35.814836795252226, + 37.44965380811078, + 39.897527200791295, + 40.486844708209695 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50550, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 25275, + "hit_rate_percent": { + "runs": [ + 39.60079129574679, + 41.78120672601385, + 44.48803165182987, + 43.949357072205736, + 43.63422354104847 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 10110, + "hit_rate_percent": { + "runs": [ + 44.23996043521266, + 45.09060336300693, + 41.154698318496536, + 45.308209693372895, + 45.09238377843719 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10110, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + } + ], + "effective_sample_rate": 0.128, + "observe_only": [ + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.378887417218543, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28606, + "Misses": 46894, + "Active": false + }, + { + "Policy": 5, + "Hits": 9488, + "Misses": 66012, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 75500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 75500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4346315789473684, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28903, + "Misses": 37597, + "Active": false + }, + { + "Policy": 5, + "Hits": 12102, + "Misses": 54398, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 66500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 66500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.49250819672131146, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30043, + "Misses": 30957, + "Active": false + }, + { + "Policy": 8, + "Hits": 21168, + "Misses": 39832, + "Active": false + }, + { + "Policy": 5, + "Hits": 14069, + "Misses": 46931, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 60968, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 61000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 61000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.413970802919708, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28357, + "Misses": 40143, + "Active": false + }, + { + "Policy": 5, + "Hits": 11396, + "Misses": 57104, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4556842105263158, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30303, + "Misses": 36197, + "Active": false + }, + { + "Policy": 5, + "Hits": 12025, + "Misses": 54475, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 66500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 66500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 0, + "sieve_hits": 0, + "fifo_hits": 0, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_2_pools.trace", + "source": "LIRS 2_pools: two interleaved pools with different locality", + "requests": 100000, + "distinct_keys": 9939, + "capacity": 1000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 54.397 + ] + }, + "ARC": { + "runs": [ + 54.37499999999999 + ] + }, + "LFU": { + "runs": [ + 54.361000000000004 + ] + }, + "LRU": { + "runs": [ + 54.415 + ] + }, + "Random": { + "runs": [ + 49.999, + 49.952000000000005, + 49.875, + 49.901, + 49.952999999999996 + ] + }, + "S3-FIFO": { + "runs": [ + 54.37 + ] + }, + "SIEVE": { + "runs": [ + 54.361000000000004 + ] + }, + "TTL": { + "runs": [ + 54.415 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.593, + 54.879999999999995, + 54.588, + 54.596999999999994, + 55.11000000000001 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 10000, + "hit_rate_percent": { + "runs": [ + 54.419, + 54.416, + 54.407000000000004, + 54.403999999999996, + 54.425999999999995 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 5000, + "hit_rate_percent": { + "runs": [ + 54.37499999999999, + 54.690000000000005, + 54.413999999999994, + 54.429, + 54.376999999999995 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 2000, + "hit_rate_percent": { + "runs": [ + 54.159, + 54.187, + 54.217999999999996, + 54.178000000000004, + 54.282 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 2000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + } + ], + "effective_sample_rate": 0.064, + "observe_only": [ + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.004181184668989535, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 2857, + "Misses": 2883, + "Active": false + }, + { + "Policy": 6, + "Hits": 2840, + "Misses": 2900, + "Active": false + }, + { + "Policy": 1, + "Hits": 2833, + "Misses": 2907, + "Active": true + }, + { + "Policy": 4, + "Hits": 2817, + "Misses": 2923, + "Active": false + }, + { + "Policy": 8, + "Hits": 2813, + "Misses": 2927, + "Active": false + }, + { + "Policy": 9, + "Hits": 2812, + "Misses": 2928, + "Active": false + }, + { + "Policy": 2, + "Hits": 2805, + "Misses": 2935, + "Active": false + }, + { + "Policy": 3, + "Hits": 2805, + "Misses": 2935, + "Active": false + }, + { + "Policy": 5, + "Hits": 2628, + "Misses": 3112, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.005932896890343653, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 2, + "Hits": 1803, + "Misses": 3085, + "Active": false + }, + { + "Policy": 9, + "Hits": 1801, + "Misses": 3087, + "Active": false + }, + { + "Policy": 7, + "Hits": 1799, + "Misses": 3089, + "Active": false + }, + { + "Policy": 3, + "Hits": 1796, + "Misses": 3092, + "Active": false + }, + { + "Policy": 8, + "Hits": 1788, + "Misses": 3100, + "Active": false + }, + { + "Policy": 1, + "Hits": 1774, + "Misses": 3114, + "Active": true + }, + { + "Policy": 6, + "Hits": 1773, + "Misses": 3115, + "Active": false + }, + { + "Policy": 4, + "Hits": 1763, + "Misses": 3125, + "Active": false + }, + { + "Policy": 5, + "Hits": 1635, + "Misses": 3253, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0031674208144796268, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 8, + "Hits": 3812, + "Misses": 2818, + "Active": false + }, + { + "Policy": 7, + "Hits": 3806, + "Misses": 2824, + "Active": false + }, + { + "Policy": 3, + "Hits": 3803, + "Misses": 2827, + "Active": false + }, + { + "Policy": 4, + "Hits": 3798, + "Misses": 2832, + "Active": false + }, + { + "Policy": 6, + "Hits": 3798, + "Misses": 2832, + "Active": false + }, + { + "Policy": 1, + "Hits": 3791, + "Misses": 2839, + "Active": true + }, + { + "Policy": 9, + "Hits": 3787, + "Misses": 2843, + "Active": false + }, + { + "Policy": 2, + "Hits": 3773, + "Misses": 2857, + "Active": false + }, + { + "Policy": 5, + "Hits": 3459, + "Misses": 3171, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 5365, + "Misses": 3045, + "Active": true + }, + { + "Policy": 2, + "Hits": 5350, + "Misses": 3060, + "Active": false + }, + { + "Policy": 9, + "Hits": 5349, + "Misses": 3061, + "Active": false + }, + { + "Policy": 3, + "Hits": 5342, + "Misses": 3068, + "Active": false + }, + { + "Policy": 6, + "Hits": 5337, + "Misses": 3073, + "Active": false + }, + { + "Policy": 7, + "Hits": 5337, + "Misses": 3073, + "Active": false + }, + { + "Policy": 8, + "Hits": 5329, + "Misses": 3081, + "Active": false + }, + { + "Policy": 4, + "Hits": 5324, + "Misses": 3086, + "Active": false + }, + { + "Policy": 5, + "Hits": 4860, + "Misses": 3550, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.005055064090991157, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 2748, + "Misses": 2791, + "Active": false + }, + { + "Policy": 8, + "Hits": 2740, + "Misses": 2799, + "Active": false + }, + { + "Policy": 4, + "Hits": 2737, + "Misses": 2802, + "Active": false + }, + { + "Policy": 3, + "Hits": 2736, + "Misses": 2803, + "Active": false + }, + { + "Policy": 6, + "Hits": 2735, + "Misses": 2804, + "Active": false + }, + { + "Policy": 1, + "Hits": 2720, + "Misses": 2819, + "Active": true + }, + { + "Policy": 2, + "Hits": 2717, + "Misses": 2822, + "Active": false + }, + { + "Policy": 9, + "Hits": 2716, + "Misses": 2823, + "Active": false + }, + { + "Policy": 5, + "Hits": 2539, + "Misses": 3000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 54361, + "sieve_hits": 54361, + "fifo_hits": 49957, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_p3", + "source": "ARC paper P3 workstation trace (FAST '03)", + "requests": 2000000, + "distinct_keys": 426527, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 7.74445 + ] + }, + "ARC": { + "runs": [ + 10.25295 + ] + }, + "LFU": { + "runs": [ + 4.8162 + ] + }, + "LRU": { + "runs": [ + 1.8679500000000002 + ] + }, + "Random": { + "runs": [ + 3.07655, + 3.0668, + 3.0894999999999997, + 3.0867999999999998, + 3.0752 + ] + }, + "S3-FIFO": { + "runs": [ + 10.75245 + ] + }, + "SIEVE": { + "runs": [ + 4.8162 + ] + }, + "TTL": { + "runs": [ + 1.8679500000000002 + ] + }, + "W-TinyLFU": { + "runs": [ + 12.088550000000001, + 12.241349999999999, + 12.23175, + 12.3759, + 12.22885 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.3819, + 12.4169, + 12.684599999999998, + 12.557599999999999, + 12.150500000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.2404, + 12.916250000000002, + 12.641849999999998, + 12.5986, + 13.0035 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.595600000000001, + 12.39815, + 13.588049999999999, + 11.8984, + 8.578199999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11664154356346096, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13513, + "Misses": 85997, + "Active": false + }, + { + "Policy": 8, + "Hits": 10478, + "Misses": 89032, + "Active": false + }, + { + "Policy": 4, + "Hits": 10076, + "Misses": 89434, + "Active": false + }, + { + "Policy": 3, + "Hits": 6995, + "Misses": 92515, + "Active": false + }, + { + "Policy": 2, + "Hits": 4780, + "Misses": 94730, + "Active": false + }, + { + "Policy": 9, + "Hits": 4780, + "Misses": 94730, + "Active": false + }, + { + "Policy": 5, + "Hits": 3037, + "Misses": 96473, + "Active": false + }, + { + "Policy": 1, + "Hits": 1906, + "Misses": 97604, + "Active": true + }, + { + "Policy": 6, + "Hits": 1865, + "Misses": 97645, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11326107587033614, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13254, + "Misses": 86851, + "Active": false + }, + { + "Policy": 8, + "Hits": 10780, + "Misses": 89325, + "Active": false + }, + { + "Policy": 4, + "Hits": 10438, + "Misses": 89667, + "Active": false + }, + { + "Policy": 3, + "Hits": 7801, + "Misses": 92304, + "Active": false + }, + { + "Policy": 2, + "Hits": 4936, + "Misses": 95169, + "Active": false + }, + { + "Policy": 9, + "Hits": 4936, + "Misses": 95169, + "Active": false + }, + { + "Policy": 5, + "Hits": 3117, + "Misses": 96988, + "Active": false + }, + { + "Policy": 1, + "Hits": 1916, + "Misses": 98189, + "Active": true + }, + { + "Policy": 6, + "Hits": 1844, + "Misses": 98261, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11183700256547939, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13238, + "Misses": 87328, + "Active": false + }, + { + "Policy": 8, + "Hits": 10901, + "Misses": 89665, + "Active": false + }, + { + "Policy": 4, + "Hits": 10452, + "Misses": 90114, + "Active": false + }, + { + "Policy": 3, + "Hits": 7182, + "Misses": 93384, + "Active": false + }, + { + "Policy": 2, + "Hits": 5115, + "Misses": 95451, + "Active": false + }, + { + "Policy": 9, + "Hits": 5115, + "Misses": 95451, + "Active": false + }, + { + "Policy": 5, + "Hits": 3120, + "Misses": 97446, + "Active": false + }, + { + "Policy": 6, + "Hits": 1997, + "Misses": 98569, + "Active": false + }, + { + "Policy": 1, + "Hits": 1991, + "Misses": 98575, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11773316190287805, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13709, + "Misses": 87401, + "Active": false + }, + { + "Policy": 8, + "Hits": 10618, + "Misses": 90492, + "Active": false + }, + { + "Policy": 4, + "Hits": 10255, + "Misses": 90855, + "Active": false + }, + { + "Policy": 3, + "Hits": 7010, + "Misses": 94100, + "Active": false + }, + { + "Policy": 2, + "Hits": 4974, + "Misses": 96136, + "Active": false + }, + { + "Policy": 9, + "Hits": 4974, + "Misses": 96136, + "Active": false + }, + { + "Policy": 5, + "Hits": 2948, + "Misses": 98162, + "Active": false + }, + { + "Policy": 1, + "Hits": 1805, + "Misses": 99305, + "Active": true + }, + { + "Policy": 6, + "Hits": 1745, + "Misses": 99365, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11509288232265219, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13511, + "Misses": 87477, + "Active": false + }, + { + "Policy": 8, + "Hits": 10936, + "Misses": 90052, + "Active": false + }, + { + "Policy": 4, + "Hits": 10349, + "Misses": 90639, + "Active": false + }, + { + "Policy": 3, + "Hits": 6833, + "Misses": 94155, + "Active": false + }, + { + "Policy": 2, + "Hits": 4823, + "Misses": 96165, + "Active": false + }, + { + "Policy": 9, + "Hits": 4823, + "Misses": 96165, + "Active": false + }, + { + "Policy": 5, + "Hits": 3047, + "Misses": 97941, + "Active": false + }, + { + "Policy": 1, + "Hits": 1888, + "Misses": 99100, + "Active": true + }, + { + "Policy": 6, + "Hits": 1868, + "Misses": 99120, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 96324, + "sieve_hits": 96324, + "fifo_hits": 38093, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_oltp", + "source": "ARC paper OLTP database trace (FAST '03)", + "requests": 914145, + "distinct_keys": 186880, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.25427038380126 + ] + }, + "ARC": { + "runs": [ + 67.8008412232195 + ] + }, + "LFU": { + "runs": [ + 45.426053853600905 + ] + }, + "LRU": { + "runs": [ + 67.0592739663839 + ] + }, + "Random": { + "runs": [ + 63.021511904566566, + 63.04907864726056, + 63.02019920253351, + 63.013198125023926, + 63.049188039096634 + ] + }, + "S3-FIFO": { + "runs": [ + 67.79460588856253 + ] + }, + "SIEVE": { + "runs": [ + 67.717484644121 + ] + }, + "TTL": { + "runs": [ + 67.0592739663839 + ] + }, + "W-TinyLFU": { + "runs": [ + 63.112088344846825, + 63.239858009396755, + 63.035951626930085, + 62.03753233896154, + 63.39924191457591 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 91414, + "hit_rate_percent": { + "runs": [ + 67.74472321130675, + 67.46030443747983, + 67.74472321130675, + 67.64123853436817, + 67.51259373512954 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 91414, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 45707, + "hit_rate_percent": { + "runs": [ + 67.06704078674609, + 67.22434624703958, + 66.91881484884783, + 67.04997566031648, + 66.9715417138419 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 18282, + "hit_rate_percent": { + "runs": [ + 65.88353051211789, + 65.85541681024345, + 66.58976420589731, + 66.15307199623692, + 66.05232211520054 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 18282, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011587881897676011, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32210, + "Misses": 14563, + "Active": false + }, + { + "Policy": 9, + "Hits": 32085, + "Misses": 14688, + "Active": false + }, + { + "Policy": 8, + "Hits": 32023, + "Misses": 14750, + "Active": false + }, + { + "Policy": 4, + "Hits": 32000, + "Misses": 14773, + "Active": false + }, + { + "Policy": 6, + "Hits": 31703, + "Misses": 15070, + "Active": false + }, + { + "Policy": 1, + "Hits": 31668, + "Misses": 15105, + "Active": true + }, + { + "Policy": 7, + "Hits": 30130, + "Misses": 16643, + "Active": false + }, + { + "Policy": 5, + "Hits": 29887, + "Misses": 16886, + "Active": false + }, + { + "Policy": 2, + "Hits": 25448, + "Misses": 21325, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011703292077123839, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32970, + "Misses": 14538, + "Active": false + }, + { + "Policy": 4, + "Hits": 32947, + "Misses": 14561, + "Active": false + }, + { + "Policy": 9, + "Hits": 32863, + "Misses": 14645, + "Active": false + }, + { + "Policy": 8, + "Hits": 32755, + "Misses": 14753, + "Active": false + }, + { + "Policy": 1, + "Hits": 32414, + "Misses": 15094, + "Active": true + }, + { + "Policy": 6, + "Hits": 32331, + "Misses": 15177, + "Active": false + }, + { + "Policy": 7, + "Hits": 30674, + "Misses": 16834, + "Active": false + }, + { + "Policy": 5, + "Hits": 30356, + "Misses": 17152, + "Active": false + }, + { + "Policy": 2, + "Hits": 26711, + "Misses": 20797, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.008997007433149906, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 37025, + "Misses": 14770, + "Active": false + }, + { + "Policy": 4, + "Hits": 36906, + "Misses": 14889, + "Active": false + }, + { + "Policy": 9, + "Hits": 36874, + "Misses": 14921, + "Active": false + }, + { + "Policy": 8, + "Hits": 36751, + "Misses": 15044, + "Active": false + }, + { + "Policy": 1, + "Hits": 36559, + "Misses": 15236, + "Active": true + }, + { + "Policy": 6, + "Hits": 36466, + "Misses": 15329, + "Active": false + }, + { + "Policy": 7, + "Hits": 34768, + "Misses": 17027, + "Active": false + }, + { + "Policy": 5, + "Hits": 34284, + "Misses": 17511, + "Active": false + }, + { + "Policy": 2, + "Hits": 30724, + "Misses": 21071, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.013302646720368294, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 29095, + "Misses": 14355, + "Active": false + }, + { + "Policy": 9, + "Hits": 29013, + "Misses": 14437, + "Active": false + }, + { + "Policy": 4, + "Hits": 28924, + "Misses": 14526, + "Active": false + }, + { + "Policy": 8, + "Hits": 28912, + "Misses": 14538, + "Active": false + }, + { + "Policy": 6, + "Hits": 28593, + "Misses": 14857, + "Active": false + }, + { + "Policy": 1, + "Hits": 28517, + "Misses": 14933, + "Active": true + }, + { + "Policy": 5, + "Hits": 26850, + "Misses": 16600, + "Active": false + }, + { + "Policy": 7, + "Hits": 26712, + "Misses": 16738, + "Active": false + }, + { + "Policy": 2, + "Hits": 23201, + "Misses": 20249, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010568307608763816, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 33471, + "Misses": 14408, + "Active": false + }, + { + "Policy": 4, + "Hits": 33321, + "Misses": 14558, + "Active": false + }, + { + "Policy": 8, + "Hits": 33235, + "Misses": 14644, + "Active": false + }, + { + "Policy": 9, + "Hits": 33211, + "Misses": 14668, + "Active": false + }, + { + "Policy": 6, + "Hits": 32968, + "Misses": 14911, + "Active": false + }, + { + "Policy": 1, + "Hits": 32965, + "Misses": 14914, + "Active": true + }, + { + "Policy": 5, + "Hits": 31039, + "Misses": 16840, + "Active": false + }, + { + "Policy": 7, + "Hits": 31008, + "Misses": 16871, + "Active": false + }, + { + "Policy": 2, + "Hits": 27226, + "Misses": 20653, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 415260, + "sieve_hits": 619036, + "fifo_hits": 584567, + "different_lfu_sieve_decisions": 230770, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "meta_kvcache_202206_1", + "source": "Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206)", + "requests": 2000000, + "distinct_keys": 340723, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.15679999999999 + ] + }, + "ARC": { + "runs": [ + 68.2667 + ] + }, + "LFU": { + "runs": [ + 66.86565 + ] + }, + "LRU": { + "runs": [ + 66.389 + ] + }, + "Random": { + "runs": [ + 65.1714, + 65.17875, + 65.1889, + 65.1829, + 65.1828 + ] + }, + "S3-FIFO": { + "runs": [ + 69.05425 + ] + }, + "SIEVE": { + "runs": [ + 68.92399999999999 + ] + }, + "TTL": { + "runs": [ + 66.389 + ] + }, + "W-TinyLFU": { + "runs": [ + 68.46605, + 68.56989999999999, + 68.52855, + 68.445, + 68.4972 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 68.0985, + 68.2, + 68.2854, + 67.84225, + 68.1276 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 67.58225, + 67.67345, + 67.7445, + 67.64145, + 67.60105 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 66.9271, + 66.9101, + 66.8771, + 66.85515, + 66.89739999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03684706115571412, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 50024, + "Misses": 30688, + "Active": false + }, + { + "Policy": 8, + "Hits": 49696, + "Misses": 31016, + "Active": false + }, + { + "Policy": 9, + "Hits": 49580, + "Misses": 31132, + "Active": false + }, + { + "Policy": 4, + "Hits": 48841, + "Misses": 31871, + "Active": false + }, + { + "Policy": 3, + "Hits": 48798, + "Misses": 31914, + "Active": false + }, + { + "Policy": 2, + "Hits": 48628, + "Misses": 32084, + "Active": false + }, + { + "Policy": 6, + "Hits": 47123, + "Misses": 33589, + "Active": false + }, + { + "Policy": 1, + "Hits": 47050, + "Misses": 33662, + "Active": true + }, + { + "Policy": 5, + "Hits": 45789, + "Misses": 34923, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.034632185510479085, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 55388, + "Misses": 30688, + "Active": false + }, + { + "Policy": 8, + "Hits": 55091, + "Misses": 30985, + "Active": false + }, + { + "Policy": 9, + "Hits": 54941, + "Misses": 31135, + "Active": false + }, + { + "Policy": 2, + "Hits": 54296, + "Misses": 31780, + "Active": false + }, + { + "Policy": 4, + "Hits": 54262, + "Misses": 31814, + "Active": false + }, + { + "Policy": 3, + "Hits": 54258, + "Misses": 31818, + "Active": false + }, + { + "Policy": 6, + "Hits": 52482, + "Misses": 33594, + "Active": false + }, + { + "Policy": 1, + "Hits": 52407, + "Misses": 33669, + "Active": true + }, + { + "Policy": 5, + "Hits": 51318, + "Misses": 34758, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03289744131012029, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 58940, + "Misses": 31067, + "Active": false + }, + { + "Policy": 8, + "Hits": 58603, + "Misses": 31404, + "Active": false + }, + { + "Policy": 9, + "Hits": 58406, + "Misses": 31601, + "Active": false + }, + { + "Policy": 3, + "Hits": 57782, + "Misses": 32225, + "Active": false + }, + { + "Policy": 4, + "Hits": 57713, + "Misses": 32294, + "Active": false + }, + { + "Policy": 2, + "Hits": 57585, + "Misses": 32422, + "Active": false + }, + { + "Policy": 1, + "Hits": 55979, + "Misses": 34028, + "Active": true + }, + { + "Policy": 6, + "Hits": 55976, + "Misses": 34031, + "Active": false + }, + { + "Policy": 5, + "Hits": 54614, + "Misses": 35393, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03468344567873538, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 53987, + "Misses": 30722, + "Active": false + }, + { + "Policy": 9, + "Hits": 53489, + "Misses": 31220, + "Active": false + }, + { + "Policy": 8, + "Hits": 53430, + "Misses": 31279, + "Active": false + }, + { + "Policy": 3, + "Hits": 52784, + "Misses": 31925, + "Active": false + }, + { + "Policy": 4, + "Hits": 52723, + "Misses": 31986, + "Active": false + }, + { + "Policy": 2, + "Hits": 52307, + "Misses": 32402, + "Active": false + }, + { + "Policy": 6, + "Hits": 51119, + "Misses": 33590, + "Active": false + }, + { + "Policy": 1, + "Hits": 51049, + "Misses": 33660, + "Active": true + }, + { + "Policy": 5, + "Hits": 49823, + "Misses": 34886, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03533409110353347, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 50860, + "Misses": 30959, + "Active": false + }, + { + "Policy": 8, + "Hits": 50584, + "Misses": 31235, + "Active": false + }, + { + "Policy": 9, + "Hits": 50426, + "Misses": 31393, + "Active": false + }, + { + "Policy": 3, + "Hits": 49708, + "Misses": 32111, + "Active": false + }, + { + "Policy": 4, + "Hits": 49682, + "Misses": 32137, + "Active": false + }, + { + "Policy": 2, + "Hits": 49529, + "Misses": 32290, + "Active": false + }, + { + "Policy": 6, + "Hits": 48023, + "Misses": 33796, + "Active": false + }, + { + "Policy": 1, + "Hits": 47969, + "Misses": 33850, + "Active": true + }, + { + "Policy": 5, + "Hits": 46708, + "Misses": 35111, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 1337313, + "sieve_hits": 1378480, + "fifo_hits": 1313815, + "different_lfu_sieve_decisions": 130305, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_hm_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 818034, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 17.0071 + ] + }, + "ARC": { + "runs": [ + 16.64985 + ] + }, + "LFU": { + "runs": [ + 14.9886 + ] + }, + "LRU": { + "runs": [ + 11.397350000000001 + ] + }, + "Random": { + "runs": [ + 12.601299999999998, + 12.611349999999998, + 12.6382, + 12.6311, + 12.63065 + ] + }, + "S3-FIFO": { + "runs": [ + 15.8427 + ] + }, + "SIEVE": { + "runs": [ + 15.187249999999999 + ] + }, + "TTL": { + "runs": [ + 11.397350000000001 + ] + }, + "W-TinyLFU": { + "runs": [ + 16.0467, + 16.08315, + 16.1326, + 15.98685, + 15.89 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 14.37675, + 14.339550000000001, + 15.116150000000001, + 14.447, + 14.47205 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 13.0995, + 12.1231, + 12.876399999999999, + 13.74585, + 12.8886 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 14.1995, + 14.547699999999999, + 15.825849999999999, + 15.81655, + 14.438200000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05503816122506816, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18889, + "Misses": 83440, + "Active": false + }, + { + "Policy": 7, + "Hits": 18386, + "Misses": 83943, + "Active": false + }, + { + "Policy": 4, + "Hits": 18342, + "Misses": 83987, + "Active": false + }, + { + "Policy": 8, + "Hits": 17647, + "Misses": 84682, + "Active": false + }, + { + "Policy": 2, + "Hits": 17351, + "Misses": 84978, + "Active": false + }, + { + "Policy": 9, + "Hits": 15803, + "Misses": 86526, + "Active": false + }, + { + "Policy": 5, + "Hits": 14471, + "Misses": 87858, + "Active": false + }, + { + "Policy": 1, + "Hits": 13257, + "Misses": 89072, + "Active": true + }, + { + "Policy": 6, + "Hits": 13255, + "Misses": 89074, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05540705928428061, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18770, + "Misses": 83365, + "Active": false + }, + { + "Policy": 7, + "Hits": 18735, + "Misses": 83400, + "Active": false + }, + { + "Policy": 4, + "Hits": 18543, + "Misses": 83592, + "Active": false + }, + { + "Policy": 8, + "Hits": 17538, + "Misses": 84597, + "Active": false + }, + { + "Policy": 2, + "Hits": 16764, + "Misses": 85371, + "Active": false + }, + { + "Policy": 9, + "Hits": 15343, + "Misses": 86792, + "Active": false + }, + { + "Policy": 5, + "Hits": 14406, + "Misses": 87729, + "Active": false + }, + { + "Policy": 1, + "Hits": 13111, + "Misses": 89024, + "Active": true + }, + { + "Policy": 6, + "Hits": 13082, + "Misses": 89053, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05567274519467719, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18611, + "Misses": 82839, + "Active": false + }, + { + "Policy": 4, + "Hits": 18239, + "Misses": 83211, + "Active": false + }, + { + "Policy": 7, + "Hits": 17788, + "Misses": 83662, + "Active": false + }, + { + "Policy": 8, + "Hits": 17343, + "Misses": 84107, + "Active": false + }, + { + "Policy": 2, + "Hits": 16665, + "Misses": 84785, + "Active": false + }, + { + "Policy": 9, + "Hits": 15104, + "Misses": 86346, + "Active": false + }, + { + "Policy": 5, + "Hits": 14305, + "Misses": 87145, + "Active": false + }, + { + "Policy": 1, + "Hits": 12963, + "Misses": 88487, + "Active": true + }, + { + "Policy": 6, + "Hits": 12952, + "Misses": 88498, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05613001544393646, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 15149, + "Misses": 82624, + "Active": false + }, + { + "Policy": 7, + "Hits": 14961, + "Misses": 82812, + "Active": false + }, + { + "Policy": 4, + "Hits": 14668, + "Misses": 83105, + "Active": false + }, + { + "Policy": 8, + "Hits": 14091, + "Misses": 83682, + "Active": false + }, + { + "Policy": 2, + "Hits": 13239, + "Misses": 84534, + "Active": false + }, + { + "Policy": 9, + "Hits": 12127, + "Misses": 85646, + "Active": false + }, + { + "Policy": 5, + "Hits": 10992, + "Misses": 86781, + "Active": false + }, + { + "Policy": 6, + "Hits": 9689, + "Misses": 88084, + "Active": false + }, + { + "Policy": 1, + "Hits": 9661, + "Misses": 88112, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05897804929598728, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 17252, + "Misses": 82107, + "Active": false + }, + { + "Policy": 3, + "Hits": 17073, + "Misses": 82286, + "Active": false + }, + { + "Policy": 4, + "Hits": 16789, + "Misses": 82570, + "Active": false + }, + { + "Policy": 8, + "Hits": 16105, + "Misses": 83254, + "Active": false + }, + { + "Policy": 2, + "Hits": 15814, + "Misses": 83545, + "Active": false + }, + { + "Policy": 9, + "Hits": 14567, + "Misses": 84792, + "Active": false + }, + { + "Policy": 5, + "Hits": 12777, + "Misses": 86582, + "Active": false + }, + { + "Policy": 6, + "Hits": 11442, + "Misses": 87917, + "Active": false + }, + { + "Policy": 1, + "Hits": 11392, + "Misses": 87967, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 299772, + "sieve_hits": 303745, + "fifo_hits": 228175, + "different_lfu_sieve_decisions": 34189, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_prn_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1900653, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.03775 + ] + }, + "ARC": { + "runs": [ + 1.02225 + ] + }, + "LFU": { + "runs": [ + 1.05595 + ] + }, + "LRU": { + "runs": [ + 1.0038 + ] + }, + "Random": { + "runs": [ + 0.9417500000000001, + 0.9482499999999999, + 0.9435499999999999, + 0.9471999999999999, + 0.9421 + ] + }, + "S3-FIFO": { + "runs": [ + 1.008 + ] + }, + "SIEVE": { + "runs": [ + 1.05595 + ] + }, + "TTL": { + "runs": [ + 1.0038 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.7302000000000001, + 0.7536499999999999, + 0.6962, + 0.68825, + 0.78425 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 0.8665499999999999, + 0.8373, + 0.8399, + 0.86795, + 0.8651000000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 0.931, + 0.7058, + 0.729, + 0.9643999999999999, + 0.9653 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.05655, + 1.01575, + 1.0473, + 1.05545, + 1.0707 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000362358956808825, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 853, + "Misses": 98496, + "Active": false + }, + { + "Policy": 9, + "Hits": 853, + "Misses": 98496, + "Active": false + }, + { + "Policy": 3, + "Hits": 849, + "Misses": 98500, + "Active": false + }, + { + "Policy": 4, + "Hits": 846, + "Misses": 98503, + "Active": false + }, + { + "Policy": 8, + "Hits": 819, + "Misses": 98530, + "Active": false + }, + { + "Policy": 6, + "Hits": 818, + "Misses": 98531, + "Active": false + }, + { + "Policy": 1, + "Hits": 817, + "Misses": 98532, + "Active": true + }, + { + "Policy": 5, + "Hits": 758, + "Misses": 98591, + "Active": false + }, + { + "Policy": 7, + "Hits": 588, + "Misses": 98761, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005302439121996107, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1262, + "Misses": 98692, + "Active": false + }, + { + "Policy": 9, + "Hits": 1262, + "Misses": 98692, + "Active": false + }, + { + "Policy": 3, + "Hits": 1249, + "Misses": 98705, + "Active": false + }, + { + "Policy": 4, + "Hits": 1240, + "Misses": 98714, + "Active": false + }, + { + "Policy": 8, + "Hits": 1218, + "Misses": 98736, + "Active": false + }, + { + "Policy": 6, + "Hits": 1211, + "Misses": 98743, + "Active": false + }, + { + "Policy": 1, + "Hits": 1209, + "Misses": 98745, + "Active": true + }, + { + "Policy": 5, + "Hits": 1150, + "Misses": 98804, + "Active": false + }, + { + "Policy": 7, + "Hits": 872, + "Misses": 99082, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0006821077128326535, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 883, + "Misses": 98808, + "Active": false + }, + { + "Policy": 9, + "Hits": 883, + "Misses": 98808, + "Active": false + }, + { + "Policy": 3, + "Hits": 870, + "Misses": 98821, + "Active": false + }, + { + "Policy": 4, + "Hits": 852, + "Misses": 98839, + "Active": false + }, + { + "Policy": 8, + "Hits": 820, + "Misses": 98871, + "Active": false + }, + { + "Policy": 6, + "Hits": 816, + "Misses": 98875, + "Active": false + }, + { + "Policy": 1, + "Hits": 815, + "Misses": 98876, + "Active": true + }, + { + "Policy": 5, + "Hits": 766, + "Misses": 98925, + "Active": false + }, + { + "Policy": 7, + "Hits": 530, + "Misses": 99161, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004382295526074668, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1314, + "Misses": 99090, + "Active": false + }, + { + "Policy": 9, + "Hits": 1314, + "Misses": 99090, + "Active": false + }, + { + "Policy": 3, + "Hits": 1279, + "Misses": 99125, + "Active": false + }, + { + "Policy": 4, + "Hits": 1276, + "Misses": 99128, + "Active": false + }, + { + "Policy": 1, + "Hits": 1270, + "Misses": 99134, + "Active": true + }, + { + "Policy": 6, + "Hits": 1269, + "Misses": 99135, + "Active": false + }, + { + "Policy": 8, + "Hits": 1268, + "Misses": 99136, + "Active": false + }, + { + "Policy": 5, + "Hits": 1190, + "Misses": 99214, + "Active": false + }, + { + "Policy": 7, + "Hits": 817, + "Misses": 99587, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0006399872002559939, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1035, + "Misses": 98967, + "Active": false + }, + { + "Policy": 9, + "Hits": 1035, + "Misses": 98967, + "Active": false + }, + { + "Policy": 3, + "Hits": 1000, + "Misses": 99002, + "Active": false + }, + { + "Policy": 4, + "Hits": 993, + "Misses": 99009, + "Active": false + }, + { + "Policy": 8, + "Hits": 980, + "Misses": 99022, + "Active": false + }, + { + "Policy": 1, + "Hits": 971, + "Misses": 99031, + "Active": true + }, + { + "Policy": 6, + "Hits": 967, + "Misses": 99035, + "Active": false + }, + { + "Policy": 5, + "Hits": 920, + "Misses": 99082, + "Active": false + }, + { + "Policy": 7, + "Hits": 618, + "Misses": 99384, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 21119, + "sieve_hits": 21119, + "fifo_hits": 20052, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_proj_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1748195, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 5.38475 + ] + }, + "ARC": { + "runs": [ + 5.38475 + ] + }, + "LFU": { + "runs": [ + 4.72735 + ] + }, + "LRU": { + "runs": [ + 5.3511999999999995 + ] + }, + "Random": { + "runs": [ + 5.199800000000001, + 5.20305, + 5.20995, + 5.2, + 5.1986 + ] + }, + "S3-FIFO": { + "runs": [ + 5.7946 + ] + }, + "SIEVE": { + "runs": [ + 4.72735 + ] + }, + "TTL": { + "runs": [ + 5.3511999999999995 + ] + }, + "W-TinyLFU": { + "runs": [ + 4.22635, + 4.9845, + 4.10585, + 4.2909999999999995, + 4.94925 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 5.1378, + 5.3511999999999995, + 5.1556999999999995, + 5.3511999999999995, + 5.13095 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 5.0832500000000005, + 5.1277, + 5.07925, + 5.09625, + 5.0764 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 5.556649999999999, + 5.35845, + 5.327, + 5.42245, + 5.5105 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.00777071349278434, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5582, + "Misses": 93508, + "Active": false + }, + { + "Policy": 8, + "Hits": 5292, + "Misses": 93798, + "Active": false + }, + { + "Policy": 6, + "Hits": 4949, + "Misses": 94141, + "Active": false + }, + { + "Policy": 3, + "Hits": 4825, + "Misses": 94265, + "Active": false + }, + { + "Policy": 4, + "Hits": 4824, + "Misses": 94266, + "Active": false + }, + { + "Policy": 1, + "Hits": 4812, + "Misses": 94278, + "Active": true + }, + { + "Policy": 5, + "Hits": 4624, + "Misses": 94466, + "Active": false + }, + { + "Policy": 9, + "Hits": 4510, + "Misses": 94580, + "Active": false + }, + { + "Policy": 2, + "Hits": 4230, + "Misses": 94860, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.006584899969840151, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6025, + "Misses": 93445, + "Active": false + }, + { + "Policy": 8, + "Hits": 5856, + "Misses": 93614, + "Active": false + }, + { + "Policy": 6, + "Hits": 5464, + "Misses": 94006, + "Active": false + }, + { + "Policy": 4, + "Hits": 5400, + "Misses": 94070, + "Active": false + }, + { + "Policy": 3, + "Hits": 5398, + "Misses": 94072, + "Active": false + }, + { + "Policy": 1, + "Hits": 5370, + "Misses": 94100, + "Active": true + }, + { + "Policy": 5, + "Hits": 5250, + "Misses": 94220, + "Active": false + }, + { + "Policy": 9, + "Hits": 5107, + "Misses": 94363, + "Active": false + }, + { + "Policy": 2, + "Hits": 4735, + "Misses": 94735, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.005855152534230128, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5625, + "Misses": 94287, + "Active": false + }, + { + "Policy": 8, + "Hits": 5519, + "Misses": 94393, + "Active": false + }, + { + "Policy": 6, + "Hits": 5174, + "Misses": 94738, + "Active": false + }, + { + "Policy": 3, + "Hits": 5080, + "Misses": 94832, + "Active": false + }, + { + "Policy": 4, + "Hits": 5074, + "Misses": 94838, + "Active": false + }, + { + "Policy": 9, + "Hits": 5046, + "Misses": 94866, + "Active": false + }, + { + "Policy": 1, + "Hits": 5040, + "Misses": 94872, + "Active": true + }, + { + "Policy": 5, + "Hits": 4972, + "Misses": 94940, + "Active": false + }, + { + "Policy": 2, + "Hits": 4427, + "Misses": 95485, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004568578553615962, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6118, + "Misses": 94132, + "Active": false + }, + { + "Policy": 7, + "Hits": 5798, + "Misses": 94452, + "Active": false + }, + { + "Policy": 4, + "Hits": 5707, + "Misses": 94543, + "Active": false + }, + { + "Policy": 3, + "Hits": 5705, + "Misses": 94545, + "Active": false + }, + { + "Policy": 1, + "Hits": 5660, + "Misses": 94590, + "Active": true + }, + { + "Policy": 6, + "Hits": 5623, + "Misses": 94627, + "Active": false + }, + { + "Policy": 5, + "Hits": 5537, + "Misses": 94713, + "Active": false + }, + { + "Policy": 9, + "Hits": 5359, + "Misses": 94891, + "Active": false + }, + { + "Policy": 2, + "Hits": 5006, + "Misses": 95244, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007184598142811402, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6288, + "Misses": 93648, + "Active": false + }, + { + "Policy": 8, + "Hits": 6072, + "Misses": 93864, + "Active": false + }, + { + "Policy": 3, + "Hits": 5612, + "Misses": 94324, + "Active": false + }, + { + "Policy": 6, + "Hits": 5605, + "Misses": 94331, + "Active": false + }, + { + "Policy": 1, + "Hits": 5570, + "Misses": 94366, + "Active": true + }, + { + "Policy": 4, + "Hits": 5537, + "Misses": 94399, + "Active": false + }, + { + "Policy": 5, + "Hits": 5481, + "Misses": 94455, + "Active": false + }, + { + "Policy": 9, + "Hits": 5372, + "Misses": 94564, + "Active": false + }, + { + "Policy": 2, + "Hits": 4978, + "Misses": 94958, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 94547, + "sieve_hits": 94547, + "fifo_hits": 102774, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_src1_2", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1947636, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.7661 + ] + }, + "ARC": { + "runs": [ + 1.72685 + ] + }, + "LFU": { + "runs": [ + 1.4181 + ] + }, + "LRU": { + "runs": [ + 1.7021499999999998 + ] + }, + "Random": { + "runs": [ + 1.63565, + 1.6329500000000001, + 1.6311, + 1.6350500000000001, + 1.6331499999999999 + ] + }, + "S3-FIFO": { + "runs": [ + 1.7013500000000001 + ] + }, + "SIEVE": { + "runs": [ + 1.4181 + ] + }, + "TTL": { + "runs": [ + 1.7021499999999998 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.9726500000000001, + 1.18435, + 0.9742000000000001, + 1.2151, + 1.13585 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.7009, + 1.70095, + 1.701, + 1.2382499999999999, + 1.24335 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007117223681308779, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1633, + "Misses": 98125, + "Active": false + }, + { + "Policy": 4, + "Hits": 1595, + "Misses": 98163, + "Active": false + }, + { + "Policy": 1, + "Hits": 1562, + "Misses": 98196, + "Active": true + }, + { + "Policy": 6, + "Hits": 1562, + "Misses": 98196, + "Active": false + }, + { + "Policy": 8, + "Hits": 1560, + "Misses": 98198, + "Active": false + }, + { + "Policy": 5, + "Hits": 1507, + "Misses": 98251, + "Active": false + }, + { + "Policy": 9, + "Hits": 1453, + "Misses": 98305, + "Active": false + }, + { + "Policy": 2, + "Hits": 1303, + "Misses": 98455, + "Active": false + }, + { + "Policy": 7, + "Hits": 1219, + "Misses": 98539, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006504813562035888, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1758, + "Misses": 98168, + "Active": false + }, + { + "Policy": 4, + "Hits": 1718, + "Misses": 98208, + "Active": false + }, + { + "Policy": 1, + "Hits": 1693, + "Misses": 98233, + "Active": true + }, + { + "Policy": 6, + "Hits": 1692, + "Misses": 98234, + "Active": false + }, + { + "Policy": 8, + "Hits": 1691, + "Misses": 98235, + "Active": false + }, + { + "Policy": 5, + "Hits": 1640, + "Misses": 98286, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98466, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98466, + "Active": false + }, + { + "Policy": 7, + "Hits": 1010, + "Misses": 98916, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.000741743096276247, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1800, + "Misses": 97965, + "Active": false + }, + { + "Policy": 4, + "Hits": 1751, + "Misses": 98014, + "Active": false + }, + { + "Policy": 1, + "Hits": 1726, + "Misses": 98039, + "Active": true + }, + { + "Policy": 6, + "Hits": 1726, + "Misses": 98039, + "Active": false + }, + { + "Policy": 8, + "Hits": 1726, + "Misses": 98039, + "Active": false + }, + { + "Policy": 5, + "Hits": 1672, + "Misses": 98093, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98305, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98305, + "Active": false + }, + { + "Policy": 7, + "Hits": 1239, + "Misses": 98526, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006214666613207145, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1857, + "Misses": 97907, + "Active": false + }, + { + "Policy": 4, + "Hits": 1815, + "Misses": 97949, + "Active": false + }, + { + "Policy": 1, + "Hits": 1795, + "Misses": 97969, + "Active": true + }, + { + "Policy": 6, + "Hits": 1795, + "Misses": 97969, + "Active": false + }, + { + "Policy": 8, + "Hits": 1793, + "Misses": 97971, + "Active": false + }, + { + "Policy": 9, + "Hits": 1782, + "Misses": 97982, + "Active": false + }, + { + "Policy": 5, + "Hits": 1723, + "Misses": 98041, + "Active": false + }, + { + "Policy": 2, + "Hits": 1443, + "Misses": 98321, + "Active": false + }, + { + "Policy": 7, + "Hits": 1039, + "Misses": 98725, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006652302987579031, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1836, + "Misses": 98881, + "Active": false + }, + { + "Policy": 4, + "Hits": 1795, + "Misses": 98922, + "Active": false + }, + { + "Policy": 6, + "Hits": 1770, + "Misses": 98947, + "Active": false + }, + { + "Policy": 1, + "Hits": 1769, + "Misses": 98948, + "Active": true + }, + { + "Policy": 8, + "Hits": 1767, + "Misses": 98950, + "Active": false + }, + { + "Policy": 9, + "Hits": 1736, + "Misses": 98981, + "Active": false + }, + { + "Policy": 5, + "Hits": 1707, + "Misses": 99010, + "Active": false + }, + { + "Policy": 2, + "Hits": 1495, + "Misses": 99222, + "Active": false + }, + { + "Policy": 7, + "Hits": 1425, + "Misses": 99292, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 28362, + "sieve_hits": 28362, + "fifo_hits": 34051, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_usr_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1778953, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 3.5717499999999998 + ] + }, + "ARC": { + "runs": [ + 3.5526500000000003 + ] + }, + "LFU": { + "runs": [ + 1.4588 + ] + }, + "LRU": { + "runs": [ + 3.5715999999999997 + ] + }, + "Random": { + "runs": [ + 3.49265, + 3.49345, + 3.4869, + 3.49475, + 3.4889499999999996 + ] + }, + "S3-FIFO": { + "runs": [ + 3.5838 + ] + }, + "SIEVE": { + "runs": [ + 1.4588 + ] + }, + "TTL": { + "runs": [ + 3.5715999999999997 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.82335, + 2.8194500000000002, + 2.9994, + 2.85675, + 2.9017500000000003 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 3.5715999999999997, + 2.9993499999999997, + 3.5715999999999997, + 3.5715999999999997, + 2.9993499999999997 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 3.5228500000000005, + 3.5027000000000004, + 3.5027999999999997, + 3.5027000000000004, + 3.5027000000000004 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 3.4062, + 3.66315, + 3.5526500000000003, + 3.6554499999999996, + 3.6654 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0000701206074448027, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3346, + "Misses": 96482, + "Active": false + }, + { + "Policy": 1, + "Hits": 3339, + "Misses": 96489, + "Active": true + }, + { + "Policy": 6, + "Hits": 3333, + "Misses": 96495, + "Active": false + }, + { + "Policy": 3, + "Hits": 3313, + "Misses": 96515, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 96520, + "Active": false + }, + { + "Policy": 5, + "Hits": 3260, + "Misses": 96568, + "Active": false + }, + { + "Policy": 9, + "Hits": 2858, + "Misses": 96970, + "Active": false + }, + { + "Policy": 7, + "Hits": 2738, + "Misses": 97090, + "Active": false + }, + { + "Policy": 2, + "Hits": 1710, + "Misses": 98118, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.00006001140216640999, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3843, + "Misses": 96138, + "Active": false + }, + { + "Policy": 1, + "Hits": 3837, + "Misses": 96144, + "Active": true + }, + { + "Policy": 8, + "Hits": 3834, + "Misses": 96147, + "Active": false + }, + { + "Policy": 4, + "Hits": 3830, + "Misses": 96151, + "Active": false + }, + { + "Policy": 6, + "Hits": 3816, + "Misses": 96165, + "Active": false + }, + { + "Policy": 5, + "Hits": 3795, + "Misses": 96186, + "Active": false + }, + { + "Policy": 9, + "Hits": 3432, + "Misses": 96549, + "Active": false + }, + { + "Policy": 7, + "Hits": 3247, + "Misses": 96734, + "Active": false + }, + { + "Policy": 2, + "Hits": 1756, + "Misses": 98225, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000593030385268721, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3391, + "Misses": 96098, + "Active": false + }, + { + "Policy": 6, + "Hits": 3356, + "Misses": 96133, + "Active": false + }, + { + "Policy": 1, + "Hits": 3332, + "Misses": 96157, + "Active": true + }, + { + "Policy": 3, + "Hits": 3315, + "Misses": 96174, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 96181, + "Active": false + }, + { + "Policy": 5, + "Hits": 3272, + "Misses": 96217, + "Active": false + }, + { + "Policy": 9, + "Hits": 2978, + "Misses": 96511, + "Active": false + }, + { + "Policy": 7, + "Hits": 2706, + "Misses": 96783, + "Active": false + }, + { + "Policy": 2, + "Hits": 1727, + "Misses": 97762, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000240736654161737, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3444, + "Misses": 96250, + "Active": false + }, + { + "Policy": 3, + "Hits": 3439, + "Misses": 96255, + "Active": false + }, + { + "Policy": 1, + "Hits": 3420, + "Misses": 96274, + "Active": true + }, + { + "Policy": 6, + "Hits": 3417, + "Misses": 96277, + "Active": false + }, + { + "Policy": 4, + "Hits": 3401, + "Misses": 96293, + "Active": false + }, + { + "Policy": 5, + "Hits": 3345, + "Misses": 96349, + "Active": false + }, + { + "Policy": 9, + "Hits": 2890, + "Misses": 96804, + "Active": false + }, + { + "Policy": 7, + "Hits": 2272, + "Misses": 97422, + "Active": false + }, + { + "Policy": 2, + "Hits": 1761, + "Misses": 97933, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0002491851645120488, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3629, + "Misses": 96698, + "Active": false + }, + { + "Policy": 3, + "Hits": 3621, + "Misses": 96706, + "Active": false + }, + { + "Policy": 6, + "Hits": 3610, + "Misses": 96717, + "Active": false + }, + { + "Policy": 1, + "Hits": 3604, + "Misses": 96723, + "Active": true + }, + { + "Policy": 4, + "Hits": 3589, + "Misses": 96738, + "Active": false + }, + { + "Policy": 5, + "Hits": 3563, + "Misses": 96764, + "Active": false + }, + { + "Policy": 9, + "Hits": 3154, + "Misses": 97173, + "Active": false + }, + { + "Policy": 7, + "Hits": 2246, + "Misses": 98081, + "Active": false + }, + { + "Policy": 2, + "Hits": 1723, + "Misses": 98604, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 29176, + "sieve_hits": 29176, + "fifo_hits": 70272, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_web_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1855956, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 2.6100000000000003 + ] + }, + "ARC": { + "runs": [ + 2.6045 + ] + }, + "LFU": { + "runs": [ + 2.61025 + ] + }, + "LRU": { + "runs": [ + 2.2991 + ] + }, + "Random": { + "runs": [ + 2.5539, + 2.5578, + 2.56165, + 2.55125, + 2.5537 + ] + }, + "S3-FIFO": { + "runs": [ + 2.49225 + ] + }, + "SIEVE": { + "runs": [ + 2.61025 + ] + }, + "TTL": { + "runs": [ + 2.2991 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.32015, + 2.30665, + 2.2768, + 2.2866500000000003, + 2.25835 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 2.2207999999999997, + 2.3472, + 2.3472, + 2.2287999999999997, + 2.3472 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 2.4061, + 2.409, + 2.40785, + 2.4057, + 2.4084000000000003 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 2.4758999999999998, + 2.43825, + 2.45555, + 2.4688499999999998, + 2.4632500000000004 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0032381542520763147, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2953, + "Misses": 97104, + "Active": false + }, + { + "Policy": 4, + "Hits": 2950, + "Misses": 97107, + "Active": false + }, + { + "Policy": 2, + "Hits": 2949, + "Misses": 97108, + "Active": false + }, + { + "Policy": 9, + "Hits": 2949, + "Misses": 97108, + "Active": false + }, + { + "Policy": 5, + "Hits": 2886, + "Misses": 97171, + "Active": false + }, + { + "Policy": 8, + "Hits": 2863, + "Misses": 97194, + "Active": false + }, + { + "Policy": 7, + "Hits": 2741, + "Misses": 97316, + "Active": false + }, + { + "Policy": 1, + "Hits": 2629, + "Misses": 97428, + "Active": true + }, + { + "Policy": 6, + "Hits": 2621, + "Misses": 97436, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0032177724646343907, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2756, + "Misses": 97624, + "Active": false + }, + { + "Policy": 2, + "Hits": 2755, + "Misses": 97625, + "Active": false + }, + { + "Policy": 9, + "Hits": 2755, + "Misses": 97625, + "Active": false + }, + { + "Policy": 4, + "Hits": 2750, + "Misses": 97630, + "Active": false + }, + { + "Policy": 5, + "Hits": 2679, + "Misses": 97701, + "Active": false + }, + { + "Policy": 8, + "Hits": 2658, + "Misses": 97722, + "Active": false + }, + { + "Policy": 7, + "Hits": 2604, + "Misses": 97776, + "Active": false + }, + { + "Policy": 6, + "Hits": 2446, + "Misses": 97934, + "Active": false + }, + { + "Policy": 1, + "Hits": 2433, + "Misses": 97947, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0031756176476462478, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2751, + "Misses": 97387, + "Active": false + }, + { + "Policy": 2, + "Hits": 2749, + "Misses": 97389, + "Active": false + }, + { + "Policy": 9, + "Hits": 2749, + "Misses": 97389, + "Active": false + }, + { + "Policy": 4, + "Hits": 2747, + "Misses": 97391, + "Active": false + }, + { + "Policy": 5, + "Hits": 2695, + "Misses": 97443, + "Active": false + }, + { + "Policy": 8, + "Hits": 2635, + "Misses": 97503, + "Active": false + }, + { + "Policy": 7, + "Hits": 2526, + "Misses": 97612, + "Active": false + }, + { + "Policy": 1, + "Hits": 2433, + "Misses": 97705, + "Active": true + }, + { + "Policy": 6, + "Hits": 2429, + "Misses": 97709, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033801637235644257, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2901, + "Misses": 97390, + "Active": false + }, + { + "Policy": 4, + "Hits": 2898, + "Misses": 97393, + "Active": false + }, + { + "Policy": 2, + "Hits": 2895, + "Misses": 97396, + "Active": false + }, + { + "Policy": 9, + "Hits": 2895, + "Misses": 97396, + "Active": false + }, + { + "Policy": 5, + "Hits": 2792, + "Misses": 97499, + "Active": false + }, + { + "Policy": 8, + "Hits": 2790, + "Misses": 97501, + "Active": false + }, + { + "Policy": 7, + "Hits": 2642, + "Misses": 97649, + "Active": false + }, + { + "Policy": 1, + "Hits": 2562, + "Misses": 97729, + "Active": true + }, + { + "Policy": 6, + "Hits": 2562, + "Misses": 97729, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0030650346438769183, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3003, + "Misses": 97159, + "Active": false + }, + { + "Policy": 4, + "Hits": 3003, + "Misses": 97159, + "Active": false + }, + { + "Policy": 2, + "Hits": 3001, + "Misses": 97161, + "Active": false + }, + { + "Policy": 9, + "Hits": 3001, + "Misses": 97161, + "Active": false + }, + { + "Policy": 5, + "Hits": 2942, + "Misses": 97220, + "Active": false + }, + { + "Policy": 8, + "Hits": 2891, + "Misses": 97271, + "Active": false + }, + { + "Policy": 7, + "Hits": 2832, + "Misses": 97330, + "Active": false + }, + { + "Policy": 6, + "Hits": 2713, + "Misses": 97449, + "Active": false + }, + { + "Policy": 1, + "Hits": 2696, + "Misses": 97466, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 52205, + "sieve_hits": 52205, + "fifo_hits": 45560, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + } + ], + "tree_modified": false +} diff --git a/bench/results/current/traces-2-tuning.json b/bench/results/current/traces-2-tuning.json new file mode 100644 index 0000000..5125bd6 --- /dev/null +++ b/bench/results/current/traces-2-tuning.json @@ -0,0 +1,350 @@ +[ + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.3888, + 12.1608, + 11.7821, + 12.1843, + 11.90005 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 7.64755, + 7.745349999999999, + 7.4418999999999995, + 7.447900000000001, + 4.4357 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.55665, + 12.442, + 12.41465, + 12.4099, + 12.50165 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 7.9056, + 8.01325, + 7.939, + 8.11555, + 7.69625 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 13.532549999999999, + 13.286950000000001, + 11.138399999999999, + 13.2505, + 12.823699999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 8.9698, + 9.12365, + 7.352549999999999, + 10.2559, + 7.5563 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.47395, + 12.880249999999998, + 12.627849999999999, + 12.86435, + 12.6399 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.164200000000001, + 10.518650000000001, + 9.2827, + 9.29585, + 9.30455 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.1163, + 11.7712, + 11.863750000000001, + 8.778550000000001, + 3.7064500000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 8.85215, + 8.892999999999999, + 10.0299, + 10.3517, + 10.18615 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.0556, + 12.1357, + 8.5305, + 13.032850000000002, + 12.238449999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.2959, + 12.388150000000001, + 10.1663, + 10.179, + 10.692699999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + } +] diff --git a/bench/results/current/traces-2.json b/bench/results/current/traces-2.json new file mode 100644 index 0000000..cead2ea --- /dev/null +++ b/bench/results/current/traces-2.json @@ -0,0 +1,6933 @@ +{ + "bandit": "bandit.NewThompson(0.7, 13)", + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "cpus": 10, + "go": "go1.25.5", + "measured_at": "2026-10-07T00:00:58Z", + "platform": "darwin/arm64", + "runs": 5, + "settings": { + "epoch_mode": "requests", + "epochs_per_trace": [ + 10, + 20, + 50 + ], + "location": "adaptive[].settings and observe_only[].settings (actual constructor arguments)" + }, + "traces": [ + { + "trace": "twitter_cluster052.csv", + "source": "Twitter Twemcache production KV cache (OSDI '20)", + "requests": 1000000, + "distinct_keys": 255333, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 59.6242 + ] + }, + "ARC": { + "runs": [ + 58.9894 + ] + }, + "LFU": { + "runs": [ + 41.4436 + ] + }, + "LRU": { + "runs": [ + 58.391000000000005 + ] + }, + "Random": { + "runs": [ + 54.7808, + 54.8032, + 54.8122, + 54.7918, + 54.8243 + ] + }, + "S3-FIFO": { + "runs": [ + 59.7291 + ] + }, + "SIEVE": { + "runs": [ + 59.785 + ] + }, + "TTL": { + "runs": [ + 58.391000000000005 + ] + }, + "W-TinyLFU": { + "runs": [ + 58.7597, + 58.70530000000001, + 57.458, + 58.67289999999999, + 57.4372 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 59.0052, + 58.594500000000004, + 59.026999999999994, + 58.6843, + 58.6963 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 50000, + "hit_rate_percent": { + "runs": [ + 58.6107, + 58.7707, + 58.702799999999996, + 58.7948, + 58.805099999999996 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 20000, + "hit_rate_percent": { + "runs": [ + 58.269800000000004, + 57.923899999999996, + 57.9916, + 58.263200000000005, + 58.129799999999996 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 20000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02361059917270747, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29226, + "Misses": 19608, + "Active": false + }, + { + "Policy": 9, + "Hits": 28895, + "Misses": 19939, + "Active": false + }, + { + "Policy": 8, + "Hits": 28844, + "Misses": 19990, + "Active": false + }, + { + "Policy": 3, + "Hits": 28728, + "Misses": 20106, + "Active": false + }, + { + "Policy": 4, + "Hits": 28574, + "Misses": 20260, + "Active": false + }, + { + "Policy": 6, + "Hits": 28111, + "Misses": 20723, + "Active": false + }, + { + "Policy": 1, + "Hits": 28073, + "Misses": 20761, + "Active": true + }, + { + "Policy": 5, + "Hits": 26580, + "Misses": 22254, + "Active": false + }, + { + "Policy": 2, + "Hits": 22595, + "Misses": 26239, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.014898843642028314, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 30095, + "Misses": 19976, + "Active": false + }, + { + "Policy": 8, + "Hits": 29997, + "Misses": 20074, + "Active": false + }, + { + "Policy": 3, + "Hits": 29901, + "Misses": 20170, + "Active": false + }, + { + "Policy": 4, + "Hits": 29721, + "Misses": 20350, + "Active": false + }, + { + "Policy": 1, + "Hits": 29349, + "Misses": 20722, + "Active": true + }, + { + "Policy": 7, + "Hits": 29337, + "Misses": 20734, + "Active": false + }, + { + "Policy": 6, + "Hits": 29295, + "Misses": 20776, + "Active": false + }, + { + "Policy": 5, + "Hits": 27063, + "Misses": 23008, + "Active": false + }, + { + "Policy": 2, + "Hits": 23643, + "Misses": 26428, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.012787811939886984, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 38106, + "Misses": 19918, + "Active": false + }, + { + "Policy": 7, + "Hits": 38036, + "Misses": 19988, + "Active": false + }, + { + "Policy": 8, + "Hits": 37994, + "Misses": 20030, + "Active": false + }, + { + "Policy": 3, + "Hits": 37961, + "Misses": 20063, + "Active": false + }, + { + "Policy": 4, + "Hits": 37802, + "Misses": 20222, + "Active": false + }, + { + "Policy": 6, + "Hits": 37365, + "Misses": 20659, + "Active": false + }, + { + "Policy": 1, + "Hits": 37364, + "Misses": 20660, + "Active": true + }, + { + "Policy": 5, + "Hits": 35545, + "Misses": 22479, + "Active": false + }, + { + "Policy": 2, + "Hits": 31133, + "Misses": 26891, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.014563106796116498, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22393, + "Misses": 20043, + "Active": false + }, + { + "Policy": 9, + "Hits": 22385, + "Misses": 20051, + "Active": false + }, + { + "Policy": 3, + "Hits": 22316, + "Misses": 20120, + "Active": false + }, + { + "Policy": 8, + "Hits": 22214, + "Misses": 20222, + "Active": false + }, + { + "Policy": 4, + "Hits": 22034, + "Misses": 20402, + "Active": false + }, + { + "Policy": 6, + "Hits": 21839, + "Misses": 20597, + "Active": false + }, + { + "Policy": 1, + "Hits": 21775, + "Misses": 20661, + "Active": true + }, + { + "Policy": 5, + "Hits": 20342, + "Misses": 22094, + "Active": false + }, + { + "Policy": 2, + "Hits": 16030, + "Misses": 26406, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.017545990975355807, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 38096, + "Misses": 19524, + "Active": false + }, + { + "Policy": 9, + "Hits": 37751, + "Misses": 19869, + "Active": false + }, + { + "Policy": 3, + "Hits": 37688, + "Misses": 19932, + "Active": false + }, + { + "Policy": 8, + "Hits": 37617, + "Misses": 20003, + "Active": false + }, + { + "Policy": 4, + "Hits": 37539, + "Misses": 20081, + "Active": false + }, + { + "Policy": 6, + "Hits": 37139, + "Misses": 20481, + "Active": false + }, + { + "Policy": 1, + "Hits": 37085, + "Misses": 20535, + "Active": true + }, + { + "Policy": 5, + "Hits": 35370, + "Misses": 22250, + "Active": false + }, + { + "Policy": 2, + "Hits": 31420, + "Misses": 26200, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 414436, + "sieve_hits": 597850, + "fifo_hits": 555634, + "different_lfu_sieve_decisions": 216148, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_loop.trace", + "source": "LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02)", + "requests": 505500, + "distinct_keys": 1011, + "capacity": 500, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 0 + ] + }, + "ARC": { + "runs": [ + 0 + ] + }, + "LFU": { + "runs": [ + 0 + ] + }, + "LRU": { + "runs": [ + 0 + ] + }, + "Random": { + "runs": [ + 19.680909990108802, + 19.646290801186943, + 19.742433234421362, + 19.689020771513352, + 19.63580613254204 + ] + }, + "S3-FIFO": { + "runs": [ + 0 + ] + }, + "SIEVE": { + "runs": [ + 0 + ] + }, + "TTL": { + "runs": [ + 0 + ] + }, + "W-TinyLFU": { + "runs": [ + 50.725024727992086, + 49.256379821958454, + 52.865084075173094, + 49.1837784371909, + 49.16854599406528 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 50550, + "hit_rate_percent": { + "runs": [ + 68.77606330365974, + 72.9574678536103, + 57.54243323442137, + 67.19169139465876, + 41.80514342235411 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50550, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 25275, + "hit_rate_percent": { + "runs": [ + 42.86172106824926, + 44.66607319485657, + 43.07893175074184, + 41.99861523244313, + 42.791691394658756 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 10110, + "hit_rate_percent": { + "runs": [ + 41.88387734915925, + 43.60118694362018, + 45.69416419386746, + 44.27200791295747, + 41.87734915924827 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10110, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + } + ], + "effective_sample_rate": 0.128, + "observe_only": [ + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4585774647887324, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 32559, + "Misses": 38441, + "Active": false + }, + { + "Policy": 5, + "Hits": 10657, + "Misses": 60343, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 71000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 71000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.459390625, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29401, + "Misses": 34599, + "Active": false + }, + { + "Policy": 5, + "Hits": 12908, + "Misses": 51092, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 63968, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 64000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 64000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.41570422535211266, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29515, + "Misses": 41485, + "Active": false + }, + { + "Policy": 5, + "Hits": 10711, + "Misses": 60289, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 71000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 71000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.47114074074074075, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 31802, + "Misses": 35698, + "Active": false + }, + { + "Policy": 5, + "Hits": 11743, + "Misses": 55757, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 67500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 67500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4615114503816794, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30229, + "Misses": 35271, + "Active": false + }, + { + "Policy": 5, + "Hits": 12412, + "Misses": 53088, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 65500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 65500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 0, + "sieve_hits": 0, + "fifo_hits": 0, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_2_pools.trace", + "source": "LIRS 2_pools: two interleaved pools with different locality", + "requests": 100000, + "distinct_keys": 9939, + "capacity": 1000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 54.397 + ] + }, + "ARC": { + "runs": [ + 54.37499999999999 + ] + }, + "LFU": { + "runs": [ + 54.361000000000004 + ] + }, + "LRU": { + "runs": [ + 54.415 + ] + }, + "Random": { + "runs": [ + 50.044, + 49.773, + 49.958000000000006, + 49.922, + 49.922 + ] + }, + "S3-FIFO": { + "runs": [ + 54.37 + ] + }, + "SIEVE": { + "runs": [ + 54.361000000000004 + ] + }, + "TTL": { + "runs": [ + 54.415 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.778999999999996, + 54.979, + 54.655, + 54.842999999999996, + 55.858 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 10000, + "hit_rate_percent": { + "runs": [ + 54.403, + 54.388999999999996, + 54.413999999999994, + 54.381, + 54.401999999999994 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 5000, + "hit_rate_percent": { + "runs": [ + 54.413999999999994, + 54.399, + 54.225, + 54.416, + 54.400000000000006 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 2000, + "hit_rate_percent": { + "runs": [ + 54.248, + 54.242000000000004, + 54.181000000000004, + 54.221, + 54.278000000000006 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 2000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + } + ], + "effective_sample_rate": 0.064, + "observe_only": [ + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0019292604501607302, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 4795, + "Misses": 2980, + "Active": false + }, + { + "Policy": 2, + "Hits": 4788, + "Misses": 2987, + "Active": false + }, + { + "Policy": 9, + "Hits": 4786, + "Misses": 2989, + "Active": false + }, + { + "Policy": 1, + "Hits": 4780, + "Misses": 2995, + "Active": true + }, + { + "Policy": 6, + "Hits": 4766, + "Misses": 3009, + "Active": false + }, + { + "Policy": 8, + "Hits": 4762, + "Misses": 3013, + "Active": false + }, + { + "Policy": 4, + "Hits": 4760, + "Misses": 3015, + "Active": false + }, + { + "Policy": 3, + "Hits": 4747, + "Misses": 3028, + "Active": false + }, + { + "Policy": 5, + "Hits": 4378, + "Misses": 3397, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 4855, + "Misses": 3054, + "Active": true + }, + { + "Policy": 8, + "Hits": 4835, + "Misses": 3074, + "Active": false + }, + { + "Policy": 3, + "Hits": 4833, + "Misses": 3076, + "Active": false + }, + { + "Policy": 9, + "Hits": 4831, + "Misses": 3078, + "Active": false + }, + { + "Policy": 2, + "Hits": 4827, + "Misses": 3082, + "Active": false + }, + { + "Policy": 7, + "Hits": 4820, + "Misses": 3089, + "Active": false + }, + { + "Policy": 6, + "Hits": 4819, + "Misses": 3090, + "Active": false + }, + { + "Policy": 4, + "Hits": 4814, + "Misses": 3095, + "Active": false + }, + { + "Policy": 5, + "Hits": 4400, + "Misses": 3509, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.013822796283707195, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 1748, + "Misses": 2665, + "Active": false + }, + { + "Policy": 8, + "Hits": 1746, + "Misses": 2667, + "Active": false + }, + { + "Policy": 2, + "Hits": 1741, + "Misses": 2672, + "Active": false + }, + { + "Policy": 3, + "Hits": 1739, + "Misses": 2674, + "Active": false + }, + { + "Policy": 4, + "Hits": 1739, + "Misses": 2674, + "Active": false + }, + { + "Policy": 9, + "Hits": 1737, + "Misses": 2676, + "Active": false + }, + { + "Policy": 6, + "Hits": 1732, + "Misses": 2681, + "Active": false + }, + { + "Policy": 1, + "Hits": 1687, + "Misses": 2726, + "Active": true + }, + { + "Policy": 5, + "Hits": 1604, + "Misses": 2809, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 6, + "Improvement": 0.0005015045135405849, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 6, + "Hits": 5230, + "Misses": 2746, + "Active": false + }, + { + "Policy": 7, + "Hits": 5230, + "Misses": 2746, + "Active": false + }, + { + "Policy": 1, + "Hits": 5226, + "Misses": 2750, + "Active": true + }, + { + "Policy": 3, + "Hits": 5219, + "Misses": 2757, + "Active": false + }, + { + "Policy": 4, + "Hits": 5216, + "Misses": 2760, + "Active": false + }, + { + "Policy": 2, + "Hits": 5211, + "Misses": 2765, + "Active": false + }, + { + "Policy": 9, + "Hits": 5211, + "Misses": 2765, + "Active": false + }, + { + "Policy": 8, + "Hits": 5197, + "Misses": 2779, + "Active": false + }, + { + "Policy": 5, + "Hits": 4806, + "Misses": 3170, + "Active": false + } + ] + }, + "best_policy_name": "TTL", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0017136625642624193, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 3363, + "Misses": 3056, + "Active": false + }, + { + "Policy": 1, + "Hits": 3352, + "Misses": 3067, + "Active": true + }, + { + "Policy": 4, + "Hits": 3338, + "Misses": 3081, + "Active": false + }, + { + "Policy": 6, + "Hits": 3338, + "Misses": 3081, + "Active": false + }, + { + "Policy": 3, + "Hits": 3335, + "Misses": 3084, + "Active": false + }, + { + "Policy": 8, + "Hits": 3335, + "Misses": 3084, + "Active": false + }, + { + "Policy": 2, + "Hits": 3325, + "Misses": 3094, + "Active": false + }, + { + "Policy": 9, + "Hits": 3322, + "Misses": 3097, + "Active": false + }, + { + "Policy": 5, + "Hits": 3100, + "Misses": 3319, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 54361, + "sieve_hits": 54361, + "fifo_hits": 49957, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_p3", + "source": "ARC paper P3 workstation trace (FAST '03)", + "requests": 2000000, + "distinct_keys": 426527, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 7.74445 + ] + }, + "ARC": { + "runs": [ + 10.25295 + ] + }, + "LFU": { + "runs": [ + 4.8162 + ] + }, + "LRU": { + "runs": [ + 1.8679500000000002 + ] + }, + "Random": { + "runs": [ + 3.0764, + 3.0781, + 3.0805, + 3.07945, + 3.082 + ] + }, + "S3-FIFO": { + "runs": [ + 10.75245 + ] + }, + "SIEVE": { + "runs": [ + 4.8162 + ] + }, + "TTL": { + "runs": [ + 1.8679500000000002 + ] + }, + "W-TinyLFU": { + "runs": [ + 11.52, + 12.33145, + 12.1054, + 12.095799999999999, + 12.3031 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 11.97455, + 12.52825, + 12.5963, + 12.57915, + 12.4438 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.926099999999998, + 13.1112, + 12.902, + 12.84535, + 13.09695 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.3863, + 12.5047, + 12.81245, + 12.28115, + 12.4156 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11654723255998099, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13544, + "Misses": 87488, + "Active": false + }, + { + "Policy": 8, + "Hits": 11168, + "Misses": 89864, + "Active": false + }, + { + "Policy": 4, + "Hits": 10761, + "Misses": 90271, + "Active": false + }, + { + "Policy": 3, + "Hits": 6990, + "Misses": 94042, + "Active": false + }, + { + "Policy": 2, + "Hits": 4562, + "Misses": 96470, + "Active": false + }, + { + "Policy": 9, + "Hits": 4562, + "Misses": 96470, + "Active": false + }, + { + "Policy": 5, + "Hits": 2928, + "Misses": 98104, + "Active": false + }, + { + "Policy": 1, + "Hits": 1769, + "Misses": 99263, + "Active": true + }, + { + "Policy": 6, + "Hits": 1672, + "Misses": 99360, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10269260423462429, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12327, + "Misses": 88839, + "Active": false + }, + { + "Policy": 8, + "Hits": 10767, + "Misses": 90399, + "Active": false + }, + { + "Policy": 4, + "Hits": 10352, + "Misses": 90814, + "Active": false + }, + { + "Policy": 3, + "Hits": 7530, + "Misses": 93636, + "Active": false + }, + { + "Policy": 2, + "Hits": 4809, + "Misses": 96357, + "Active": false + }, + { + "Policy": 9, + "Hits": 4809, + "Misses": 96357, + "Active": false + }, + { + "Policy": 5, + "Hits": 3092, + "Misses": 98074, + "Active": false + }, + { + "Policy": 1, + "Hits": 1938, + "Misses": 99228, + "Active": true + }, + { + "Policy": 6, + "Hits": 1877, + "Misses": 99289, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11724408104225889, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13577, + "Misses": 85976, + "Active": false + }, + { + "Policy": 8, + "Hits": 10322, + "Misses": 89231, + "Active": false + }, + { + "Policy": 4, + "Hits": 10004, + "Misses": 89549, + "Active": false + }, + { + "Policy": 3, + "Hits": 7356, + "Misses": 92197, + "Active": false + }, + { + "Policy": 2, + "Hits": 4682, + "Misses": 94871, + "Active": false + }, + { + "Policy": 9, + "Hits": 4682, + "Misses": 94871, + "Active": false + }, + { + "Policy": 5, + "Hits": 3055, + "Misses": 96498, + "Active": false + }, + { + "Policy": 1, + "Hits": 1905, + "Misses": 97648, + "Active": true + }, + { + "Policy": 6, + "Hits": 1841, + "Misses": 97712, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10934889009739457, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12834, + "Misses": 88301, + "Active": false + }, + { + "Policy": 8, + "Hits": 11060, + "Misses": 90075, + "Active": false + }, + { + "Policy": 4, + "Hits": 10633, + "Misses": 90502, + "Active": false + }, + { + "Policy": 3, + "Hits": 7050, + "Misses": 94085, + "Active": false + }, + { + "Policy": 2, + "Hits": 4932, + "Misses": 96203, + "Active": false + }, + { + "Policy": 9, + "Hits": 4932, + "Misses": 96203, + "Active": false + }, + { + "Policy": 5, + "Hits": 2960, + "Misses": 98175, + "Active": false + }, + { + "Policy": 1, + "Hits": 1775, + "Misses": 99360, + "Active": true + }, + { + "Policy": 6, + "Hits": 1703, + "Misses": 99432, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11216997812340795, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13242, + "Misses": 86865, + "Active": false + }, + { + "Policy": 8, + "Hits": 10665, + "Misses": 89442, + "Active": false + }, + { + "Policy": 4, + "Hits": 10500, + "Misses": 89607, + "Active": false + }, + { + "Policy": 3, + "Hits": 7774, + "Misses": 92333, + "Active": false + }, + { + "Policy": 2, + "Hits": 4955, + "Misses": 95152, + "Active": false + }, + { + "Policy": 9, + "Hits": 4955, + "Misses": 95152, + "Active": false + }, + { + "Policy": 5, + "Hits": 3292, + "Misses": 96815, + "Active": false + }, + { + "Policy": 6, + "Hits": 2015, + "Misses": 98092, + "Active": false + }, + { + "Policy": 1, + "Hits": 2013, + "Misses": 98094, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 96324, + "sieve_hits": 96324, + "fifo_hits": 38093, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_oltp", + "source": "ARC paper OLTP database trace (FAST '03)", + "requests": 914145, + "distinct_keys": 186880, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.25427038380126 + ] + }, + "ARC": { + "runs": [ + 67.8008412232195 + ] + }, + "LFU": { + "runs": [ + 45.426053853600905 + ] + }, + "LRU": { + "runs": [ + 67.0592739663839 + ] + }, + "Random": { + "runs": [ + 62.973160713015986, + 63.01090089646609, + 63.03398257388051, + 62.98399050478862, + 63.02216825558309 + ] + }, + "S3-FIFO": { + "runs": [ + 67.79460588856253 + ] + }, + "SIEVE": { + "runs": [ + 67.717484644121 + ] + }, + "TTL": { + "runs": [ + 67.0592739663839 + ] + }, + "W-TinyLFU": { + "runs": [ + 63.20124269125795, + 63.09699227146678, + 63.17498865059701, + 63.13407610390036, + 62.949532076421136 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 91414, + "hit_rate_percent": { + "runs": [ + 67.46030443747983, + 67.51259373512954, + 67.46030443747983, + 67.64123853436817, + 67.3695092135274 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 91414, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 45707, + "hit_rate_percent": { + "runs": [ + 66.80767274338316, + 66.67563679722582, + 66.87680838379032, + 66.93828659567137, + 66.90164033058213 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 18282, + "hit_rate_percent": { + "runs": [ + 66.08918716396195, + 66.14082011059514, + 65.91383205071406, + 66.21739439585623, + 65.85858917348997 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 18282, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010168655888576184, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 34061, + "Misses": 14618, + "Active": false + }, + { + "Policy": 4, + "Hits": 33955, + "Misses": 14724, + "Active": false + }, + { + "Policy": 9, + "Hits": 33820, + "Misses": 14859, + "Active": false + }, + { + "Policy": 8, + "Hits": 33748, + "Misses": 14931, + "Active": false + }, + { + "Policy": 1, + "Hits": 33566, + "Misses": 15113, + "Active": true + }, + { + "Policy": 6, + "Hits": 33510, + "Misses": 15169, + "Active": false + }, + { + "Policy": 7, + "Hits": 31838, + "Misses": 16841, + "Active": false + }, + { + "Policy": 5, + "Hits": 31734, + "Misses": 16945, + "Active": false + }, + { + "Policy": 2, + "Hits": 27538, + "Misses": 21141, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.012740803541990586, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 28085, + "Misses": 14377, + "Active": false + }, + { + "Policy": 4, + "Hits": 28033, + "Misses": 14429, + "Active": false + }, + { + "Policy": 8, + "Hits": 27872, + "Misses": 14590, + "Active": false + }, + { + "Policy": 9, + "Hits": 27765, + "Misses": 14697, + "Active": false + }, + { + "Policy": 6, + "Hits": 27585, + "Misses": 14877, + "Active": false + }, + { + "Policy": 1, + "Hits": 27544, + "Misses": 14918, + "Active": true + }, + { + "Policy": 5, + "Hits": 25804, + "Misses": 16658, + "Active": false + }, + { + "Policy": 7, + "Hits": 25709, + "Misses": 16753, + "Active": false + }, + { + "Policy": 2, + "Hits": 21294, + "Misses": 21168, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.012099305209844036, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 31546, + "Misses": 14655, + "Active": false + }, + { + "Policy": 4, + "Hits": 31433, + "Misses": 14768, + "Active": false + }, + { + "Policy": 9, + "Hits": 31392, + "Misses": 14809, + "Active": false + }, + { + "Policy": 8, + "Hits": 31383, + "Misses": 14818, + "Active": false + }, + { + "Policy": 1, + "Hits": 30987, + "Misses": 15214, + "Active": true + }, + { + "Policy": 6, + "Hits": 30953, + "Misses": 15248, + "Active": false + }, + { + "Policy": 7, + "Hits": 29348, + "Misses": 16853, + "Active": false + }, + { + "Policy": 5, + "Hits": 29101, + "Misses": 17100, + "Active": false + }, + { + "Policy": 2, + "Hits": 26001, + "Misses": 20200, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 4, + "Improvement": 0.011801695069716622, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 4, + "Hits": 29546, + "Misses": 14346, + "Active": false + }, + { + "Policy": 3, + "Hits": 29542, + "Misses": 14350, + "Active": false + }, + { + "Policy": 9, + "Hits": 29379, + "Misses": 14513, + "Active": false + }, + { + "Policy": 8, + "Hits": 29287, + "Misses": 14605, + "Active": false + }, + { + "Policy": 6, + "Hits": 29067, + "Misses": 14825, + "Active": false + }, + { + "Policy": 1, + "Hits": 29028, + "Misses": 14864, + "Active": true + }, + { + "Policy": 5, + "Hits": 27268, + "Misses": 16624, + "Active": false + }, + { + "Policy": 7, + "Hits": 27157, + "Misses": 16735, + "Active": false + }, + { + "Policy": 2, + "Hits": 22951, + "Misses": 20941, + "Active": false + } + ] + }, + "best_policy_name": "ARC", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011101412296604662, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 29913, + "Misses": 14766, + "Active": false + }, + { + "Policy": 4, + "Hits": 29754, + "Misses": 14925, + "Active": false + }, + { + "Policy": 9, + "Hits": 29732, + "Misses": 14947, + "Active": false + }, + { + "Policy": 8, + "Hits": 29617, + "Misses": 15062, + "Active": false + }, + { + "Policy": 1, + "Hits": 29417, + "Misses": 15262, + "Active": true + }, + { + "Policy": 6, + "Hits": 29392, + "Misses": 15287, + "Active": false + }, + { + "Policy": 5, + "Hits": 27600, + "Misses": 17079, + "Active": false + }, + { + "Policy": 7, + "Hits": 27554, + "Misses": 17125, + "Active": false + }, + { + "Policy": 2, + "Hits": 22290, + "Misses": 22389, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 415260, + "sieve_hits": 619036, + "fifo_hits": 584567, + "different_lfu_sieve_decisions": 230770, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "meta_kvcache_202206_1", + "source": "Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206)", + "requests": 2000000, + "distinct_keys": 340723, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.15679999999999 + ] + }, + "ARC": { + "runs": [ + 68.2667 + ] + }, + "LFU": { + "runs": [ + 66.86565 + ] + }, + "LRU": { + "runs": [ + 66.389 + ] + }, + "Random": { + "runs": [ + 65.1881, + 65.18975, + 65.19185, + 65.17885, + 65.1854 + ] + }, + "S3-FIFO": { + "runs": [ + 69.05425 + ] + }, + "SIEVE": { + "runs": [ + 68.92399999999999 + ] + }, + "TTL": { + "runs": [ + 66.389 + ] + }, + "W-TinyLFU": { + "runs": [ + 68.6025, + 68.72475, + 68.5674, + 68.71095, + 68.6626 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 68.1095, + 67.90565, + 68.16990000000001, + 67.7405, + 68.15679999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 67.42045, + 67.60000000000001, + 67.62559999999999, + 67.7093, + 67.4365 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 66.74195, + 66.92845, + 66.89580000000001, + 66.8997, + 66.91709999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03607656119095182, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 46800, + "Misses": 30785, + "Active": false + }, + { + "Policy": 8, + "Hits": 46446, + "Misses": 31139, + "Active": false + }, + { + "Policy": 9, + "Hits": 46274, + "Misses": 31311, + "Active": false + }, + { + "Policy": 3, + "Hits": 45669, + "Misses": 31916, + "Active": false + }, + { + "Policy": 4, + "Hits": 45632, + "Misses": 31953, + "Active": false + }, + { + "Policy": 2, + "Hits": 45389, + "Misses": 32196, + "Active": false + }, + { + "Policy": 6, + "Hits": 44079, + "Misses": 33506, + "Active": false + }, + { + "Policy": 1, + "Hits": 44001, + "Misses": 33584, + "Active": true + }, + { + "Policy": 5, + "Hits": 42860, + "Misses": 34725, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02853076563855106, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 58985, + "Misses": 30953, + "Active": false + }, + { + "Policy": 8, + "Hits": 58880, + "Misses": 31058, + "Active": false + }, + { + "Policy": 9, + "Hits": 58790, + "Misses": 31148, + "Active": false + }, + { + "Policy": 4, + "Hits": 58159, + "Misses": 31779, + "Active": false + }, + { + "Policy": 3, + "Hits": 58155, + "Misses": 31783, + "Active": false + }, + { + "Policy": 2, + "Hits": 57818, + "Misses": 32120, + "Active": false + }, + { + "Policy": 6, + "Hits": 56508, + "Misses": 33430, + "Active": false + }, + { + "Policy": 1, + "Hits": 56419, + "Misses": 33519, + "Active": true + }, + { + "Policy": 5, + "Hits": 55227, + "Misses": 34711, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.04042190862166839, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 45006, + "Misses": 30745, + "Active": false + }, + { + "Policy": 8, + "Hits": 44597, + "Misses": 31154, + "Active": false + }, + { + "Policy": 9, + "Hits": 44572, + "Misses": 31179, + "Active": false + }, + { + "Policy": 4, + "Hits": 43822, + "Misses": 31929, + "Active": false + }, + { + "Policy": 3, + "Hits": 43740, + "Misses": 32011, + "Active": false + }, + { + "Policy": 2, + "Hits": 43441, + "Misses": 32310, + "Active": false + }, + { + "Policy": 6, + "Hits": 41993, + "Misses": 33758, + "Active": false + }, + { + "Policy": 1, + "Hits": 41944, + "Misses": 33807, + "Active": true + }, + { + "Policy": 5, + "Hits": 40806, + "Misses": 34945, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.040767116441779105, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 49537, + "Misses": 30503, + "Active": false + }, + { + "Policy": 8, + "Hits": 49068, + "Misses": 30972, + "Active": false + }, + { + "Policy": 9, + "Hits": 48855, + "Misses": 31185, + "Active": false + }, + { + "Policy": 4, + "Hits": 48202, + "Misses": 31838, + "Active": false + }, + { + "Policy": 2, + "Hits": 48178, + "Misses": 31862, + "Active": false + }, + { + "Policy": 3, + "Hits": 48127, + "Misses": 31913, + "Active": false + }, + { + "Policy": 6, + "Hits": 46276, + "Misses": 33764, + "Active": false + }, + { + "Policy": 1, + "Hits": 46274, + "Misses": 33766, + "Active": true + }, + { + "Policy": 5, + "Hits": 44981, + "Misses": 35059, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03415345845215201, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 59964, + "Misses": 30510, + "Active": false + }, + { + "Policy": 8, + "Hits": 59474, + "Misses": 31000, + "Active": false + }, + { + "Policy": 9, + "Hits": 59418, + "Misses": 31056, + "Active": false + }, + { + "Policy": 4, + "Hits": 58796, + "Misses": 31678, + "Active": false + }, + { + "Policy": 3, + "Hits": 58785, + "Misses": 31689, + "Active": false + }, + { + "Policy": 2, + "Hits": 58676, + "Misses": 31798, + "Active": false + }, + { + "Policy": 6, + "Hits": 56956, + "Misses": 33518, + "Active": false + }, + { + "Policy": 1, + "Hits": 56874, + "Misses": 33600, + "Active": true + }, + { + "Policy": 5, + "Hits": 55648, + "Misses": 34826, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 1337313, + "sieve_hits": 1378480, + "fifo_hits": 1313815, + "different_lfu_sieve_decisions": 130305, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_hm_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 818034, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 17.0071 + ] + }, + "ARC": { + "runs": [ + 16.64985 + ] + }, + "LFU": { + "runs": [ + 14.9886 + ] + }, + "LRU": { + "runs": [ + 11.397350000000001 + ] + }, + "Random": { + "runs": [ + 12.61825, + 12.614700000000001, + 12.62325, + 12.631899999999998, + 12.6268 + ] + }, + "S3-FIFO": { + "runs": [ + 15.8427 + ] + }, + "SIEVE": { + "runs": [ + 15.187249999999999 + ] + }, + "TTL": { + "runs": [ + 11.397350000000001 + ] + }, + "W-TinyLFU": { + "runs": [ + 15.81715, + 15.9939, + 16.1886, + 16.10725, + 16.0112 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 15.511849999999999, + 15.472549999999998, + 15.38375, + 14.329, + 14.493400000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.74305, + 12.423399999999999, + 12.882850000000001, + 13.48805, + 13.713000000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 14.657899999999998, + 13.483149999999998, + 16.0838, + 14.60435, + 15.8362 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05434178042759144, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 19060, + "Misses": 83421, + "Active": false + }, + { + "Policy": 4, + "Hits": 18737, + "Misses": 83744, + "Active": false + }, + { + "Policy": 7, + "Hits": 18103, + "Misses": 84378, + "Active": false + }, + { + "Policy": 8, + "Hits": 18043, + "Misses": 84438, + "Active": false + }, + { + "Policy": 2, + "Hits": 17475, + "Misses": 85006, + "Active": false + }, + { + "Policy": 9, + "Hits": 16308, + "Misses": 86173, + "Active": false + }, + { + "Policy": 5, + "Hits": 14648, + "Misses": 87833, + "Active": false + }, + { + "Policy": 6, + "Hits": 13496, + "Misses": 88985, + "Active": false + }, + { + "Policy": 1, + "Hits": 13491, + "Misses": 88990, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05686675898609188, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 17519, + "Misses": 82135, + "Active": false + }, + { + "Policy": 3, + "Hits": 17141, + "Misses": 82513, + "Active": false + }, + { + "Policy": 4, + "Hits": 16956, + "Misses": 82698, + "Active": false + }, + { + "Policy": 8, + "Hits": 16320, + "Misses": 83334, + "Active": false + }, + { + "Policy": 2, + "Hits": 15690, + "Misses": 83964, + "Active": false + }, + { + "Policy": 9, + "Hits": 14339, + "Misses": 85315, + "Active": false + }, + { + "Policy": 5, + "Hits": 13119, + "Misses": 86535, + "Active": false + }, + { + "Policy": 6, + "Hits": 11894, + "Misses": 87760, + "Active": false + }, + { + "Policy": 1, + "Hits": 11852, + "Misses": 87802, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.054319628959987404, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 18589, + "Misses": 83179, + "Active": false + }, + { + "Policy": 3, + "Hits": 18523, + "Misses": 83245, + "Active": false + }, + { + "Policy": 4, + "Hits": 18293, + "Misses": 83475, + "Active": false + }, + { + "Policy": 8, + "Hits": 17578, + "Misses": 84190, + "Active": false + }, + { + "Policy": 2, + "Hits": 16505, + "Misses": 85263, + "Active": false + }, + { + "Policy": 9, + "Hits": 15358, + "Misses": 86410, + "Active": false + }, + { + "Policy": 5, + "Hits": 14244, + "Misses": 87524, + "Active": false + }, + { + "Policy": 1, + "Hits": 13061, + "Misses": 88707, + "Active": true + }, + { + "Policy": 6, + "Hits": 13014, + "Misses": 88754, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05747680319885168, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 15625, + "Misses": 81910, + "Active": false + }, + { + "Policy": 3, + "Hits": 15536, + "Misses": 81999, + "Active": false + }, + { + "Policy": 4, + "Hits": 15183, + "Misses": 82352, + "Active": false + }, + { + "Policy": 8, + "Hits": 14332, + "Misses": 83203, + "Active": false + }, + { + "Policy": 2, + "Hits": 13758, + "Misses": 83777, + "Active": false + }, + { + "Policy": 9, + "Hits": 12412, + "Misses": 85123, + "Active": false + }, + { + "Policy": 5, + "Hits": 11427, + "Misses": 86108, + "Active": false + }, + { + "Policy": 6, + "Hits": 10047, + "Misses": 87488, + "Active": false + }, + { + "Policy": 1, + "Hits": 10019, + "Misses": 87516, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.056161501163889946, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 14755, + "Misses": 83622, + "Active": false + }, + { + "Policy": 4, + "Hits": 14351, + "Misses": 84026, + "Active": false + }, + { + "Policy": 7, + "Hits": 13787, + "Misses": 84590, + "Active": false + }, + { + "Policy": 8, + "Hits": 13392, + "Misses": 84985, + "Active": false + }, + { + "Policy": 2, + "Hits": 12969, + "Misses": 85408, + "Active": false + }, + { + "Policy": 9, + "Hits": 11445, + "Misses": 86932, + "Active": false + }, + { + "Policy": 5, + "Hits": 10271, + "Misses": 88106, + "Active": false + }, + { + "Policy": 6, + "Hits": 9231, + "Misses": 89146, + "Active": false + }, + { + "Policy": 1, + "Hits": 9230, + "Misses": 89147, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 299772, + "sieve_hits": 303745, + "fifo_hits": 228175, + "different_lfu_sieve_decisions": 34189, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_prn_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1900653, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.03775 + ] + }, + "ARC": { + "runs": [ + 1.02225 + ] + }, + "LFU": { + "runs": [ + 1.05595 + ] + }, + "LRU": { + "runs": [ + 1.0038 + ] + }, + "Random": { + "runs": [ + 0.9440000000000001, + 0.9433, + 0.9499000000000001, + 0.9442, + 0.9436 + ] + }, + "S3-FIFO": { + "runs": [ + 1.008 + ] + }, + "SIEVE": { + "runs": [ + 1.05595 + ] + }, + "TTL": { + "runs": [ + 1.0038 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.7935, + 0.92935, + 0.73585, + 0.7497, + 0.7593 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 0.8697999999999999, + 0.84025, + 0.86825, + 0.86475, + 0.8686499999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 0.8369, + 0.7254499999999999, + 0.7307, + 0.72275, + 0.71085 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.0852499999999998, + 1.0545, + 1.04605, + 0.9756499999999999, + 1.0381 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000582955584815012, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1193, + "Misses": 98300, + "Active": false + }, + { + "Policy": 9, + "Hits": 1193, + "Misses": 98300, + "Active": false + }, + { + "Policy": 3, + "Hits": 1185, + "Misses": 98308, + "Active": false + }, + { + "Policy": 4, + "Hits": 1177, + "Misses": 98316, + "Active": false + }, + { + "Policy": 8, + "Hits": 1137, + "Misses": 98356, + "Active": false + }, + { + "Policy": 1, + "Hits": 1135, + "Misses": 98358, + "Active": true + }, + { + "Policy": 6, + "Hits": 1131, + "Misses": 98362, + "Active": false + }, + { + "Policy": 5, + "Hits": 1076, + "Misses": 98417, + "Active": false + }, + { + "Policy": 7, + "Hits": 781, + "Misses": 98712, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00038844621513944334, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1019, + "Misses": 99381, + "Active": false + }, + { + "Policy": 9, + "Hits": 1019, + "Misses": 99381, + "Active": false + }, + { + "Policy": 4, + "Hits": 1006, + "Misses": 99394, + "Active": false + }, + { + "Policy": 3, + "Hits": 991, + "Misses": 99409, + "Active": false + }, + { + "Policy": 8, + "Hits": 984, + "Misses": 99416, + "Active": false + }, + { + "Policy": 1, + "Hits": 980, + "Misses": 99420, + "Active": true + }, + { + "Policy": 6, + "Hits": 979, + "Misses": 99421, + "Active": false + }, + { + "Policy": 5, + "Hits": 936, + "Misses": 99464, + "Active": false + }, + { + "Policy": 7, + "Hits": 731, + "Misses": 99669, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00038947032036430393, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1008, + "Misses": 99128, + "Active": false + }, + { + "Policy": 9, + "Hits": 1008, + "Misses": 99128, + "Active": false + }, + { + "Policy": 3, + "Hits": 1004, + "Misses": 99132, + "Active": false + }, + { + "Policy": 4, + "Hits": 995, + "Misses": 99141, + "Active": false + }, + { + "Policy": 8, + "Hits": 983, + "Misses": 99153, + "Active": false + }, + { + "Policy": 6, + "Hits": 971, + "Misses": 99165, + "Active": false + }, + { + "Policy": 1, + "Hits": 969, + "Misses": 99167, + "Active": true + }, + { + "Policy": 5, + "Hits": 914, + "Misses": 99222, + "Active": false + }, + { + "Policy": 7, + "Hits": 609, + "Misses": 99527, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005915439296564039, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1089, + "Misses": 98650, + "Active": false + }, + { + "Policy": 9, + "Hits": 1089, + "Misses": 98650, + "Active": false + }, + { + "Policy": 3, + "Hits": 1078, + "Misses": 98661, + "Active": false + }, + { + "Policy": 4, + "Hits": 1054, + "Misses": 98685, + "Active": false + }, + { + "Policy": 8, + "Hits": 1036, + "Misses": 98703, + "Active": false + }, + { + "Policy": 6, + "Hits": 1033, + "Misses": 98706, + "Active": false + }, + { + "Policy": 1, + "Hits": 1030, + "Misses": 98709, + "Active": true + }, + { + "Policy": 5, + "Hits": 964, + "Misses": 98775, + "Active": false + }, + { + "Policy": 7, + "Hits": 761, + "Misses": 98978, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004905690601097277, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 861, + "Misses": 99023, + "Active": false + }, + { + "Policy": 9, + "Hits": 861, + "Misses": 99023, + "Active": false + }, + { + "Policy": 3, + "Hits": 853, + "Misses": 99031, + "Active": false + }, + { + "Policy": 4, + "Hits": 835, + "Misses": 99049, + "Active": false + }, + { + "Policy": 8, + "Hits": 816, + "Misses": 99068, + "Active": false + }, + { + "Policy": 1, + "Hits": 812, + "Misses": 99072, + "Active": true + }, + { + "Policy": 6, + "Hits": 812, + "Misses": 99072, + "Active": false + }, + { + "Policy": 5, + "Hits": 764, + "Misses": 99120, + "Active": false + }, + { + "Policy": 7, + "Hits": 543, + "Misses": 99341, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 21119, + "sieve_hits": 21119, + "fifo_hits": 20052, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_proj_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1748195, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 5.38475 + ] + }, + "ARC": { + "runs": [ + 5.38475 + ] + }, + "LFU": { + "runs": [ + 4.72735 + ] + }, + "LRU": { + "runs": [ + 5.3511999999999995 + ] + }, + "Random": { + "runs": [ + 5.20455, + 5.20285, + 5.2183, + 5.2040500000000005, + 5.199249999999999 + ] + }, + "S3-FIFO": { + "runs": [ + 5.7946 + ] + }, + "SIEVE": { + "runs": [ + 4.72735 + ] + }, + "TTL": { + "runs": [ + 5.3511999999999995 + ] + }, + "W-TinyLFU": { + "runs": [ + 4.290150000000001, + 4.255649999999999, + 4.23055, + 4.17295, + 4.1902 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 5.1432, + 5.1450000000000005, + 5.12815, + 5.13185, + 5.1362 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 5.06895, + 5.06715, + 5.12265, + 5.08085, + 5.0935500000000005 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 5.36935, + 5.41735, + 5.34525, + 5.35935, + 5.5329999999999995 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007255163291278774, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5823, + "Misses": 93968, + "Active": false + }, + { + "Policy": 8, + "Hits": 5651, + "Misses": 94140, + "Active": false + }, + { + "Policy": 6, + "Hits": 5256, + "Misses": 94535, + "Active": false + }, + { + "Policy": 3, + "Hits": 5159, + "Misses": 94632, + "Active": false + }, + { + "Policy": 4, + "Hits": 5152, + "Misses": 94639, + "Active": false + }, + { + "Policy": 1, + "Hits": 5099, + "Misses": 94692, + "Active": true + }, + { + "Policy": 5, + "Hits": 4961, + "Misses": 94830, + "Active": false + }, + { + "Policy": 9, + "Hits": 4824, + "Misses": 94967, + "Active": false + }, + { + "Policy": 2, + "Hits": 4452, + "Misses": 95339, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.005766145206578421, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5618, + "Misses": 94102, + "Active": false + }, + { + "Policy": 7, + "Hits": 5168, + "Misses": 94552, + "Active": false + }, + { + "Policy": 4, + "Hits": 5131, + "Misses": 94589, + "Active": false + }, + { + "Policy": 3, + "Hits": 5118, + "Misses": 94602, + "Active": false + }, + { + "Policy": 6, + "Hits": 5048, + "Misses": 94672, + "Active": false + }, + { + "Policy": 1, + "Hits": 5043, + "Misses": 94677, + "Active": true + }, + { + "Policy": 5, + "Hits": 4960, + "Misses": 94760, + "Active": false + }, + { + "Policy": 9, + "Hits": 4804, + "Misses": 94916, + "Active": false + }, + { + "Policy": 2, + "Hits": 4477, + "Misses": 95243, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004723698726306291, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5404, + "Misses": 94306, + "Active": false + }, + { + "Policy": 3, + "Hits": 4948, + "Misses": 94762, + "Active": false + }, + { + "Policy": 1, + "Hits": 4933, + "Misses": 94777, + "Active": true + }, + { + "Policy": 6, + "Hits": 4925, + "Misses": 94785, + "Active": false + }, + { + "Policy": 4, + "Hits": 4913, + "Misses": 94797, + "Active": false + }, + { + "Policy": 7, + "Hits": 4778, + "Misses": 94932, + "Active": false + }, + { + "Policy": 5, + "Hits": 4774, + "Misses": 94936, + "Active": false + }, + { + "Policy": 9, + "Hits": 4623, + "Misses": 95087, + "Active": false + }, + { + "Policy": 2, + "Hits": 4286, + "Misses": 95424, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007524941943328721, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6103, + "Misses": 94230, + "Active": false + }, + { + "Policy": 8, + "Hits": 5850, + "Misses": 94483, + "Active": false + }, + { + "Policy": 3, + "Hits": 5398, + "Misses": 94935, + "Active": false + }, + { + "Policy": 4, + "Hits": 5390, + "Misses": 94943, + "Active": false + }, + { + "Policy": 1, + "Hits": 5348, + "Misses": 94985, + "Active": true + }, + { + "Policy": 6, + "Hits": 5277, + "Misses": 95056, + "Active": false + }, + { + "Policy": 5, + "Hits": 5174, + "Misses": 95159, + "Active": false + }, + { + "Policy": 9, + "Hits": 5023, + "Misses": 95310, + "Active": false + }, + { + "Policy": 2, + "Hits": 4776, + "Misses": 95557, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0046654291698513956, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6507, + "Misses": 94234, + "Active": false + }, + { + "Policy": 7, + "Hits": 6134, + "Misses": 94607, + "Active": false + }, + { + "Policy": 3, + "Hits": 6091, + "Misses": 94650, + "Active": false + }, + { + "Policy": 4, + "Hits": 6085, + "Misses": 94656, + "Active": false + }, + { + "Policy": 1, + "Hits": 6037, + "Misses": 94704, + "Active": true + }, + { + "Policy": 6, + "Hits": 5996, + "Misses": 94745, + "Active": false + }, + { + "Policy": 5, + "Hits": 5870, + "Misses": 94871, + "Active": false + }, + { + "Policy": 9, + "Hits": 5758, + "Misses": 94983, + "Active": false + }, + { + "Policy": 2, + "Hits": 5373, + "Misses": 95368, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 94547, + "sieve_hits": 94547, + "fifo_hits": 102774, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_src1_2", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1947636, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.7661 + ] + }, + "ARC": { + "runs": [ + 1.72685 + ] + }, + "LFU": { + "runs": [ + 1.4181 + ] + }, + "LRU": { + "runs": [ + 1.7021499999999998 + ] + }, + "Random": { + "runs": [ + 1.6340000000000001, + 1.6365, + 1.6306999999999998, + 1.63535, + 1.6315 + ] + }, + "S3-FIFO": { + "runs": [ + 1.7013500000000001 + ] + }, + "SIEVE": { + "runs": [ + 1.4181 + ] + }, + "TTL": { + "runs": [ + 1.7021499999999998 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.9096500000000001, + 1.1509, + 1.204, + 0.9816999999999999, + 1.21295 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.701, + 1.7012, + 1.7007999999999999, + 1.7007999999999999, + 1.70115 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005292854646227578, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1733, + "Misses": 98402, + "Active": false + }, + { + "Policy": 4, + "Hits": 1687, + "Misses": 98448, + "Active": false + }, + { + "Policy": 6, + "Hits": 1682, + "Misses": 98453, + "Active": false + }, + { + "Policy": 1, + "Hits": 1680, + "Misses": 98455, + "Active": true + }, + { + "Policy": 8, + "Hits": 1679, + "Misses": 98456, + "Active": false + }, + { + "Policy": 5, + "Hits": 1619, + "Misses": 98516, + "Active": false + }, + { + "Policy": 9, + "Hits": 1435, + "Misses": 98700, + "Active": false + }, + { + "Policy": 2, + "Hits": 1387, + "Misses": 98748, + "Active": false + }, + { + "Policy": 7, + "Hits": 1211, + "Misses": 98924, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007803199311717801, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1743, + "Misses": 98216, + "Active": false + }, + { + "Policy": 4, + "Hits": 1700, + "Misses": 98259, + "Active": false + }, + { + "Policy": 8, + "Hits": 1666, + "Misses": 98293, + "Active": false + }, + { + "Policy": 1, + "Hits": 1665, + "Misses": 98294, + "Active": true + }, + { + "Policy": 6, + "Hits": 1665, + "Misses": 98294, + "Active": false + }, + { + "Policy": 5, + "Hits": 1602, + "Misses": 98357, + "Active": false + }, + { + "Policy": 9, + "Hits": 1573, + "Misses": 98386, + "Active": false + }, + { + "Policy": 2, + "Hits": 1347, + "Misses": 98612, + "Active": false + }, + { + "Policy": 7, + "Hits": 1215, + "Misses": 98744, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006132748879013918, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1688, + "Misses": 97778, + "Active": false + }, + { + "Policy": 4, + "Hits": 1643, + "Misses": 97823, + "Active": false + }, + { + "Policy": 1, + "Hits": 1627, + "Misses": 97839, + "Active": true + }, + { + "Policy": 6, + "Hits": 1627, + "Misses": 97839, + "Active": false + }, + { + "Policy": 8, + "Hits": 1627, + "Misses": 97839, + "Active": false + }, + { + "Policy": 9, + "Hits": 1582, + "Misses": 97884, + "Active": false + }, + { + "Policy": 5, + "Hits": 1553, + "Misses": 97913, + "Active": false + }, + { + "Policy": 2, + "Hits": 1357, + "Misses": 98109, + "Active": false + }, + { + "Policy": 7, + "Hits": 1158, + "Misses": 98308, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007309795125468137, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1810, + "Misses": 98056, + "Active": false + }, + { + "Policy": 4, + "Hits": 1775, + "Misses": 98091, + "Active": false + }, + { + "Policy": 1, + "Hits": 1737, + "Misses": 98129, + "Active": true + }, + { + "Policy": 6, + "Hits": 1737, + "Misses": 98129, + "Active": false + }, + { + "Policy": 8, + "Hits": 1737, + "Misses": 98129, + "Active": false + }, + { + "Policy": 5, + "Hits": 1673, + "Misses": 98193, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98406, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98406, + "Active": false + }, + { + "Policy": 7, + "Hits": 1403, + "Misses": 98463, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.000570245205438337, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1809, + "Misses": 98148, + "Active": false + }, + { + "Policy": 4, + "Hits": 1762, + "Misses": 98195, + "Active": false + }, + { + "Policy": 8, + "Hits": 1754, + "Misses": 98203, + "Active": false + }, + { + "Policy": 6, + "Hits": 1753, + "Misses": 98204, + "Active": false + }, + { + "Policy": 1, + "Hits": 1752, + "Misses": 98205, + "Active": true + }, + { + "Policy": 9, + "Hits": 1681, + "Misses": 98276, + "Active": false + }, + { + "Policy": 5, + "Hits": 1679, + "Misses": 98278, + "Active": false + }, + { + "Policy": 2, + "Hits": 1432, + "Misses": 98525, + "Active": false + }, + { + "Policy": 7, + "Hits": 1260, + "Misses": 98697, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 28362, + "sieve_hits": 28362, + "fifo_hits": 34051, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_usr_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1778953, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 3.5717499999999998 + ] + }, + "ARC": { + "runs": [ + 3.5526500000000003 + ] + }, + "LFU": { + "runs": [ + 1.4588 + ] + }, + "LRU": { + "runs": [ + 3.5715999999999997 + ] + }, + "Random": { + "runs": [ + 3.49465, + 3.49085, + 3.48615, + 3.4975, + 3.4874500000000004 + ] + }, + "S3-FIFO": { + "runs": [ + 3.5838 + ] + }, + "SIEVE": { + "runs": [ + 1.4588 + ] + }, + "TTL": { + "runs": [ + 3.5715999999999997 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.8573999999999997, + 2.23415, + 2.83745, + 2.7112000000000003, + 2.8632 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 3.5715999999999997, + 3.5451, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 3.5027999999999997, + 3.4717, + 3.5027999999999997, + 3.5027500000000003, + 3.5027500000000003 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 3.4059, + 3.6654, + 3.4236500000000003, + 3.42185, + 3.41115 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 1, + "Hits": 3578, + "Misses": 96188, + "Active": true + }, + { + "Policy": 8, + "Hits": 3565, + "Misses": 96201, + "Active": false + }, + { + "Policy": 3, + "Hits": 3550, + "Misses": 96216, + "Active": false + }, + { + "Policy": 4, + "Hits": 3526, + "Misses": 96240, + "Active": false + }, + { + "Policy": 6, + "Hits": 3525, + "Misses": 96241, + "Active": false + }, + { + "Policy": 5, + "Hits": 3502, + "Misses": 96264, + "Active": false + }, + { + "Policy": 9, + "Hits": 3113, + "Misses": 96653, + "Active": false + }, + { + "Policy": 7, + "Hits": 2938, + "Misses": 96828, + "Active": false + }, + { + "Policy": 2, + "Hits": 1857, + "Misses": 97909, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.00042868394030326495, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3907, + "Misses": 96400, + "Active": false + }, + { + "Policy": 6, + "Hits": 3884, + "Misses": 96423, + "Active": false + }, + { + "Policy": 1, + "Hits": 3864, + "Misses": 96443, + "Active": true + }, + { + "Policy": 3, + "Hits": 3847, + "Misses": 96460, + "Active": false + }, + { + "Policy": 4, + "Hits": 3839, + "Misses": 96468, + "Active": false + }, + { + "Policy": 5, + "Hits": 3770, + "Misses": 96537, + "Active": false + }, + { + "Policy": 9, + "Hits": 3118, + "Misses": 97189, + "Active": false + }, + { + "Policy": 7, + "Hits": 3019, + "Misses": 97288, + "Active": false + }, + { + "Policy": 2, + "Hits": 1882, + "Misses": 98425, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.00009968598913422805, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3794, + "Misses": 96521, + "Active": false + }, + { + "Policy": 3, + "Hits": 3785, + "Misses": 96530, + "Active": false + }, + { + "Policy": 1, + "Hits": 3784, + "Misses": 96531, + "Active": true + }, + { + "Policy": 4, + "Hits": 3765, + "Misses": 96550, + "Active": false + }, + { + "Policy": 5, + "Hits": 3722, + "Misses": 96593, + "Active": false + }, + { + "Policy": 6, + "Hits": 3709, + "Misses": 96606, + "Active": false + }, + { + "Policy": 9, + "Hits": 3350, + "Misses": 96965, + "Active": false + }, + { + "Policy": 7, + "Hits": 2936, + "Misses": 97379, + "Active": false + }, + { + "Policy": 2, + "Hits": 1970, + "Misses": 98345, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000169403698979588, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3434, + "Misses": 96918, + "Active": false + }, + { + "Policy": 3, + "Hits": 3432, + "Misses": 96920, + "Active": false + }, + { + "Policy": 1, + "Hits": 3417, + "Misses": 96935, + "Active": true + }, + { + "Policy": 4, + "Hits": 3387, + "Misses": 96965, + "Active": false + }, + { + "Policy": 6, + "Hits": 3385, + "Misses": 96967, + "Active": false + }, + { + "Policy": 5, + "Hits": 3354, + "Misses": 96998, + "Active": false + }, + { + "Policy": 9, + "Hits": 2937, + "Misses": 97415, + "Active": false + }, + { + "Policy": 7, + "Hits": 2675, + "Misses": 97677, + "Active": false + }, + { + "Policy": 2, + "Hits": 1662, + "Misses": 98690, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 1, + "Hits": 3621, + "Misses": 96434, + "Active": true + }, + { + "Policy": 8, + "Hits": 3613, + "Misses": 96442, + "Active": false + }, + { + "Policy": 3, + "Hits": 3578, + "Misses": 96477, + "Active": false + }, + { + "Policy": 4, + "Hits": 3558, + "Misses": 96497, + "Active": false + }, + { + "Policy": 6, + "Hits": 3526, + "Misses": 96529, + "Active": false + }, + { + "Policy": 5, + "Hits": 3490, + "Misses": 96565, + "Active": false + }, + { + "Policy": 9, + "Hits": 3270, + "Misses": 96785, + "Active": false + }, + { + "Policy": 7, + "Hits": 2725, + "Misses": 97330, + "Active": false + }, + { + "Policy": 2, + "Hits": 1834, + "Misses": 98221, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 29176, + "sieve_hits": 29176, + "fifo_hits": 70272, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_web_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1855956, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 2.6100000000000003 + ] + }, + "ARC": { + "runs": [ + 2.6045 + ] + }, + "LFU": { + "runs": [ + 2.61025 + ] + }, + "LRU": { + "runs": [ + 2.2991 + ] + }, + "Random": { + "runs": [ + 2.56025, + 2.5652, + 2.55365, + 2.553, + 2.5606 + ] + }, + "S3-FIFO": { + "runs": [ + 2.49225 + ] + }, + "SIEVE": { + "runs": [ + 2.61025 + ] + }, + "TTL": { + "runs": [ + 2.2991 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.2798, + 2.29585, + 2.31995, + 2.2407500000000002, + 2.2658 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 2.3472, + 2.3472, + 2.23365, + 2.3472, + 2.3472 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 2.38765, + 2.38625, + 2.4058, + 2.4079, + 2.4076500000000003 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 2.45505, + 2.4332, + 2.44035, + 2.45575, + 2.434 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0038092958785811842, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3146, + "Misses": 97135, + "Active": false + }, + { + "Policy": 4, + "Hits": 3145, + "Misses": 97136, + "Active": false + }, + { + "Policy": 2, + "Hits": 3139, + "Misses": 97142, + "Active": false + }, + { + "Policy": 9, + "Hits": 3139, + "Misses": 97142, + "Active": false + }, + { + "Policy": 8, + "Hits": 3016, + "Misses": 97265, + "Active": false + }, + { + "Policy": 5, + "Hits": 2999, + "Misses": 97282, + "Active": false + }, + { + "Policy": 7, + "Hits": 2783, + "Misses": 97498, + "Active": false + }, + { + "Policy": 1, + "Hits": 2764, + "Misses": 97517, + "Active": true + }, + { + "Policy": 6, + "Hits": 2756, + "Misses": 97525, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0028916143184764195, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2636, + "Misses": 97654, + "Active": false + }, + { + "Policy": 9, + "Hits": 2636, + "Misses": 97654, + "Active": false + }, + { + "Policy": 3, + "Hits": 2620, + "Misses": 97670, + "Active": false + }, + { + "Policy": 4, + "Hits": 2616, + "Misses": 97674, + "Active": false + }, + { + "Policy": 5, + "Hits": 2555, + "Misses": 97735, + "Active": false + }, + { + "Policy": 8, + "Hits": 2533, + "Misses": 97757, + "Active": false + }, + { + "Policy": 7, + "Hits": 2456, + "Misses": 97834, + "Active": false + }, + { + "Policy": 1, + "Hits": 2346, + "Misses": 97944, + "Active": true + }, + { + "Policy": 6, + "Hits": 2341, + "Misses": 97949, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033522252534302424, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2203, + "Misses": 97134, + "Active": false + }, + { + "Policy": 2, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 4, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 9, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 5, + "Hits": 2184, + "Misses": 97153, + "Active": false + }, + { + "Policy": 8, + "Hits": 2068, + "Misses": 97269, + "Active": false + }, + { + "Policy": 7, + "Hits": 1941, + "Misses": 97396, + "Active": false + }, + { + "Policy": 1, + "Hits": 1870, + "Misses": 97467, + "Active": true + }, + { + "Policy": 6, + "Hits": 1870, + "Misses": 97467, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 4, + "Improvement": 0.0031900152522604253, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 4, + "Hits": 2697, + "Misses": 97616, + "Active": false + }, + { + "Policy": 3, + "Hits": 2696, + "Misses": 97617, + "Active": false + }, + { + "Policy": 2, + "Hits": 2693, + "Misses": 97620, + "Active": false + }, + { + "Policy": 9, + "Hits": 2693, + "Misses": 97620, + "Active": false + }, + { + "Policy": 5, + "Hits": 2632, + "Misses": 97681, + "Active": false + }, + { + "Policy": 8, + "Hits": 2576, + "Misses": 97737, + "Active": false + }, + { + "Policy": 7, + "Hits": 2404, + "Misses": 97909, + "Active": false + }, + { + "Policy": 1, + "Hits": 2377, + "Misses": 97936, + "Active": true + }, + { + "Policy": 6, + "Hits": 2376, + "Misses": 97937, + "Active": false + } + ] + }, + "best_policy_name": "ARC", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033618826542863994, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2614, + "Misses": 97330, + "Active": false + }, + { + "Policy": 4, + "Hits": 2612, + "Misses": 97332, + "Active": false + }, + { + "Policy": 2, + "Hits": 2605, + "Misses": 97339, + "Active": false + }, + { + "Policy": 9, + "Hits": 2605, + "Misses": 97339, + "Active": false + }, + { + "Policy": 5, + "Hits": 2512, + "Misses": 97432, + "Active": false + }, + { + "Policy": 8, + "Hits": 2497, + "Misses": 97447, + "Active": false + }, + { + "Policy": 7, + "Hits": 2403, + "Misses": 97541, + "Active": false + }, + { + "Policy": 6, + "Hits": 2297, + "Misses": 97647, + "Active": false + }, + { + "Policy": 1, + "Hits": 2278, + "Misses": 97666, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 52205, + "sieve_hits": 52205, + "fifo_hits": 45560, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + } + ], + "tree_modified": false +} diff --git a/bench/results/current/traces-3-tuning.json b/bench/results/current/traces-3-tuning.json new file mode 100644 index 0000000..4b7af3c --- /dev/null +++ b/bench/results/current/traces-3-tuning.json @@ -0,0 +1,350 @@ +[ + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.38715, + 12.06135, + 12.3026, + 12.09975, + 11.74155 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 4.57145, + 7.71355, + 7.528600000000001, + 4.3308, + 7.61825 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.47435, + 12.442300000000001, + 12.546650000000001, + 12.56205, + 12.29745 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 7.925949999999999, + 7.98165, + 7.93065, + 8.17475, + 7.785 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 13.04085, + 13.25865, + 13.5602, + 11.1013, + 13.337750000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.782250000000001, + 9.9442, + 10.44905, + 7.36435, + 10.3719 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.6419, + 13.1242, + 12.28915, + 12.968750000000002, + 12.534049999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.249749999999999, + 9.87415, + 9.65835, + 9.76375, + 9.38475 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 11.780050000000001, + 11.96705, + 12.12325, + 12.1138, + 12.01965 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 10.52175, + 10.291549999999999, + 8.222999999999999, + 12.2599, + 9.17775 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.38785, + 13.263050000000002, + 11.6614, + 8.39705, + 12.4455 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 10.627699999999999, + 9.66335, + 10.7239, + 10.76835, + 10.99535 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + } +] diff --git a/bench/results/current/traces-3.json b/bench/results/current/traces-3.json new file mode 100644 index 0000000..5a425a0 --- /dev/null +++ b/bench/results/current/traces-3.json @@ -0,0 +1,6933 @@ +{ + "bandit": "bandit.NewThompson(0.7, 13)", + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "cpus": 10, + "go": "go1.25.5", + "measured_at": "2026-10-07T00:11:15Z", + "platform": "darwin/arm64", + "runs": 5, + "settings": { + "epoch_mode": "requests", + "epochs_per_trace": [ + 10, + 20, + 50 + ], + "location": "adaptive[].settings and observe_only[].settings (actual constructor arguments)" + }, + "traces": [ + { + "trace": "twitter_cluster052.csv", + "source": "Twitter Twemcache production KV cache (OSDI '20)", + "requests": 1000000, + "distinct_keys": 255333, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 59.6242 + ] + }, + "ARC": { + "runs": [ + 58.9894 + ] + }, + "LFU": { + "runs": [ + 41.4436 + ] + }, + "LRU": { + "runs": [ + 58.391000000000005 + ] + }, + "Random": { + "runs": [ + 54.7709, + 54.7787, + 54.799699999999994, + 54.8037, + 54.8245 + ] + }, + "S3-FIFO": { + "runs": [ + 59.7291 + ] + }, + "SIEVE": { + "runs": [ + 59.785 + ] + }, + "TTL": { + "runs": [ + 58.391000000000005 + ] + }, + "W-TinyLFU": { + "runs": [ + 58.567499999999995, + 56.066, + 58.727, + 54.89619999999999, + 58.7426 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 58.6715, + 58.6811, + 58.7152, + 58.6455, + 58.599599999999995 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 50000, + "hit_rate_percent": { + "runs": [ + 58.7718, + 58.77830000000001, + 58.8639, + 58.925700000000006, + 58.7737 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 20000, + "hit_rate_percent": { + "runs": [ + 58.065, + 58.1114, + 58.240899999999996, + 58.3461, + 58.1886 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 20000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020825112894033104, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 25683, + "Misses": 19935, + "Active": false + }, + { + "Policy": 9, + "Hits": 25425, + "Misses": 20193, + "Active": false + }, + { + "Policy": 8, + "Hits": 25404, + "Misses": 20214, + "Active": false + }, + { + "Policy": 3, + "Hits": 25299, + "Misses": 20319, + "Active": false + }, + { + "Policy": 4, + "Hits": 25041, + "Misses": 20577, + "Active": false + }, + { + "Policy": 1, + "Hits": 24733, + "Misses": 20885, + "Active": true + }, + { + "Policy": 6, + "Hits": 24717, + "Misses": 20901, + "Active": false + }, + { + "Policy": 5, + "Hits": 22863, + "Misses": 22755, + "Active": false + }, + { + "Policy": 2, + "Hits": 19188, + "Misses": 26430, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.015846556380823662, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 27957, + "Misses": 19435, + "Active": false + }, + { + "Policy": 9, + "Hits": 27957, + "Misses": 19435, + "Active": false + }, + { + "Policy": 3, + "Hits": 27891, + "Misses": 19501, + "Active": false + }, + { + "Policy": 4, + "Hits": 27820, + "Misses": 19572, + "Active": false + }, + { + "Policy": 6, + "Hits": 27281, + "Misses": 20111, + "Active": false + }, + { + "Policy": 1, + "Hits": 27206, + "Misses": 20186, + "Active": true + }, + { + "Policy": 7, + "Hits": 26503, + "Misses": 20889, + "Active": false + }, + { + "Policy": 5, + "Hits": 25375, + "Misses": 22017, + "Active": false + }, + { + "Policy": 2, + "Hits": 22200, + "Misses": 25192, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.013512750541074592, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 33157, + "Misses": 19978, + "Active": false + }, + { + "Policy": 8, + "Hits": 33116, + "Misses": 20019, + "Active": false + }, + { + "Policy": 7, + "Hits": 33087, + "Misses": 20048, + "Active": false + }, + { + "Policy": 3, + "Hits": 32999, + "Misses": 20136, + "Active": false + }, + { + "Policy": 4, + "Hits": 32739, + "Misses": 20396, + "Active": false + }, + { + "Policy": 6, + "Hits": 32480, + "Misses": 20655, + "Active": false + }, + { + "Policy": 1, + "Hits": 32439, + "Misses": 20696, + "Active": true + }, + { + "Policy": 5, + "Hits": 30882, + "Misses": 22253, + "Active": false + }, + { + "Policy": 2, + "Hits": 26483, + "Misses": 26652, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020277676287906443, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29316, + "Misses": 19950, + "Active": false + }, + { + "Policy": 8, + "Hits": 29026, + "Misses": 20240, + "Active": false + }, + { + "Policy": 9, + "Hits": 29018, + "Misses": 20248, + "Active": false + }, + { + "Policy": 3, + "Hits": 28968, + "Misses": 20298, + "Active": false + }, + { + "Policy": 4, + "Hits": 28691, + "Misses": 20575, + "Active": false + }, + { + "Policy": 1, + "Hits": 28317, + "Misses": 20949, + "Active": true + }, + { + "Policy": 6, + "Hits": 28307, + "Misses": 20959, + "Active": false + }, + { + "Policy": 5, + "Hits": 26549, + "Misses": 22717, + "Active": false + }, + { + "Policy": 2, + "Hits": 22906, + "Misses": 26360, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.018912641607811587, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22567, + "Misses": 19627, + "Active": false + }, + { + "Policy": 3, + "Hits": 22392, + "Misses": 19802, + "Active": false + }, + { + "Policy": 9, + "Hits": 22380, + "Misses": 19814, + "Active": false + }, + { + "Policy": 8, + "Hits": 22355, + "Misses": 19839, + "Active": false + }, + { + "Policy": 4, + "Hits": 22199, + "Misses": 19995, + "Active": false + }, + { + "Policy": 6, + "Hits": 21872, + "Misses": 20322, + "Active": false + }, + { + "Policy": 1, + "Hits": 21769, + "Misses": 20425, + "Active": true + }, + { + "Policy": 5, + "Hits": 20515, + "Misses": 21679, + "Active": false + }, + { + "Policy": 2, + "Hits": 16116, + "Misses": 26078, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 414436, + "sieve_hits": 597850, + "fifo_hits": 555634, + "different_lfu_sieve_decisions": 216148, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_loop.trace", + "source": "LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02)", + "requests": 505500, + "distinct_keys": 1011, + "capacity": 500, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 0 + ] + }, + "ARC": { + "runs": [ + 0 + ] + }, + "LFU": { + "runs": [ + 0 + ] + }, + "LRU": { + "runs": [ + 0 + ] + }, + "Random": { + "runs": [ + 19.658753709198812, + 19.628882294757666, + 19.688229475766565, + 19.74480712166172, + 19.605736894164195 + ] + }, + "S3-FIFO": { + "runs": [ + 0 + ] + }, + "SIEVE": { + "runs": [ + 0 + ] + }, + "TTL": { + "runs": [ + 0 + ] + }, + "W-TinyLFU": { + "runs": [ + 42.387932739861526, + 45.61839762611276, + 46.2757665677547, + 45.96280909990109, + 45.7677546983185 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 50550, + "hit_rate_percent": { + "runs": [ + 40.64688427299703, + 41.81780415430267, + 40.673194856577645, + 40.054401582591495, + 40.877744807121665 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50550, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 25275, + "hit_rate_percent": { + "runs": [ + 42.81167161226509, + 42.3457962413452, + 42.60217606330366, + 45.525618199802175, + 43.57962413452028 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 10110, + "hit_rate_percent": { + "runs": [ + 44.08189910979228, + 43.490405539070224, + 44.604352126607324, + 43.372106824925815, + 43.07537091988131 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10110, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + } + ], + "effective_sample_rate": 0.128, + "observe_only": [ + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.40016216216216216, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29612, + "Misses": 44388, + "Active": false + }, + { + "Policy": 5, + "Hits": 9947, + "Misses": 64053, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 74000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 74000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.5062479338842976, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30628, + "Misses": 29872, + "Active": false + }, + { + "Policy": 8, + "Hits": 21230, + "Misses": 39270, + "Active": false + }, + { + "Policy": 5, + "Hits": 14208, + "Misses": 46292, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 60468, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 60500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 60500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.42320588235294115, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28778, + "Misses": 39222, + "Active": false + }, + { + "Policy": 5, + "Hits": 11598, + "Misses": 56402, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4263529411764706, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28992, + "Misses": 39008, + "Active": false + }, + { + "Policy": 5, + "Hits": 11492, + "Misses": 56508, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4298518518518519, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29015, + "Misses": 38485, + "Active": false + }, + { + "Policy": 5, + "Hits": 11781, + "Misses": 55719, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 67500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 67500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 0, + "sieve_hits": 0, + "fifo_hits": 0, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_2_pools.trace", + "source": "LIRS 2_pools: two interleaved pools with different locality", + "requests": 100000, + "distinct_keys": 9939, + "capacity": 1000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 54.397 + ] + }, + "ARC": { + "runs": [ + 54.37499999999999 + ] + }, + "LFU": { + "runs": [ + 54.361000000000004 + ] + }, + "LRU": { + "runs": [ + 54.415 + ] + }, + "Random": { + "runs": [ + 49.885000000000005, + 49.984, + 50.054, + 50.037, + 49.999 + ] + }, + "S3-FIFO": { + "runs": [ + 54.37 + ] + }, + "SIEVE": { + "runs": [ + 54.361000000000004 + ] + }, + "TTL": { + "runs": [ + 54.415 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.846, + 54.767999999999994, + 54.95100000000001, + 54.773, + 54.652 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 10000, + "hit_rate_percent": { + "runs": [ + 54.429, + 54.407000000000004, + 54.417, + 54.416, + 54.391999999999996 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 5000, + "hit_rate_percent": { + "runs": [ + 54.398, + 54.403999999999996, + 54.403, + 54.399, + 54.406 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 2000, + "hit_rate_percent": { + "runs": [ + 54.233, + 54.275, + 54.24, + 54.190000000000005, + 54.261 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 2000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + } + ], + "effective_sample_rate": 0.064, + "observe_only": [ + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 4725, + "Misses": 2919, + "Active": true + }, + { + "Policy": 3, + "Hits": 4724, + "Misses": 2920, + "Active": false + }, + { + "Policy": 6, + "Hits": 4709, + "Misses": 2935, + "Active": false + }, + { + "Policy": 2, + "Hits": 4704, + "Misses": 2940, + "Active": false + }, + { + "Policy": 9, + "Hits": 4701, + "Misses": 2943, + "Active": false + }, + { + "Policy": 4, + "Hits": 4699, + "Misses": 2945, + "Active": false + }, + { + "Policy": 7, + "Hits": 4699, + "Misses": 2945, + "Active": false + }, + { + "Policy": 8, + "Hits": 4695, + "Misses": 2949, + "Active": false + }, + { + "Policy": 5, + "Hits": 4279, + "Misses": 3365, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.018219461697722594, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 1886, + "Misses": 2944, + "Active": false + }, + { + "Policy": 8, + "Hits": 1817, + "Misses": 3013, + "Active": false + }, + { + "Policy": 3, + "Hits": 1812, + "Misses": 3018, + "Active": false + }, + { + "Policy": 4, + "Hits": 1811, + "Misses": 3019, + "Active": false + }, + { + "Policy": 9, + "Hits": 1807, + "Misses": 3023, + "Active": false + }, + { + "Policy": 2, + "Hits": 1804, + "Misses": 3026, + "Active": false + }, + { + "Policy": 1, + "Hits": 1798, + "Misses": 3032, + "Active": true + }, + { + "Policy": 6, + "Hits": 1798, + "Misses": 3032, + "Active": false + }, + { + "Policy": 5, + "Hits": 1672, + "Misses": 3158, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.004354136429608135, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 2, + "Hits": 3365, + "Misses": 2836, + "Active": false + }, + { + "Policy": 9, + "Hits": 3362, + "Misses": 2839, + "Active": false + }, + { + "Policy": 4, + "Hits": 3354, + "Misses": 2847, + "Active": false + }, + { + "Policy": 6, + "Hits": 3350, + "Misses": 2851, + "Active": false + }, + { + "Policy": 7, + "Hits": 3349, + "Misses": 2852, + "Active": false + }, + { + "Policy": 3, + "Hits": 3346, + "Misses": 2855, + "Active": false + }, + { + "Policy": 8, + "Hits": 3342, + "Misses": 2859, + "Active": false + }, + { + "Policy": 1, + "Hits": 3338, + "Misses": 2863, + "Active": true + }, + { + "Policy": 5, + "Hits": 3088, + "Misses": 3113, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.001438618925831192, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 8, + "Hits": 3346, + "Misses": 2910, + "Active": false + }, + { + "Policy": 1, + "Hits": 3337, + "Misses": 2919, + "Active": true + }, + { + "Policy": 3, + "Hits": 3337, + "Misses": 2919, + "Active": false + }, + { + "Policy": 6, + "Hits": 3331, + "Misses": 2925, + "Active": false + }, + { + "Policy": 4, + "Hits": 3328, + "Misses": 2928, + "Active": false + }, + { + "Policy": 7, + "Hits": 3327, + "Misses": 2929, + "Active": false + }, + { + "Policy": 9, + "Hits": 3316, + "Misses": 2940, + "Active": false + }, + { + "Policy": 2, + "Hits": 3298, + "Misses": 2958, + "Active": false + }, + { + "Policy": 5, + "Hits": 3102, + "Misses": 3154, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 3329, + "Misses": 3056, + "Active": true + }, + { + "Policy": 8, + "Hits": 3329, + "Misses": 3056, + "Active": false + }, + { + "Policy": 2, + "Hits": 3324, + "Misses": 3061, + "Active": false + }, + { + "Policy": 9, + "Hits": 3323, + "Misses": 3062, + "Active": false + }, + { + "Policy": 7, + "Hits": 3315, + "Misses": 3070, + "Active": false + }, + { + "Policy": 6, + "Hits": 3313, + "Misses": 3072, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 3077, + "Active": false + }, + { + "Policy": 3, + "Hits": 3305, + "Misses": 3080, + "Active": false + }, + { + "Policy": 5, + "Hits": 3009, + "Misses": 3376, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 54361, + "sieve_hits": 54361, + "fifo_hits": 49957, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_p3", + "source": "ARC paper P3 workstation trace (FAST '03)", + "requests": 2000000, + "distinct_keys": 426527, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 7.74445 + ] + }, + "ARC": { + "runs": [ + 10.25295 + ] + }, + "LFU": { + "runs": [ + 4.8162 + ] + }, + "LRU": { + "runs": [ + 1.8679500000000002 + ] + }, + "Random": { + "runs": [ + 3.0903, + 3.07745, + 3.08705, + 3.08825, + 3.0821 + ] + }, + "S3-FIFO": { + "runs": [ + 10.75245 + ] + }, + "SIEVE": { + "runs": [ + 4.8162 + ] + }, + "TTL": { + "runs": [ + 1.8679500000000002 + ] + }, + "W-TinyLFU": { + "runs": [ + 11.59475, + 11.8256, + 11.7034, + 11.639, + 11.737499999999999 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 11.92975, + 12.3026, + 12.1276, + 12.4693, + 12.545300000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.9724, + 12.897649999999999, + 13.1049, + 12.505849999999999, + 12.9947 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 13.4935, + 12.104149999999999, + 12.4265, + 12.26415, + 13.3653 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11005807709137198, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12944, + "Misses": 87612, + "Active": false + }, + { + "Policy": 8, + "Hits": 10931, + "Misses": 89625, + "Active": false + }, + { + "Policy": 4, + "Hits": 10417, + "Misses": 90139, + "Active": false + }, + { + "Policy": 3, + "Hits": 6927, + "Misses": 93629, + "Active": false + }, + { + "Policy": 2, + "Hits": 4687, + "Misses": 95869, + "Active": false + }, + { + "Policy": 9, + "Hits": 4687, + "Misses": 95869, + "Active": false + }, + { + "Policy": 5, + "Hits": 3094, + "Misses": 97462, + "Active": false + }, + { + "Policy": 1, + "Hits": 1877, + "Misses": 98679, + "Active": true + }, + { + "Policy": 6, + "Hits": 1877, + "Misses": 98679, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11642673547967612, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13223, + "Misses": 85208, + "Active": false + }, + { + "Policy": 8, + "Hits": 10478, + "Misses": 87953, + "Active": false + }, + { + "Policy": 4, + "Hits": 10029, + "Misses": 88402, + "Active": false + }, + { + "Policy": 3, + "Hits": 7952, + "Misses": 90479, + "Active": false + }, + { + "Policy": 2, + "Hits": 4813, + "Misses": 93618, + "Active": false + }, + { + "Policy": 9, + "Hits": 4813, + "Misses": 93618, + "Active": false + }, + { + "Policy": 5, + "Hits": 3047, + "Misses": 95384, + "Active": false + }, + { + "Policy": 6, + "Hits": 1789, + "Misses": 96642, + "Active": false + }, + { + "Policy": 1, + "Hits": 1763, + "Misses": 96668, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11520838972939915, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13349, + "Misses": 86392, + "Active": false + }, + { + "Policy": 8, + "Hits": 10847, + "Misses": 88894, + "Active": false + }, + { + "Policy": 4, + "Hits": 10253, + "Misses": 89488, + "Active": false + }, + { + "Policy": 3, + "Hits": 7369, + "Misses": 92372, + "Active": false + }, + { + "Policy": 2, + "Hits": 4673, + "Misses": 95068, + "Active": false + }, + { + "Policy": 9, + "Hits": 4673, + "Misses": 95068, + "Active": false + }, + { + "Policy": 5, + "Hits": 3084, + "Misses": 96657, + "Active": false + }, + { + "Policy": 6, + "Hits": 1873, + "Misses": 97868, + "Active": false + }, + { + "Policy": 1, + "Hits": 1858, + "Misses": 97883, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10795654402379828, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12547, + "Misses": 86956, + "Active": false + }, + { + "Policy": 8, + "Hits": 10467, + "Misses": 89036, + "Active": false + }, + { + "Policy": 4, + "Hits": 10001, + "Misses": 89502, + "Active": false + }, + { + "Policy": 3, + "Hits": 6748, + "Misses": 92755, + "Active": false + }, + { + "Policy": 2, + "Hits": 4729, + "Misses": 94774, + "Active": false + }, + { + "Policy": 9, + "Hits": 4729, + "Misses": 94774, + "Active": false + }, + { + "Policy": 5, + "Hits": 3035, + "Misses": 96468, + "Active": false + }, + { + "Policy": 6, + "Hits": 1846, + "Misses": 97657, + "Active": false + }, + { + "Policy": 1, + "Hits": 1805, + "Misses": 97698, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10236619382524735, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12150, + "Misses": 88518, + "Active": false + }, + { + "Policy": 8, + "Hits": 10747, + "Misses": 89921, + "Active": false + }, + { + "Policy": 4, + "Hits": 10250, + "Misses": 90418, + "Active": false + }, + { + "Policy": 3, + "Hits": 7554, + "Misses": 93114, + "Active": false + }, + { + "Policy": 2, + "Hits": 4627, + "Misses": 96041, + "Active": false + }, + { + "Policy": 9, + "Hits": 4627, + "Misses": 96041, + "Active": false + }, + { + "Policy": 5, + "Hits": 3011, + "Misses": 97657, + "Active": false + }, + { + "Policy": 1, + "Hits": 1845, + "Misses": 98823, + "Active": true + }, + { + "Policy": 6, + "Hits": 1786, + "Misses": 98882, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 96324, + "sieve_hits": 96324, + "fifo_hits": 38093, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_oltp", + "source": "ARC paper OLTP database trace (FAST '03)", + "requests": 914145, + "distinct_keys": 186880, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.25427038380126 + ] + }, + "ARC": { + "runs": [ + 67.8008412232195 + ] + }, + "LFU": { + "runs": [ + 45.426053853600905 + ] + }, + "LRU": { + "runs": [ + 67.0592739663839 + ] + }, + "Random": { + "runs": [ + 63.0203085943696, + 63.054110671720565, + 63.00116502305433, + 63.016479880106544, + 63.040546084045744 + ] + }, + "S3-FIFO": { + "runs": [ + 67.79460588856253 + ] + }, + "SIEVE": { + "runs": [ + 67.717484644121 + ] + }, + "TTL": { + "runs": [ + 67.0592739663839 + ] + }, + "W-TinyLFU": { + "runs": [ + 63.106728144878545, + 63.10815023874768, + 63.11077564281378, + 63.01472961072915, + 63.170831760825685 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 91414, + "hit_rate_percent": { + "runs": [ + 67.3695092135274, + 67.4123908132736, + 67.72984592159888, + 67.47824469859815, + 67.64123853436817 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 91414, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 45707, + "hit_rate_percent": { + "runs": [ + 67.1288471741354, + 66.9121419468465, + 67.12272123131451, + 66.80056227403749, + 66.87243271034683 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 18282, + "hit_rate_percent": { + "runs": [ + 66.33017737886222, + 66.20929939998578, + 66.19529724496661, + 66.32864589315699, + 66.02836530309743 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 18282, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.01054831126559641, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 35210, + "Misses": 14561, + "Active": false + }, + { + "Policy": 8, + "Hits": 35107, + "Misses": 14664, + "Active": false + }, + { + "Policy": 4, + "Hits": 35092, + "Misses": 14679, + "Active": false + }, + { + "Policy": 9, + "Hits": 34999, + "Misses": 14772, + "Active": false + }, + { + "Policy": 1, + "Hits": 34685, + "Misses": 15086, + "Active": true + }, + { + "Policy": 6, + "Hits": 34654, + "Misses": 15117, + "Active": false + }, + { + "Policy": 7, + "Hits": 32868, + "Misses": 16903, + "Active": false + }, + { + "Policy": 5, + "Hits": 32748, + "Misses": 17023, + "Active": false + }, + { + "Policy": 2, + "Hits": 28974, + "Misses": 20797, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.014666700499885832, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 25056, + "Misses": 14353, + "Active": false + }, + { + "Policy": 9, + "Hits": 24960, + "Misses": 14449, + "Active": false + }, + { + "Policy": 4, + "Hits": 24937, + "Misses": 14472, + "Active": false + }, + { + "Policy": 8, + "Hits": 24883, + "Misses": 14526, + "Active": false + }, + { + "Policy": 6, + "Hits": 24524, + "Misses": 14885, + "Active": false + }, + { + "Policy": 1, + "Hits": 24478, + "Misses": 14931, + "Active": true + }, + { + "Policy": 7, + "Hits": 22785, + "Misses": 16624, + "Active": false + }, + { + "Policy": 5, + "Hits": 22733, + "Misses": 16676, + "Active": false + }, + { + "Policy": 2, + "Hits": 19009, + "Misses": 20400, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010125123477115583, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 34149, + "Misses": 14443, + "Active": false + }, + { + "Policy": 4, + "Hits": 34079, + "Misses": 14513, + "Active": false + }, + { + "Policy": 9, + "Hits": 33997, + "Misses": 14595, + "Active": false + }, + { + "Policy": 8, + "Hits": 33908, + "Misses": 14684, + "Active": false + }, + { + "Policy": 1, + "Hits": 33657, + "Misses": 14935, + "Active": true + }, + { + "Policy": 6, + "Hits": 33639, + "Misses": 14953, + "Active": false + }, + { + "Policy": 7, + "Hits": 31912, + "Misses": 16680, + "Active": false + }, + { + "Policy": 5, + "Hits": 31692, + "Misses": 16900, + "Active": false + }, + { + "Policy": 2, + "Hits": 26919, + "Misses": 21673, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011841541755888696, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32183, + "Misses": 14517, + "Active": false + }, + { + "Policy": 4, + "Hits": 32006, + "Misses": 14694, + "Active": false + }, + { + "Policy": 8, + "Hits": 31935, + "Misses": 14765, + "Active": false + }, + { + "Policy": 9, + "Hits": 31868, + "Misses": 14832, + "Active": false + }, + { + "Policy": 1, + "Hits": 31630, + "Misses": 15070, + "Active": true + }, + { + "Policy": 6, + "Hits": 31598, + "Misses": 15102, + "Active": false + }, + { + "Policy": 7, + "Hits": 29845, + "Misses": 16855, + "Active": false + }, + { + "Policy": 5, + "Hits": 29628, + "Misses": 17072, + "Active": false + }, + { + "Policy": 2, + "Hits": 25967, + "Misses": 20733, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010278630552209234, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 37229, + "Misses": 14237, + "Active": false + }, + { + "Policy": 4, + "Hits": 37172, + "Misses": 14294, + "Active": false + }, + { + "Policy": 9, + "Hits": 37095, + "Misses": 14371, + "Active": false + }, + { + "Policy": 8, + "Hits": 37002, + "Misses": 14464, + "Active": false + }, + { + "Policy": 6, + "Hits": 36798, + "Misses": 14668, + "Active": false + }, + { + "Policy": 1, + "Hits": 36700, + "Misses": 14766, + "Active": true + }, + { + "Policy": 7, + "Hits": 35069, + "Misses": 16397, + "Active": false + }, + { + "Policy": 5, + "Hits": 34944, + "Misses": 16522, + "Active": false + }, + { + "Policy": 2, + "Hits": 30104, + "Misses": 21362, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 415260, + "sieve_hits": 619036, + "fifo_hits": 584567, + "different_lfu_sieve_decisions": 230770, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "meta_kvcache_202206_1", + "source": "Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206)", + "requests": 2000000, + "distinct_keys": 340723, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.15679999999999 + ] + }, + "ARC": { + "runs": [ + 68.2667 + ] + }, + "LFU": { + "runs": [ + 66.86565 + ] + }, + "LRU": { + "runs": [ + 66.389 + ] + }, + "Random": { + "runs": [ + 65.1868, + 65.1848, + 65.1765, + 65.1882, + 65.17150000000001 + ] + }, + "S3-FIFO": { + "runs": [ + 69.05425 + ] + }, + "SIEVE": { + "runs": [ + 68.92399999999999 + ] + }, + "TTL": { + "runs": [ + 66.389 + ] + }, + "W-TinyLFU": { + "runs": [ + 68.52544999999999, + 68.31415, + 68.51155, + 68.49515000000001, + 68.53139999999999 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 67.96015, + 67.9432, + 68.10955, + 68.03555, + 67.95225 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 67.77875, + 67.53635, + 67.56689999999999, + 67.4825, + 67.6261 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 66.97035, + 66.84259999999999, + 66.88705, + 66.86245, + 66.8175 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0379887484064142, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 54912, + "Misses": 30587, + "Active": false + }, + { + "Policy": 8, + "Hits": 54264, + "Misses": 31235, + "Active": false + }, + { + "Policy": 9, + "Hits": 54209, + "Misses": 31290, + "Active": false + }, + { + "Policy": 4, + "Hits": 53491, + "Misses": 32008, + "Active": false + }, + { + "Policy": 3, + "Hits": 53486, + "Misses": 32013, + "Active": false + }, + { + "Policy": 2, + "Hits": 53406, + "Misses": 32093, + "Active": false + }, + { + "Policy": 6, + "Hits": 51704, + "Misses": 33795, + "Active": false + }, + { + "Policy": 1, + "Hits": 51664, + "Misses": 33835, + "Active": true + }, + { + "Policy": 5, + "Hits": 50503, + "Misses": 34996, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.047505236586282806, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 44061, + "Misses": 30415, + "Active": false + }, + { + "Policy": 8, + "Hits": 43470, + "Misses": 31006, + "Active": false + }, + { + "Policy": 9, + "Hits": 43388, + "Misses": 31088, + "Active": false + }, + { + "Policy": 3, + "Hits": 42612, + "Misses": 31864, + "Active": false + }, + { + "Policy": 2, + "Hits": 42580, + "Misses": 31896, + "Active": false + }, + { + "Policy": 4, + "Hits": 42559, + "Misses": 31917, + "Active": false + }, + { + "Policy": 6, + "Hits": 40563, + "Misses": 33913, + "Active": false + }, + { + "Policy": 1, + "Hits": 40523, + "Misses": 33953, + "Active": true + }, + { + "Policy": 5, + "Hits": 39413, + "Misses": 35063, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.033245494329678604, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 54102, + "Misses": 30902, + "Active": false + }, + { + "Policy": 8, + "Hits": 53688, + "Misses": 31316, + "Active": false + }, + { + "Policy": 9, + "Hits": 53657, + "Misses": 31347, + "Active": false + }, + { + "Policy": 4, + "Hits": 52985, + "Misses": 32019, + "Active": false + }, + { + "Policy": 3, + "Hits": 52983, + "Misses": 32021, + "Active": false + }, + { + "Policy": 2, + "Hits": 52785, + "Misses": 32219, + "Active": false + }, + { + "Policy": 6, + "Hits": 51312, + "Misses": 33692, + "Active": false + }, + { + "Policy": 1, + "Hits": 51276, + "Misses": 33728, + "Active": true + }, + { + "Policy": 5, + "Hits": 49814, + "Misses": 35190, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02663216400177215, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 68493, + "Misses": 30823, + "Active": false + }, + { + "Policy": 8, + "Hits": 68236, + "Misses": 31080, + "Active": false + }, + { + "Policy": 9, + "Hits": 68193, + "Misses": 31123, + "Active": false + }, + { + "Policy": 3, + "Hits": 67478, + "Misses": 31838, + "Active": false + }, + { + "Policy": 4, + "Hits": 67421, + "Misses": 31895, + "Active": false + }, + { + "Policy": 2, + "Hits": 67360, + "Misses": 31956, + "Active": false + }, + { + "Policy": 6, + "Hits": 65925, + "Misses": 33391, + "Active": false + }, + { + "Policy": 1, + "Hits": 65848, + "Misses": 33468, + "Active": true + }, + { + "Policy": 5, + "Hits": 64628, + "Misses": 34688, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.026871383323580522, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 77022, + "Misses": 30639, + "Active": false + }, + { + "Policy": 8, + "Hits": 76710, + "Misses": 30951, + "Active": false + }, + { + "Policy": 9, + "Hits": 76702, + "Misses": 30959, + "Active": false + }, + { + "Policy": 3, + "Hits": 76018, + "Misses": 31643, + "Active": false + }, + { + "Policy": 4, + "Hits": 76010, + "Misses": 31651, + "Active": false + }, + { + "Policy": 2, + "Hits": 75808, + "Misses": 31853, + "Active": false + }, + { + "Policy": 6, + "Hits": 74179, + "Misses": 33482, + "Active": false + }, + { + "Policy": 1, + "Hits": 74129, + "Misses": 33532, + "Active": true + }, + { + "Policy": 5, + "Hits": 72934, + "Misses": 34727, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 1337313, + "sieve_hits": 1378480, + "fifo_hits": 1313815, + "different_lfu_sieve_decisions": 130305, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_hm_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 818034, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 17.0071 + ] + }, + "ARC": { + "runs": [ + 16.64985 + ] + }, + "LFU": { + "runs": [ + 14.9886 + ] + }, + "LRU": { + "runs": [ + 11.397350000000001 + ] + }, + "Random": { + "runs": [ + 12.618199999999998, + 12.61635, + 12.62865, + 12.62165, + 12.63555 + ] + }, + "S3-FIFO": { + "runs": [ + 15.8427 + ] + }, + "SIEVE": { + "runs": [ + 15.187249999999999 + ] + }, + "TTL": { + "runs": [ + 11.397350000000001 + ] + }, + "W-TinyLFU": { + "runs": [ + 15.851799999999999, + 16.25415, + 15.808050000000001, + 16.3279, + 16.1858 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 15.58835, + 14.3127, + 15.13085, + 15.489700000000001, + 12.53265 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 13.57805, + 12.8882, + 14.410899999999998, + 13.0345, + 14.355550000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 13.901150000000001, + 15.65325, + 15.902450000000002, + 14.189850000000002, + 14.3657 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05708595748122239, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 15666, + "Misses": 83255, + "Active": false + }, + { + "Policy": 4, + "Hits": 15294, + "Misses": 83627, + "Active": false + }, + { + "Policy": 8, + "Hits": 14402, + "Misses": 84519, + "Active": false + }, + { + "Policy": 7, + "Hits": 14324, + "Misses": 84597, + "Active": false + }, + { + "Policy": 2, + "Hits": 13533, + "Misses": 85388, + "Active": false + }, + { + "Policy": 9, + "Hits": 12453, + "Misses": 86468, + "Active": false + }, + { + "Policy": 5, + "Hits": 11140, + "Misses": 87781, + "Active": false + }, + { + "Policy": 1, + "Hits": 10019, + "Misses": 88902, + "Active": true + }, + { + "Policy": 6, + "Hits": 10001, + "Misses": 88920, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.055903575440478484, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 16580, + "Misses": 82233, + "Active": false + }, + { + "Policy": 3, + "Hits": 16399, + "Misses": 82414, + "Active": false + }, + { + "Policy": 4, + "Hits": 16057, + "Misses": 82756, + "Active": false + }, + { + "Policy": 8, + "Hits": 15438, + "Misses": 83375, + "Active": false + }, + { + "Policy": 2, + "Hits": 14715, + "Misses": 84098, + "Active": false + }, + { + "Policy": 9, + "Hits": 14422, + "Misses": 84391, + "Active": false + }, + { + "Policy": 5, + "Hits": 12354, + "Misses": 86459, + "Active": false + }, + { + "Policy": 6, + "Hits": 11061, + "Misses": 87752, + "Active": false + }, + { + "Policy": 1, + "Hits": 11056, + "Misses": 87757, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.057784339680276964, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 16515, + "Misses": 81695, + "Active": false + }, + { + "Policy": 7, + "Hits": 16358, + "Misses": 81852, + "Active": false + }, + { + "Policy": 4, + "Hits": 16281, + "Misses": 81929, + "Active": false + }, + { + "Policy": 8, + "Hits": 15324, + "Misses": 82886, + "Active": false + }, + { + "Policy": 2, + "Hits": 15279, + "Misses": 82931, + "Active": false + }, + { + "Policy": 9, + "Hits": 14252, + "Misses": 83958, + "Active": false + }, + { + "Policy": 5, + "Hits": 12187, + "Misses": 86023, + "Active": false + }, + { + "Policy": 6, + "Hits": 10907, + "Misses": 87303, + "Active": false + }, + { + "Policy": 1, + "Hits": 10840, + "Misses": 87370, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.058537228379351255, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 16434, + "Misses": 82187, + "Active": false + }, + { + "Policy": 4, + "Hits": 16108, + "Misses": 82513, + "Active": false + }, + { + "Policy": 7, + "Hits": 15874, + "Misses": 82747, + "Active": false + }, + { + "Policy": 2, + "Hits": 14968, + "Misses": 83653, + "Active": false + }, + { + "Policy": 8, + "Hits": 14966, + "Misses": 83655, + "Active": false + }, + { + "Policy": 9, + "Hits": 13447, + "Misses": 85174, + "Active": false + }, + { + "Policy": 5, + "Hits": 12028, + "Misses": 86593, + "Active": false + }, + { + "Policy": 6, + "Hits": 10720, + "Misses": 87901, + "Active": false + }, + { + "Policy": 1, + "Hits": 10661, + "Misses": 87960, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05739375882076213, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 18583, + "Misses": 83449, + "Active": false + }, + { + "Policy": 3, + "Hits": 18183, + "Misses": 83849, + "Active": false + }, + { + "Policy": 4, + "Hits": 18058, + "Misses": 83974, + "Active": false + }, + { + "Policy": 8, + "Hits": 17190, + "Misses": 84842, + "Active": false + }, + { + "Policy": 2, + "Hits": 16503, + "Misses": 85529, + "Active": false + }, + { + "Policy": 9, + "Hits": 15372, + "Misses": 86660, + "Active": false + }, + { + "Policy": 5, + "Hits": 13831, + "Misses": 88201, + "Active": false + }, + { + "Policy": 1, + "Hits": 12727, + "Misses": 89305, + "Active": true + }, + { + "Policy": 6, + "Hits": 12618, + "Misses": 89414, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 299772, + "sieve_hits": 303745, + "fifo_hits": 228175, + "different_lfu_sieve_decisions": 34189, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_prn_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1900653, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.03775 + ] + }, + "ARC": { + "runs": [ + 1.02225 + ] + }, + "LFU": { + "runs": [ + 1.05595 + ] + }, + "LRU": { + "runs": [ + 1.0038 + ] + }, + "Random": { + "runs": [ + 0.9424999999999999, + 0.94815, + 0.9467, + 0.94555, + 0.9466 + ] + }, + "S3-FIFO": { + "runs": [ + 1.008 + ] + }, + "SIEVE": { + "runs": [ + 1.05595 + ] + }, + "TTL": { + "runs": [ + 1.0038 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.78225, + 0.66565, + 0.7807, + 0.7156, + 0.74005 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 0.8684499999999999, + 0.86675, + 0.8382499999999999, + 0.86765, + 0.8685 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 0.72305, + 0.7104, + 0.84765, + 0.70195, + 0.83815 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.0795000000000001, + 0.9756, + 1.04515, + 1.0838, + 1.0828 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000523823914576409, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 968, + "Misses": 98302, + "Active": false + }, + { + "Policy": 9, + "Hits": 968, + "Misses": 98302, + "Active": false + }, + { + "Policy": 3, + "Hits": 954, + "Misses": 98316, + "Active": false + }, + { + "Policy": 4, + "Hits": 946, + "Misses": 98324, + "Active": false + }, + { + "Policy": 8, + "Hits": 929, + "Misses": 98341, + "Active": false + }, + { + "Policy": 6, + "Hits": 921, + "Misses": 98349, + "Active": false + }, + { + "Policy": 1, + "Hits": 916, + "Misses": 98354, + "Active": true + }, + { + "Policy": 5, + "Hits": 862, + "Misses": 98408, + "Active": false + }, + { + "Policy": 7, + "Hits": 575, + "Misses": 98695, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004016386858382206, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 861, + "Misses": 98731, + "Active": false + }, + { + "Policy": 9, + "Hits": 861, + "Misses": 98731, + "Active": false + }, + { + "Policy": 3, + "Hits": 852, + "Misses": 98740, + "Active": false + }, + { + "Policy": 4, + "Hits": 848, + "Misses": 98744, + "Active": false + }, + { + "Policy": 8, + "Hits": 828, + "Misses": 98764, + "Active": false + }, + { + "Policy": 1, + "Hits": 821, + "Misses": 98771, + "Active": true + }, + { + "Policy": 6, + "Hits": 819, + "Misses": 98773, + "Active": false + }, + { + "Policy": 5, + "Hits": 753, + "Misses": 98839, + "Active": false + }, + { + "Policy": 7, + "Hits": 585, + "Misses": 99007, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004894420360788704, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1296, + "Misses": 98818, + "Active": false + }, + { + "Policy": 9, + "Hits": 1296, + "Misses": 98818, + "Active": false + }, + { + "Policy": 3, + "Hits": 1285, + "Misses": 98829, + "Active": false + }, + { + "Policy": 4, + "Hits": 1269, + "Misses": 98845, + "Active": false + }, + { + "Policy": 6, + "Hits": 1250, + "Misses": 98864, + "Active": false + }, + { + "Policy": 1, + "Hits": 1247, + "Misses": 98867, + "Active": true + }, + { + "Policy": 8, + "Hits": 1247, + "Misses": 98867, + "Active": false + }, + { + "Policy": 5, + "Hits": 1183, + "Misses": 98931, + "Active": false + }, + { + "Policy": 7, + "Hits": 889, + "Misses": 99225, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005552085502116728, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1029, + "Misses": 99834, + "Active": false + }, + { + "Policy": 9, + "Hits": 1029, + "Misses": 99834, + "Active": false + }, + { + "Policy": 3, + "Hits": 1014, + "Misses": 99849, + "Active": false + }, + { + "Policy": 4, + "Hits": 1002, + "Misses": 99861, + "Active": false + }, + { + "Policy": 8, + "Hits": 985, + "Misses": 99878, + "Active": false + }, + { + "Policy": 1, + "Hits": 973, + "Misses": 99890, + "Active": true + }, + { + "Policy": 6, + "Hits": 973, + "Misses": 99890, + "Active": false + }, + { + "Policy": 5, + "Hits": 909, + "Misses": 99954, + "Active": false + }, + { + "Policy": 7, + "Hits": 547, + "Misses": 100316, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004388414585494282, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1456, + "Misses": 98808, + "Active": false + }, + { + "Policy": 9, + "Hits": 1456, + "Misses": 98808, + "Active": false + }, + { + "Policy": 3, + "Hits": 1439, + "Misses": 98825, + "Active": false + }, + { + "Policy": 4, + "Hits": 1432, + "Misses": 98832, + "Active": false + }, + { + "Policy": 8, + "Hits": 1419, + "Misses": 98845, + "Active": false + }, + { + "Policy": 1, + "Hits": 1412, + "Misses": 98852, + "Active": true + }, + { + "Policy": 6, + "Hits": 1412, + "Misses": 98852, + "Active": false + }, + { + "Policy": 5, + "Hits": 1343, + "Misses": 98921, + "Active": false + }, + { + "Policy": 7, + "Hits": 969, + "Misses": 99295, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 21119, + "sieve_hits": 21119, + "fifo_hits": 20052, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_proj_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1748195, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 5.38475 + ] + }, + "ARC": { + "runs": [ + 5.38475 + ] + }, + "LFU": { + "runs": [ + 4.72735 + ] + }, + "LRU": { + "runs": [ + 5.3511999999999995 + ] + }, + "Random": { + "runs": [ + 5.2073, + 5.2099, + 5.2011, + 5.2105, + 5.2063 + ] + }, + "S3-FIFO": { + "runs": [ + 5.7946 + ] + }, + "SIEVE": { + "runs": [ + 4.72735 + ] + }, + "TTL": { + "runs": [ + 5.3511999999999995 + ] + }, + "W-TinyLFU": { + "runs": [ + 4.15115, + 4.2851, + 4.125249999999999, + 5.03775, + 5.06415 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 5.138199999999999, + 5.13235, + 5.3511999999999995, + 5.1352, + 5.1328 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 5.13975, + 5.098, + 5.079750000000001, + 5.183800000000001, + 5.0964 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 5.3634, + 5.3869, + 5.38535, + 5.4166, + 5.52585 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004913931444177538, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6217, + "Misses": 94110, + "Active": false + }, + { + "Policy": 7, + "Hits": 5992, + "Misses": 94335, + "Active": false + }, + { + "Policy": 3, + "Hits": 5769, + "Misses": 94558, + "Active": false + }, + { + "Policy": 6, + "Hits": 5765, + "Misses": 94562, + "Active": false + }, + { + "Policy": 4, + "Hits": 5756, + "Misses": 94571, + "Active": false + }, + { + "Policy": 1, + "Hits": 5724, + "Misses": 94603, + "Active": true + }, + { + "Policy": 5, + "Hits": 5610, + "Misses": 94717, + "Active": false + }, + { + "Policy": 9, + "Hits": 5401, + "Misses": 94926, + "Active": false + }, + { + "Policy": 2, + "Hits": 5079, + "Misses": 95248, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.00700271657108361, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5800, + "Misses": 93590, + "Active": false + }, + { + "Policy": 8, + "Hits": 5709, + "Misses": 93681, + "Active": false + }, + { + "Policy": 6, + "Hits": 5356, + "Misses": 94034, + "Active": false + }, + { + "Policy": 3, + "Hits": 5113, + "Misses": 94277, + "Active": false + }, + { + "Policy": 4, + "Hits": 5113, + "Misses": 94277, + "Active": false + }, + { + "Policy": 1, + "Hits": 5104, + "Misses": 94286, + "Active": true + }, + { + "Policy": 5, + "Hits": 5012, + "Misses": 94378, + "Active": false + }, + { + "Policy": 9, + "Hits": 4886, + "Misses": 94504, + "Active": false + }, + { + "Policy": 2, + "Hits": 4446, + "Misses": 94944, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.006525742653535109, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5794, + "Misses": 94118, + "Active": false + }, + { + "Policy": 8, + "Hits": 5635, + "Misses": 94277, + "Active": false + }, + { + "Policy": 6, + "Hits": 5165, + "Misses": 94747, + "Active": false + }, + { + "Policy": 3, + "Hits": 5163, + "Misses": 94749, + "Active": false + }, + { + "Policy": 4, + "Hits": 5143, + "Misses": 94769, + "Active": false + }, + { + "Policy": 1, + "Hits": 5142, + "Misses": 94770, + "Active": true + }, + { + "Policy": 5, + "Hits": 4990, + "Misses": 94922, + "Active": false + }, + { + "Policy": 9, + "Hits": 4898, + "Misses": 95014, + "Active": false + }, + { + "Policy": 2, + "Hits": 4456, + "Misses": 95456, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0063627471740730634, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5368, + "Misses": 93803, + "Active": false + }, + { + "Policy": 6, + "Hits": 4890, + "Misses": 94281, + "Active": false + }, + { + "Policy": 3, + "Hits": 4809, + "Misses": 94362, + "Active": false + }, + { + "Policy": 4, + "Hits": 4752, + "Misses": 94419, + "Active": false + }, + { + "Policy": 1, + "Hits": 4737, + "Misses": 94434, + "Active": true + }, + { + "Policy": 5, + "Hits": 4678, + "Misses": 94493, + "Active": false + }, + { + "Policy": 9, + "Hits": 4613, + "Misses": 94558, + "Active": false + }, + { + "Policy": 7, + "Hits": 4494, + "Misses": 94677, + "Active": false + }, + { + "Policy": 2, + "Hits": 4100, + "Misses": 95071, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0052464023960885064, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6572, + "Misses": 94259, + "Active": false + }, + { + "Policy": 7, + "Hits": 6213, + "Misses": 94618, + "Active": false + }, + { + "Policy": 4, + "Hits": 6096, + "Misses": 94735, + "Active": false + }, + { + "Policy": 3, + "Hits": 6094, + "Misses": 94737, + "Active": false + }, + { + "Policy": 1, + "Hits": 6043, + "Misses": 94788, + "Active": true + }, + { + "Policy": 6, + "Hits": 5999, + "Misses": 94832, + "Active": false + }, + { + "Policy": 5, + "Hits": 5909, + "Misses": 94922, + "Active": false + }, + { + "Policy": 9, + "Hits": 5874, + "Misses": 94957, + "Active": false + }, + { + "Policy": 2, + "Hits": 5547, + "Misses": 95284, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 94547, + "sieve_hits": 94547, + "fifo_hits": 102774, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_src1_2", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1947636, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.7661 + ] + }, + "ARC": { + "runs": [ + 1.72685 + ] + }, + "LFU": { + "runs": [ + 1.4181 + ] + }, + "LRU": { + "runs": [ + 1.7021499999999998 + ] + }, + "Random": { + "runs": [ + 1.6344999999999998, + 1.6358000000000001, + 1.6336, + 1.6329, + 1.6320999999999999 + ] + }, + "S3-FIFO": { + "runs": [ + 1.7013500000000001 + ] + }, + "SIEVE": { + "runs": [ + 1.4181 + ] + }, + "TTL": { + "runs": [ + 1.7021499999999998 + ] + }, + "W-TinyLFU": { + "runs": [ + 1.1889, + 1.1714499999999999, + 0.9353, + 1.1518000000000002, + 1.1813 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.7013500000000001, + 1.701, + 1.7007499999999998, + 1.25855, + 1.4647999999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005694817715878528, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1619, + "Misses": 98472, + "Active": false + }, + { + "Policy": 4, + "Hits": 1571, + "Misses": 98520, + "Active": false + }, + { + "Policy": 8, + "Hits": 1564, + "Misses": 98527, + "Active": false + }, + { + "Policy": 1, + "Hits": 1562, + "Misses": 98529, + "Active": true + }, + { + "Policy": 6, + "Hits": 1562, + "Misses": 98529, + "Active": false + }, + { + "Policy": 9, + "Hits": 1551, + "Misses": 98540, + "Active": false + }, + { + "Policy": 5, + "Hits": 1502, + "Misses": 98589, + "Active": false + }, + { + "Policy": 2, + "Hits": 1314, + "Misses": 98777, + "Active": false + }, + { + "Policy": 7, + "Hits": 798, + "Misses": 99293, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006215289612446634, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1713, + "Misses": 98041, + "Active": false + }, + { + "Policy": 4, + "Hits": 1673, + "Misses": 98081, + "Active": false + }, + { + "Policy": 6, + "Hits": 1656, + "Misses": 98098, + "Active": false + }, + { + "Policy": 1, + "Hits": 1651, + "Misses": 98103, + "Active": true + }, + { + "Policy": 8, + "Hits": 1650, + "Misses": 98104, + "Active": false + }, + { + "Policy": 9, + "Hits": 1585, + "Misses": 98169, + "Active": false + }, + { + "Policy": 5, + "Hits": 1583, + "Misses": 98171, + "Active": false + }, + { + "Policy": 2, + "Hits": 1335, + "Misses": 98419, + "Active": false + }, + { + "Policy": 7, + "Hits": 1050, + "Misses": 98704, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005286993994772886, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1828, + "Misses": 98418, + "Active": false + }, + { + "Policy": 4, + "Hits": 1793, + "Misses": 98453, + "Active": false + }, + { + "Policy": 1, + "Hits": 1775, + "Misses": 98471, + "Active": true + }, + { + "Policy": 6, + "Hits": 1775, + "Misses": 98471, + "Active": false + }, + { + "Policy": 8, + "Hits": 1774, + "Misses": 98472, + "Active": false + }, + { + "Policy": 9, + "Hits": 1723, + "Misses": 98523, + "Active": false + }, + { + "Policy": 5, + "Hits": 1695, + "Misses": 98551, + "Active": false + }, + { + "Policy": 2, + "Hits": 1482, + "Misses": 98764, + "Active": false + }, + { + "Policy": 7, + "Hits": 1427, + "Misses": 98819, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005927205874966084, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1792, + "Misses": 97749, + "Active": false + }, + { + "Policy": 4, + "Hits": 1744, + "Misses": 97797, + "Active": false + }, + { + "Policy": 6, + "Hits": 1735, + "Misses": 97806, + "Active": false + }, + { + "Policy": 1, + "Hits": 1733, + "Misses": 97808, + "Active": true + }, + { + "Policy": 8, + "Hits": 1732, + "Misses": 97809, + "Active": false + }, + { + "Policy": 5, + "Hits": 1668, + "Misses": 97873, + "Active": false + }, + { + "Policy": 9, + "Hits": 1468, + "Misses": 98073, + "Active": false + }, + { + "Policy": 2, + "Hits": 1461, + "Misses": 98080, + "Active": false + }, + { + "Policy": 7, + "Hits": 1031, + "Misses": 98510, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006815607741728555, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1757, + "Misses": 98014, + "Active": false + }, + { + "Policy": 4, + "Hits": 1713, + "Misses": 98058, + "Active": false + }, + { + "Policy": 1, + "Hits": 1689, + "Misses": 98082, + "Active": true + }, + { + "Policy": 6, + "Hits": 1689, + "Misses": 98082, + "Active": false + }, + { + "Policy": 8, + "Hits": 1688, + "Misses": 98083, + "Active": false + }, + { + "Policy": 5, + "Hits": 1618, + "Misses": 98153, + "Active": false + }, + { + "Policy": 9, + "Hits": 1613, + "Misses": 98158, + "Active": false + }, + { + "Policy": 2, + "Hits": 1418, + "Misses": 98353, + "Active": false + }, + { + "Policy": 7, + "Hits": 1165, + "Misses": 98606, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 28362, + "sieve_hits": 28362, + "fifo_hits": 34051, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_usr_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1778953, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 3.5717499999999998 + ] + }, + "ARC": { + "runs": [ + 3.5526500000000003 + ] + }, + "LFU": { + "runs": [ + 1.4588 + ] + }, + "LRU": { + "runs": [ + 3.5715999999999997 + ] + }, + "Random": { + "runs": [ + 3.4941, + 3.4896499999999997, + 3.4965499999999996, + 3.5000999999999998, + 3.4866 + ] + }, + "S3-FIFO": { + "runs": [ + 3.5838 + ] + }, + "SIEVE": { + "runs": [ + 1.4588 + ] + }, + "TTL": { + "runs": [ + 3.5715999999999997 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.2304, + 2.9163, + 2.88505, + 2.8815, + 2.84835 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 2.9993499999999997 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 3.5027000000000004, + 3.5027999999999997, + 3.5027999999999997, + 3.5027999999999997, + 3.5027500000000003 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 3.4097500000000003, + 3.6380000000000003, + 3.6590499999999997, + 3.4097000000000004, + 3.41325 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 6, + "Improvement": 0.00030004200588082397, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 6, + "Hits": 3787, + "Misses": 96199, + "Active": false + }, + { + "Policy": 8, + "Hits": 3772, + "Misses": 96214, + "Active": false + }, + { + "Policy": 1, + "Hits": 3757, + "Misses": 96229, + "Active": true + }, + { + "Policy": 3, + "Hits": 3741, + "Misses": 96245, + "Active": false + }, + { + "Policy": 4, + "Hits": 3730, + "Misses": 96256, + "Active": false + }, + { + "Policy": 5, + "Hits": 3658, + "Misses": 96328, + "Active": false + }, + { + "Policy": 9, + "Hits": 3050, + "Misses": 96936, + "Active": false + }, + { + "Policy": 7, + "Hits": 2245, + "Misses": 97741, + "Active": false + }, + { + "Policy": 2, + "Hits": 1840, + "Misses": 98146, + "Active": false + } + ] + }, + "best_policy_name": "TTL", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.00023923444976076819, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3702, + "Misses": 96618, + "Active": false + }, + { + "Policy": 1, + "Hits": 3678, + "Misses": 96642, + "Active": true + }, + { + "Policy": 4, + "Hits": 3678, + "Misses": 96642, + "Active": false + }, + { + "Policy": 8, + "Hits": 3674, + "Misses": 96646, + "Active": false + }, + { + "Policy": 6, + "Hits": 3619, + "Misses": 96701, + "Active": false + }, + { + "Policy": 5, + "Hits": 3597, + "Misses": 96723, + "Active": false + }, + { + "Policy": 9, + "Hits": 3238, + "Misses": 97082, + "Active": false + }, + { + "Policy": 7, + "Hits": 2870, + "Misses": 97450, + "Active": false + }, + { + "Policy": 2, + "Hits": 1757, + "Misses": 98563, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0001295001295001305, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3481, + "Misses": 96905, + "Active": false + }, + { + "Policy": 6, + "Hits": 3477, + "Misses": 96909, + "Active": false + }, + { + "Policy": 1, + "Hits": 3468, + "Misses": 96918, + "Active": true + }, + { + "Policy": 3, + "Hits": 3448, + "Misses": 96938, + "Active": false + }, + { + "Policy": 4, + "Hits": 3430, + "Misses": 96956, + "Active": false + }, + { + "Policy": 5, + "Hits": 3369, + "Misses": 97017, + "Active": false + }, + { + "Policy": 9, + "Hits": 2942, + "Misses": 97444, + "Active": false + }, + { + "Policy": 7, + "Hits": 2842, + "Misses": 97544, + "Active": false + }, + { + "Policy": 2, + "Hits": 1618, + "Misses": 98768, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.000009935419771484044, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3990, + "Misses": 96660, + "Active": false + }, + { + "Policy": 1, + "Hits": 3989, + "Misses": 96661, + "Active": true + }, + { + "Policy": 8, + "Hits": 3988, + "Misses": 96662, + "Active": false + }, + { + "Policy": 4, + "Hits": 3957, + "Misses": 96693, + "Active": false + }, + { + "Policy": 6, + "Hits": 3946, + "Misses": 96704, + "Active": false + }, + { + "Policy": 5, + "Hits": 3872, + "Misses": 96778, + "Active": false + }, + { + "Policy": 9, + "Hits": 3453, + "Misses": 97197, + "Active": false + }, + { + "Policy": 7, + "Hits": 3326, + "Misses": 97324, + "Active": false + }, + { + "Policy": 2, + "Hits": 1959, + "Misses": 98691, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000059939461144242756, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3321, + "Misses": 96780, + "Active": false + }, + { + "Policy": 1, + "Hits": 3315, + "Misses": 96786, + "Active": true + }, + { + "Policy": 5, + "Hits": 3292, + "Misses": 96809, + "Active": false + }, + { + "Policy": 6, + "Hits": 3286, + "Misses": 96815, + "Active": false + }, + { + "Policy": 3, + "Hits": 3275, + "Misses": 96826, + "Active": false + }, + { + "Policy": 4, + "Hits": 3267, + "Misses": 96834, + "Active": false + }, + { + "Policy": 9, + "Hits": 2963, + "Misses": 97138, + "Active": false + }, + { + "Policy": 7, + "Hits": 2628, + "Misses": 97473, + "Active": false + }, + { + "Policy": 2, + "Hits": 1778, + "Misses": 98323, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 29176, + "sieve_hits": 29176, + "fifo_hits": 70272, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_web_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1855956, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 2.6100000000000003 + ] + }, + "ARC": { + "runs": [ + 2.6045 + ] + }, + "LFU": { + "runs": [ + 2.61025 + ] + }, + "LRU": { + "runs": [ + 2.2991 + ] + }, + "Random": { + "runs": [ + 2.5584, + 2.55875, + 2.5577, + 2.5569, + 2.5587 + ] + }, + "S3-FIFO": { + "runs": [ + 2.49225 + ] + }, + "SIEVE": { + "runs": [ + 2.61025 + ] + }, + "TTL": { + "runs": [ + 2.2991 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.27125, + 2.2561999999999998, + 2.30665, + 2.2537000000000003, + 2.2363999999999997 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 2.28555, + 2.28595, + 2.3472, + 2.3472, + 2.2818 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 2.4094, + 2.4059, + 2.4094, + 2.4082, + 2.4074999999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 2.40935, + 2.43825, + 2.44375, + 2.43215, + 2.4364500000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.003179412556187894, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2760, + "Misses": 97573, + "Active": false + }, + { + "Policy": 9, + "Hits": 2760, + "Misses": 97573, + "Active": false + }, + { + "Policy": 3, + "Hits": 2754, + "Misses": 97579, + "Active": false + }, + { + "Policy": 4, + "Hits": 2751, + "Misses": 97582, + "Active": false + }, + { + "Policy": 5, + "Hits": 2686, + "Misses": 97647, + "Active": false + }, + { + "Policy": 8, + "Hits": 2645, + "Misses": 97688, + "Active": false + }, + { + "Policy": 7, + "Hits": 2521, + "Misses": 97812, + "Active": false + }, + { + "Policy": 1, + "Hits": 2441, + "Misses": 97892, + "Active": true + }, + { + "Policy": 6, + "Hits": 2441, + "Misses": 97892, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0032157895265754848, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2482, + "Misses": 97027, + "Active": false + }, + { + "Policy": 9, + "Hits": 2482, + "Misses": 97027, + "Active": false + }, + { + "Policy": 3, + "Hits": 2471, + "Misses": 97038, + "Active": false + }, + { + "Policy": 4, + "Hits": 2466, + "Misses": 97043, + "Active": false + }, + { + "Policy": 5, + "Hits": 2398, + "Misses": 97111, + "Active": false + }, + { + "Policy": 8, + "Hits": 2337, + "Misses": 97172, + "Active": false + }, + { + "Policy": 7, + "Hits": 2326, + "Misses": 97183, + "Active": false + }, + { + "Policy": 6, + "Hits": 2169, + "Misses": 97340, + "Active": false + }, + { + "Policy": 1, + "Hits": 2162, + "Misses": 97347, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0029867444485510777, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 3, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 9, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 4, + "Hits": 2441, + "Misses": 97668, + "Active": false + }, + { + "Policy": 5, + "Hits": 2430, + "Misses": 97679, + "Active": false + }, + { + "Policy": 8, + "Hits": 2344, + "Misses": 97765, + "Active": false + }, + { + "Policy": 7, + "Hits": 2286, + "Misses": 97823, + "Active": false + }, + { + "Policy": 6, + "Hits": 2157, + "Misses": 97952, + "Active": false + }, + { + "Policy": 1, + "Hits": 2148, + "Misses": 97961, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.003071491967250716, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2544, + "Misses": 97733, + "Active": false + }, + { + "Policy": 2, + "Hits": 2540, + "Misses": 97737, + "Active": false + }, + { + "Policy": 9, + "Hits": 2540, + "Misses": 97737, + "Active": false + }, + { + "Policy": 4, + "Hits": 2537, + "Misses": 97740, + "Active": false + }, + { + "Policy": 5, + "Hits": 2483, + "Misses": 97794, + "Active": false + }, + { + "Policy": 8, + "Hits": 2438, + "Misses": 97839, + "Active": false + }, + { + "Policy": 7, + "Hits": 2330, + "Misses": 97947, + "Active": false + }, + { + "Policy": 1, + "Hits": 2236, + "Misses": 98041, + "Active": true + }, + { + "Policy": 6, + "Hits": 2226, + "Misses": 98051, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00293668154984867, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2616, + "Misses": 97497, + "Active": false + }, + { + "Policy": 9, + "Hits": 2616, + "Misses": 97497, + "Active": false + }, + { + "Policy": 3, + "Hits": 2606, + "Misses": 97507, + "Active": false + }, + { + "Policy": 4, + "Hits": 2604, + "Misses": 97509, + "Active": false + }, + { + "Policy": 5, + "Hits": 2569, + "Misses": 97544, + "Active": false + }, + { + "Policy": 8, + "Hits": 2497, + "Misses": 97616, + "Active": false + }, + { + "Policy": 7, + "Hits": 2413, + "Misses": 97700, + "Active": false + }, + { + "Policy": 6, + "Hits": 2335, + "Misses": 97778, + "Active": false + }, + { + "Policy": 1, + "Hits": 2322, + "Misses": 97791, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 52205, + "sieve_hits": 52205, + "fifo_hits": 45560, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + } + ], + "tree_modified": false +} diff --git a/bench/results/current/traces.json b/bench/results/current/traces.json new file mode 100644 index 0000000..d21c971 --- /dev/null +++ b/bench/results/current/traces.json @@ -0,0 +1,17542 @@ +{ + "bandit": "bandit.NewThompson(0.7, 13)", + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "cpus": 10, + "go": "go1.25.5", + "measured_at": "2026-10-06T23:50:45Z", + "platform": "darwin/arm64", + "settings": { + "epoch_mode": "requests", + "epochs_per_trace": [ + 10, + 20, + 50 + ], + "location": "adaptive[].settings and observe_only[].settings (actual constructor arguments)" + }, + "traces": [ + { + "trace": "twitter_cluster052.csv", + "source": "Twitter Twemcache production KV cache (OSDI '20)", + "requests": 1000000, + "distinct_keys": 255333, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 59.6242, + 59.6242, + 59.6242 + ] + }, + "ARC": { + "runs": [ + 58.9894, + 58.9894, + 58.9894 + ] + }, + "LFU": { + "runs": [ + 41.4436, + 41.4436, + 41.4436 + ] + }, + "LRU": { + "runs": [ + 58.391000000000005, + 58.391000000000005, + 58.391000000000005 + ] + }, + "Random": { + "runs": [ + 54.8261, + 54.795899999999996, + 54.7614, + 54.8164, + 54.806999999999995, + 54.7808, + 54.8032, + 54.8122, + 54.7918, + 54.8243, + 54.7709, + 54.7787, + 54.799699999999994, + 54.8037, + 54.8245 + ] + }, + "S3-FIFO": { + "runs": [ + 59.7291, + 59.7291, + 59.7291 + ] + }, + "SIEVE": { + "runs": [ + 59.785, + 59.785, + 59.785 + ] + }, + "TTL": { + "runs": [ + 58.391000000000005, + 58.391000000000005, + 58.391000000000005 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.480799999999995, + 58.7423, + 56.195499999999996, + 57.606500000000004, + 56.530800000000006, + 58.7597, + 58.70530000000001, + 57.458, + 58.67289999999999, + 57.4372, + 58.567499999999995, + 56.066, + 58.727, + 54.89619999999999, + 58.7426 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 58.69839999999999, + 58.755900000000004, + 58.67059999999999, + 58.684000000000005, + 58.687599999999996, + 59.0052, + 58.594500000000004, + 59.026999999999994, + 58.6843, + 58.6963, + 58.6715, + 58.6811, + 58.7152, + 58.6455, + 58.599599999999995 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 50000, + "hit_rate_percent": { + "runs": [ + 58.8106, + 58.802299999999995, + 58.9654, + 58.9469, + 58.8916, + 58.6107, + 58.7707, + 58.702799999999996, + 58.7948, + 58.805099999999996, + 58.7718, + 58.77830000000001, + 58.8639, + 58.925700000000006, + 58.7737 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 20000, + "hit_rate_percent": { + "runs": [ + 58.228500000000004, + 58.1962, + 58.2232, + 58.1781, + 58.1434, + 58.269800000000004, + 57.923899999999996, + 57.9916, + 58.263200000000005, + 58.129799999999996, + 58.065, + 58.1114, + 58.240899999999996, + 58.3461, + 58.1886 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 20000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.017247374643577507, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22736, + "Misses": 20401, + "Active": false + }, + { + "Policy": 9, + "Hits": 22680, + "Misses": 20457, + "Active": false + }, + { + "Policy": 8, + "Hits": 22565, + "Misses": 20572, + "Active": false + }, + { + "Policy": 3, + "Hits": 22553, + "Misses": 20584, + "Active": false + }, + { + "Policy": 4, + "Hits": 22307, + "Misses": 20830, + "Active": false + }, + { + "Policy": 1, + "Hits": 21992, + "Misses": 21145, + "Active": true + }, + { + "Policy": 6, + "Hits": 21965, + "Misses": 21172, + "Active": false + }, + { + "Policy": 5, + "Hits": 20391, + "Misses": 22746, + "Active": false + }, + { + "Policy": 2, + "Hits": 15918, + "Misses": 27219, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010907936270755925, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 33090, + "Misses": 20449, + "Active": false + }, + { + "Policy": 9, + "Hits": 33069, + "Misses": 20470, + "Active": false + }, + { + "Policy": 8, + "Hits": 33059, + "Misses": 20480, + "Active": false + }, + { + "Policy": 4, + "Hits": 32898, + "Misses": 20641, + "Active": false + }, + { + "Policy": 1, + "Hits": 32506, + "Misses": 21033, + "Active": true + }, + { + "Policy": 6, + "Hits": 32504, + "Misses": 21035, + "Active": false + }, + { + "Policy": 7, + "Hits": 32158, + "Misses": 21381, + "Active": false + }, + { + "Policy": 5, + "Hits": 30873, + "Misses": 22666, + "Active": false + }, + { + "Policy": 2, + "Hits": 26775, + "Misses": 26764, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020372846692362168, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 31502, + "Misses": 19350, + "Active": false + }, + { + "Policy": 8, + "Hits": 31153, + "Misses": 19699, + "Active": false + }, + { + "Policy": 9, + "Hits": 31129, + "Misses": 19723, + "Active": false + }, + { + "Policy": 3, + "Hits": 31122, + "Misses": 19730, + "Active": false + }, + { + "Policy": 4, + "Hits": 30922, + "Misses": 19930, + "Active": false + }, + { + "Policy": 6, + "Hits": 30533, + "Misses": 20319, + "Active": false + }, + { + "Policy": 1, + "Hits": 30466, + "Misses": 20386, + "Active": true + }, + { + "Policy": 5, + "Hits": 28979, + "Misses": 21873, + "Active": false + }, + { + "Policy": 2, + "Hits": 25177, + "Misses": 25675, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.013820401123322279, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 25223, + "Misses": 20000, + "Active": false + }, + { + "Policy": 8, + "Hits": 25174, + "Misses": 20049, + "Active": false + }, + { + "Policy": 7, + "Hits": 25145, + "Misses": 20078, + "Active": false + }, + { + "Policy": 3, + "Hits": 25130, + "Misses": 20093, + "Active": false + }, + { + "Policy": 4, + "Hits": 24940, + "Misses": 20283, + "Active": false + }, + { + "Policy": 6, + "Hits": 24631, + "Misses": 20592, + "Active": false + }, + { + "Policy": 1, + "Hits": 24598, + "Misses": 20625, + "Active": true + }, + { + "Policy": 5, + "Hits": 22912, + "Misses": 22311, + "Active": false + }, + { + "Policy": 2, + "Hits": 18665, + "Misses": 26558, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.022883622185477792, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29598, + "Misses": 19389, + "Active": false + }, + { + "Policy": 9, + "Hits": 29316, + "Misses": 19671, + "Active": false + }, + { + "Policy": 8, + "Hits": 29295, + "Misses": 19692, + "Active": false + }, + { + "Policy": 3, + "Hits": 29131, + "Misses": 19856, + "Active": false + }, + { + "Policy": 4, + "Hits": 28956, + "Misses": 20031, + "Active": false + }, + { + "Policy": 6, + "Hits": 28513, + "Misses": 20474, + "Active": false + }, + { + "Policy": 1, + "Hits": 28477, + "Misses": 20510, + "Active": true + }, + { + "Policy": 5, + "Hits": 26716, + "Misses": 22271, + "Active": false + }, + { + "Policy": 2, + "Hits": 22742, + "Misses": 26245, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02361059917270747, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29226, + "Misses": 19608, + "Active": false + }, + { + "Policy": 9, + "Hits": 28895, + "Misses": 19939, + "Active": false + }, + { + "Policy": 8, + "Hits": 28844, + "Misses": 19990, + "Active": false + }, + { + "Policy": 3, + "Hits": 28728, + "Misses": 20106, + "Active": false + }, + { + "Policy": 4, + "Hits": 28574, + "Misses": 20260, + "Active": false + }, + { + "Policy": 6, + "Hits": 28111, + "Misses": 20723, + "Active": false + }, + { + "Policy": 1, + "Hits": 28073, + "Misses": 20761, + "Active": true + }, + { + "Policy": 5, + "Hits": 26580, + "Misses": 22254, + "Active": false + }, + { + "Policy": 2, + "Hits": 22595, + "Misses": 26239, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.014898843642028314, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 30095, + "Misses": 19976, + "Active": false + }, + { + "Policy": 8, + "Hits": 29997, + "Misses": 20074, + "Active": false + }, + { + "Policy": 3, + "Hits": 29901, + "Misses": 20170, + "Active": false + }, + { + "Policy": 4, + "Hits": 29721, + "Misses": 20350, + "Active": false + }, + { + "Policy": 1, + "Hits": 29349, + "Misses": 20722, + "Active": true + }, + { + "Policy": 7, + "Hits": 29337, + "Misses": 20734, + "Active": false + }, + { + "Policy": 6, + "Hits": 29295, + "Misses": 20776, + "Active": false + }, + { + "Policy": 5, + "Hits": 27063, + "Misses": 23008, + "Active": false + }, + { + "Policy": 2, + "Hits": 23643, + "Misses": 26428, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.012787811939886984, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 38106, + "Misses": 19918, + "Active": false + }, + { + "Policy": 7, + "Hits": 38036, + "Misses": 19988, + "Active": false + }, + { + "Policy": 8, + "Hits": 37994, + "Misses": 20030, + "Active": false + }, + { + "Policy": 3, + "Hits": 37961, + "Misses": 20063, + "Active": false + }, + { + "Policy": 4, + "Hits": 37802, + "Misses": 20222, + "Active": false + }, + { + "Policy": 6, + "Hits": 37365, + "Misses": 20659, + "Active": false + }, + { + "Policy": 1, + "Hits": 37364, + "Misses": 20660, + "Active": true + }, + { + "Policy": 5, + "Hits": 35545, + "Misses": 22479, + "Active": false + }, + { + "Policy": 2, + "Hits": 31133, + "Misses": 26891, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.014563106796116498, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22393, + "Misses": 20043, + "Active": false + }, + { + "Policy": 9, + "Hits": 22385, + "Misses": 20051, + "Active": false + }, + { + "Policy": 3, + "Hits": 22316, + "Misses": 20120, + "Active": false + }, + { + "Policy": 8, + "Hits": 22214, + "Misses": 20222, + "Active": false + }, + { + "Policy": 4, + "Hits": 22034, + "Misses": 20402, + "Active": false + }, + { + "Policy": 6, + "Hits": 21839, + "Misses": 20597, + "Active": false + }, + { + "Policy": 1, + "Hits": 21775, + "Misses": 20661, + "Active": true + }, + { + "Policy": 5, + "Hits": 20342, + "Misses": 22094, + "Active": false + }, + { + "Policy": 2, + "Hits": 16030, + "Misses": 26406, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.017545990975355807, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 38096, + "Misses": 19524, + "Active": false + }, + { + "Policy": 9, + "Hits": 37751, + "Misses": 19869, + "Active": false + }, + { + "Policy": 3, + "Hits": 37688, + "Misses": 19932, + "Active": false + }, + { + "Policy": 8, + "Hits": 37617, + "Misses": 20003, + "Active": false + }, + { + "Policy": 4, + "Hits": 37539, + "Misses": 20081, + "Active": false + }, + { + "Policy": 6, + "Hits": 37139, + "Misses": 20481, + "Active": false + }, + { + "Policy": 1, + "Hits": 37085, + "Misses": 20535, + "Active": true + }, + { + "Policy": 5, + "Hits": 35370, + "Misses": 22250, + "Active": false + }, + { + "Policy": 2, + "Hits": 31420, + "Misses": 26200, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020825112894033104, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 25683, + "Misses": 19935, + "Active": false + }, + { + "Policy": 9, + "Hits": 25425, + "Misses": 20193, + "Active": false + }, + { + "Policy": 8, + "Hits": 25404, + "Misses": 20214, + "Active": false + }, + { + "Policy": 3, + "Hits": 25299, + "Misses": 20319, + "Active": false + }, + { + "Policy": 4, + "Hits": 25041, + "Misses": 20577, + "Active": false + }, + { + "Policy": 1, + "Hits": 24733, + "Misses": 20885, + "Active": true + }, + { + "Policy": 6, + "Hits": 24717, + "Misses": 20901, + "Active": false + }, + { + "Policy": 5, + "Hits": 22863, + "Misses": 22755, + "Active": false + }, + { + "Policy": 2, + "Hits": 19188, + "Misses": 26430, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.015846556380823662, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 27957, + "Misses": 19435, + "Active": false + }, + { + "Policy": 9, + "Hits": 27957, + "Misses": 19435, + "Active": false + }, + { + "Policy": 3, + "Hits": 27891, + "Misses": 19501, + "Active": false + }, + { + "Policy": 4, + "Hits": 27820, + "Misses": 19572, + "Active": false + }, + { + "Policy": 6, + "Hits": 27281, + "Misses": 20111, + "Active": false + }, + { + "Policy": 1, + "Hits": 27206, + "Misses": 20186, + "Active": true + }, + { + "Policy": 7, + "Hits": 26503, + "Misses": 20889, + "Active": false + }, + { + "Policy": 5, + "Hits": 25375, + "Misses": 22017, + "Active": false + }, + { + "Policy": 2, + "Hits": 22200, + "Misses": 25192, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 9, + "Improvement": 0.013512750541074592, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 9, + "Hits": 33157, + "Misses": 19978, + "Active": false + }, + { + "Policy": 8, + "Hits": 33116, + "Misses": 20019, + "Active": false + }, + { + "Policy": 7, + "Hits": 33087, + "Misses": 20048, + "Active": false + }, + { + "Policy": 3, + "Hits": 32999, + "Misses": 20136, + "Active": false + }, + { + "Policy": 4, + "Hits": 32739, + "Misses": 20396, + "Active": false + }, + { + "Policy": 6, + "Hits": 32480, + "Misses": 20655, + "Active": false + }, + { + "Policy": 1, + "Hits": 32439, + "Misses": 20696, + "Active": true + }, + { + "Policy": 5, + "Hits": 30882, + "Misses": 22253, + "Active": false + }, + { + "Policy": 2, + "Hits": 26483, + "Misses": 26652, + "Active": false + } + ] + }, + "best_policy_name": "SIEVE", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.020277676287906443, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 29316, + "Misses": 19950, + "Active": false + }, + { + "Policy": 8, + "Hits": 29026, + "Misses": 20240, + "Active": false + }, + { + "Policy": 9, + "Hits": 29018, + "Misses": 20248, + "Active": false + }, + { + "Policy": 3, + "Hits": 28968, + "Misses": 20298, + "Active": false + }, + { + "Policy": 4, + "Hits": 28691, + "Misses": 20575, + "Active": false + }, + { + "Policy": 1, + "Hits": 28317, + "Misses": 20949, + "Active": true + }, + { + "Policy": 6, + "Hits": 28307, + "Misses": 20959, + "Active": false + }, + { + "Policy": 5, + "Hits": 26549, + "Misses": 22717, + "Active": false + }, + { + "Policy": 2, + "Hits": 22906, + "Misses": 26360, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 58.391000000000005, + "epoch_requests": 50000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.018912641607811587, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 22567, + "Misses": 19627, + "Active": false + }, + { + "Policy": 3, + "Hits": 22392, + "Misses": 19802, + "Active": false + }, + { + "Policy": 9, + "Hits": 22380, + "Misses": 19814, + "Active": false + }, + { + "Policy": 8, + "Hits": 22355, + "Misses": 19839, + "Active": false + }, + { + "Policy": 4, + "Hits": 22199, + "Misses": 19995, + "Active": false + }, + { + "Policy": 6, + "Hits": 21872, + "Misses": 20322, + "Active": false + }, + { + "Policy": 1, + "Hits": 21769, + "Misses": 20425, + "Active": true + }, + { + "Policy": 5, + "Hits": 20515, + "Misses": 21679, + "Active": false + }, + { + "Policy": 2, + "Hits": 16116, + "Misses": 26078, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 50000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 414436, + "sieve_hits": 597850, + "fifo_hits": 555634, + "different_lfu_sieve_decisions": 216148, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_loop.trace", + "source": "LIRS loop: cyclic scan, adversarial for LRU (SIGMETRICS '02)", + "requests": 505500, + "distinct_keys": 1011, + "capacity": 500, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 0, + 0, + 0 + ] + }, + "ARC": { + "runs": [ + 0, + 0, + 0 + ] + }, + "LFU": { + "runs": [ + 0, + 0, + 0 + ] + }, + "LRU": { + "runs": [ + 0, + 0, + 0 + ] + }, + "Random": { + "runs": [ + 19.660336300692382, + 19.643719090009892, + 19.716122650840752, + 19.62650840751731, + 19.69475766567755, + 19.680909990108802, + 19.646290801186943, + 19.742433234421362, + 19.689020771513352, + 19.63580613254204, + 19.658753709198812, + 19.628882294757666, + 19.688229475766565, + 19.74480712166172, + 19.605736894164195 + ] + }, + "S3-FIFO": { + "runs": [ + 0, + 0, + 0 + ] + }, + "SIEVE": { + "runs": [ + 0, + 0, + 0 + ] + }, + "TTL": { + "runs": [ + 0, + 0, + 0 + ] + }, + "W-TinyLFU": { + "runs": [ + 50.18081107814045, + 53.574085064292774, + 52.09376854599407, + 51.44549950544016, + 59.76636993076162, + 50.725024727992086, + 49.256379821958454, + 52.865084075173094, + 49.1837784371909, + 49.16854599406528, + 42.387932739861526, + 45.61839762611276, + 46.2757665677547, + 45.96280909990109, + 45.7677546983185 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 50550, + "hit_rate_percent": { + "runs": [ + 39.74619188921859, + 35.814836795252226, + 37.44965380811078, + 39.897527200791295, + 40.486844708209695, + 68.77606330365974, + 72.9574678536103, + 57.54243323442137, + 67.19169139465876, + 41.80514342235411, + 40.64688427299703, + 41.81780415430267, + 40.673194856577645, + 40.054401582591495, + 40.877744807121665 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 50550, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 25275, + "hit_rate_percent": { + "runs": [ + 39.60079129574679, + 41.78120672601385, + 44.48803165182987, + 43.949357072205736, + 43.63422354104847, + 42.86172106824926, + 44.66607319485657, + 43.07893175074184, + 41.99861523244313, + 42.791691394658756, + 42.81167161226509, + 42.3457962413452, + 42.60217606330366, + 45.525618199802175, + 43.57962413452028 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 10110, + "hit_rate_percent": { + "runs": [ + 44.23996043521266, + 45.09060336300693, + 41.154698318496536, + 45.308209693372895, + 45.09238377843719, + 41.88387734915925, + 43.60118694362018, + 45.69416419386746, + 44.27200791295747, + 41.87734915924827, + 44.08189910979228, + 43.490405539070224, + 44.604352126607324, + 43.372106824925815, + 43.07537091988131 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10110, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.128 + } + ], + "effective_sample_rate": 0.128, + "observe_only": [ + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.378887417218543, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28606, + "Misses": 46894, + "Active": false + }, + { + "Policy": 5, + "Hits": 9488, + "Misses": 66012, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 75500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 75500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 75500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4346315789473684, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28903, + "Misses": 37597, + "Active": false + }, + { + "Policy": 5, + "Hits": 12102, + "Misses": 54398, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 66500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 66500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.49250819672131146, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30043, + "Misses": 30957, + "Active": false + }, + { + "Policy": 8, + "Hits": 21168, + "Misses": 39832, + "Active": false + }, + { + "Policy": 5, + "Hits": 14069, + "Misses": 46931, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 60968, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 61000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 61000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 61000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.413970802919708, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28357, + "Misses": 40143, + "Active": false + }, + { + "Policy": 5, + "Hits": 11396, + "Misses": 57104, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4556842105263158, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30303, + "Misses": 36197, + "Active": false + }, + { + "Policy": 5, + "Hits": 12025, + "Misses": 54475, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 66500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 66500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 66500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4585774647887324, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 32559, + "Misses": 38441, + "Active": false + }, + { + "Policy": 5, + "Hits": 10657, + "Misses": 60343, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 71000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 71000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.459390625, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29401, + "Misses": 34599, + "Active": false + }, + { + "Policy": 5, + "Hits": 12908, + "Misses": 51092, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 63968, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 64000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 64000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 64000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.41570422535211266, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29515, + "Misses": 41485, + "Active": false + }, + { + "Policy": 5, + "Hits": 10711, + "Misses": 60289, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 71000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 71000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 71000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.47114074074074075, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 31802, + "Misses": 35698, + "Active": false + }, + { + "Policy": 5, + "Hits": 11743, + "Misses": 55757, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 67500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 67500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4615114503816794, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30229, + "Misses": 35271, + "Active": false + }, + { + "Policy": 5, + "Hits": 12412, + "Misses": 53088, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 65500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 65500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 65500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.40016216216216216, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29612, + "Misses": 44388, + "Active": false + }, + { + "Policy": 5, + "Hits": 9947, + "Misses": 64053, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 74000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 74000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 74000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.5062479338842976, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 30628, + "Misses": 29872, + "Active": false + }, + { + "Policy": 8, + "Hits": 21230, + "Misses": 39270, + "Active": false + }, + { + "Policy": 5, + "Hits": 14208, + "Misses": 46292, + "Active": false + }, + { + "Policy": 4, + "Hits": 32, + "Misses": 60468, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 60500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 60500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 60500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.42320588235294115, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28778, + "Misses": 39222, + "Active": false + }, + { + "Policy": 5, + "Hits": 11598, + "Misses": 56402, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4263529411764706, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 28992, + "Misses": 39008, + "Active": false + }, + { + "Policy": 5, + "Hits": 11492, + "Misses": 56508, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 68000, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 68000, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 68000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 0, + "epoch_requests": 25275, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.4298518518518519, + "Sampled": true, + "SampleRate": 0.128, + "Reports": [ + { + "Policy": 7, + "Hits": 29015, + "Misses": 38485, + "Active": false + }, + { + "Policy": 5, + "Hits": 11781, + "Misses": 55719, + "Active": false + }, + { + "Policy": 1, + "Hits": 0, + "Misses": 67500, + "Active": true + }, + { + "Policy": 2, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 3, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 4, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 6, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 8, + "Hits": 0, + "Misses": 67500, + "Active": false + }, + { + "Policy": 9, + "Hits": 0, + "Misses": 67500, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 25275, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 0, + "sieve_hits": 0, + "fifo_hits": 0, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "lirs_2_pools.trace", + "source": "LIRS 2_pools: two interleaved pools with different locality", + "requests": 100000, + "distinct_keys": 9939, + "capacity": 1000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 54.397, + 54.397, + 54.397 + ] + }, + "ARC": { + "runs": [ + 54.37499999999999, + 54.37499999999999, + 54.37499999999999 + ] + }, + "LFU": { + "runs": [ + 54.361000000000004, + 54.361000000000004, + 54.361000000000004 + ] + }, + "LRU": { + "runs": [ + 54.415, + 54.415, + 54.415 + ] + }, + "Random": { + "runs": [ + 49.999, + 49.952000000000005, + 49.875, + 49.901, + 49.952999999999996, + 50.044, + 49.773, + 49.958000000000006, + 49.922, + 49.922, + 49.885000000000005, + 49.984, + 50.054, + 50.037, + 49.999 + ] + }, + "S3-FIFO": { + "runs": [ + 54.37, + 54.37, + 54.37 + ] + }, + "SIEVE": { + "runs": [ + 54.361000000000004, + 54.361000000000004, + 54.361000000000004 + ] + }, + "TTL": { + "runs": [ + 54.415, + 54.415, + 54.415 + ] + }, + "W-TinyLFU": { + "runs": [ + 54.593, + 54.879999999999995, + 54.588, + 54.596999999999994, + 55.11000000000001, + 54.778999999999996, + 54.979, + 54.655, + 54.842999999999996, + 55.858, + 54.846, + 54.767999999999994, + 54.95100000000001, + 54.773, + 54.652 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 10000, + "hit_rate_percent": { + "runs": [ + 54.419, + 54.416, + 54.407000000000004, + 54.403999999999996, + 54.425999999999995, + 54.403, + 54.388999999999996, + 54.413999999999994, + 54.381, + 54.401999999999994, + 54.429, + 54.407000000000004, + 54.417, + 54.416, + 54.391999999999996 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 10000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 5000, + "hit_rate_percent": { + "runs": [ + 54.37499999999999, + 54.690000000000005, + 54.413999999999994, + 54.429, + 54.376999999999995, + 54.413999999999994, + 54.399, + 54.225, + 54.416, + 54.400000000000006, + 54.398, + 54.403999999999996, + 54.403, + 54.399, + 54.406 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 2000, + "hit_rate_percent": { + "runs": [ + 54.159, + 54.187, + 54.217999999999996, + 54.178000000000004, + 54.282, + 54.248, + 54.242000000000004, + 54.181000000000004, + 54.221, + 54.278000000000006, + 54.233, + 54.275, + 54.24, + 54.190000000000005, + 54.261 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 2000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.064 + } + ], + "effective_sample_rate": 0.064, + "observe_only": [ + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.004181184668989535, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 2857, + "Misses": 2883, + "Active": false + }, + { + "Policy": 6, + "Hits": 2840, + "Misses": 2900, + "Active": false + }, + { + "Policy": 1, + "Hits": 2833, + "Misses": 2907, + "Active": true + }, + { + "Policy": 4, + "Hits": 2817, + "Misses": 2923, + "Active": false + }, + { + "Policy": 8, + "Hits": 2813, + "Misses": 2927, + "Active": false + }, + { + "Policy": 9, + "Hits": 2812, + "Misses": 2928, + "Active": false + }, + { + "Policy": 2, + "Hits": 2805, + "Misses": 2935, + "Active": false + }, + { + "Policy": 3, + "Hits": 2805, + "Misses": 2935, + "Active": false + }, + { + "Policy": 5, + "Hits": 2628, + "Misses": 3112, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.005932896890343653, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 2, + "Hits": 1803, + "Misses": 3085, + "Active": false + }, + { + "Policy": 9, + "Hits": 1801, + "Misses": 3087, + "Active": false + }, + { + "Policy": 7, + "Hits": 1799, + "Misses": 3089, + "Active": false + }, + { + "Policy": 3, + "Hits": 1796, + "Misses": 3092, + "Active": false + }, + { + "Policy": 8, + "Hits": 1788, + "Misses": 3100, + "Active": false + }, + { + "Policy": 1, + "Hits": 1774, + "Misses": 3114, + "Active": true + }, + { + "Policy": 6, + "Hits": 1773, + "Misses": 3115, + "Active": false + }, + { + "Policy": 4, + "Hits": 1763, + "Misses": 3125, + "Active": false + }, + { + "Policy": 5, + "Hits": 1635, + "Misses": 3253, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0031674208144796268, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 8, + "Hits": 3812, + "Misses": 2818, + "Active": false + }, + { + "Policy": 7, + "Hits": 3806, + "Misses": 2824, + "Active": false + }, + { + "Policy": 3, + "Hits": 3803, + "Misses": 2827, + "Active": false + }, + { + "Policy": 4, + "Hits": 3798, + "Misses": 2832, + "Active": false + }, + { + "Policy": 6, + "Hits": 3798, + "Misses": 2832, + "Active": false + }, + { + "Policy": 1, + "Hits": 3791, + "Misses": 2839, + "Active": true + }, + { + "Policy": 9, + "Hits": 3787, + "Misses": 2843, + "Active": false + }, + { + "Policy": 2, + "Hits": 3773, + "Misses": 2857, + "Active": false + }, + { + "Policy": 5, + "Hits": 3459, + "Misses": 3171, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 5365, + "Misses": 3045, + "Active": true + }, + { + "Policy": 2, + "Hits": 5350, + "Misses": 3060, + "Active": false + }, + { + "Policy": 9, + "Hits": 5349, + "Misses": 3061, + "Active": false + }, + { + "Policy": 3, + "Hits": 5342, + "Misses": 3068, + "Active": false + }, + { + "Policy": 6, + "Hits": 5337, + "Misses": 3073, + "Active": false + }, + { + "Policy": 7, + "Hits": 5337, + "Misses": 3073, + "Active": false + }, + { + "Policy": 8, + "Hits": 5329, + "Misses": 3081, + "Active": false + }, + { + "Policy": 4, + "Hits": 5324, + "Misses": 3086, + "Active": false + }, + { + "Policy": 5, + "Hits": 4860, + "Misses": 3550, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.005055064090991157, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 2748, + "Misses": 2791, + "Active": false + }, + { + "Policy": 8, + "Hits": 2740, + "Misses": 2799, + "Active": false + }, + { + "Policy": 4, + "Hits": 2737, + "Misses": 2802, + "Active": false + }, + { + "Policy": 3, + "Hits": 2736, + "Misses": 2803, + "Active": false + }, + { + "Policy": 6, + "Hits": 2735, + "Misses": 2804, + "Active": false + }, + { + "Policy": 1, + "Hits": 2720, + "Misses": 2819, + "Active": true + }, + { + "Policy": 2, + "Hits": 2717, + "Misses": 2822, + "Active": false + }, + { + "Policy": 9, + "Hits": 2716, + "Misses": 2823, + "Active": false + }, + { + "Policy": 5, + "Hits": 2539, + "Misses": 3000, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0019292604501607302, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 4795, + "Misses": 2980, + "Active": false + }, + { + "Policy": 2, + "Hits": 4788, + "Misses": 2987, + "Active": false + }, + { + "Policy": 9, + "Hits": 4786, + "Misses": 2989, + "Active": false + }, + { + "Policy": 1, + "Hits": 4780, + "Misses": 2995, + "Active": true + }, + { + "Policy": 6, + "Hits": 4766, + "Misses": 3009, + "Active": false + }, + { + "Policy": 8, + "Hits": 4762, + "Misses": 3013, + "Active": false + }, + { + "Policy": 4, + "Hits": 4760, + "Misses": 3015, + "Active": false + }, + { + "Policy": 3, + "Hits": 4747, + "Misses": 3028, + "Active": false + }, + { + "Policy": 5, + "Hits": 4378, + "Misses": 3397, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 4855, + "Misses": 3054, + "Active": true + }, + { + "Policy": 8, + "Hits": 4835, + "Misses": 3074, + "Active": false + }, + { + "Policy": 3, + "Hits": 4833, + "Misses": 3076, + "Active": false + }, + { + "Policy": 9, + "Hits": 4831, + "Misses": 3078, + "Active": false + }, + { + "Policy": 2, + "Hits": 4827, + "Misses": 3082, + "Active": false + }, + { + "Policy": 7, + "Hits": 4820, + "Misses": 3089, + "Active": false + }, + { + "Policy": 6, + "Hits": 4819, + "Misses": 3090, + "Active": false + }, + { + "Policy": 4, + "Hits": 4814, + "Misses": 3095, + "Active": false + }, + { + "Policy": 5, + "Hits": 4400, + "Misses": 3509, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.013822796283707195, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 1748, + "Misses": 2665, + "Active": false + }, + { + "Policy": 8, + "Hits": 1746, + "Misses": 2667, + "Active": false + }, + { + "Policy": 2, + "Hits": 1741, + "Misses": 2672, + "Active": false + }, + { + "Policy": 3, + "Hits": 1739, + "Misses": 2674, + "Active": false + }, + { + "Policy": 4, + "Hits": 1739, + "Misses": 2674, + "Active": false + }, + { + "Policy": 9, + "Hits": 1737, + "Misses": 2676, + "Active": false + }, + { + "Policy": 6, + "Hits": 1732, + "Misses": 2681, + "Active": false + }, + { + "Policy": 1, + "Hits": 1687, + "Misses": 2726, + "Active": true + }, + { + "Policy": 5, + "Hits": 1604, + "Misses": 2809, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 6, + "Improvement": 0.0005015045135405849, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 6, + "Hits": 5230, + "Misses": 2746, + "Active": false + }, + { + "Policy": 7, + "Hits": 5230, + "Misses": 2746, + "Active": false + }, + { + "Policy": 1, + "Hits": 5226, + "Misses": 2750, + "Active": true + }, + { + "Policy": 3, + "Hits": 5219, + "Misses": 2757, + "Active": false + }, + { + "Policy": 4, + "Hits": 5216, + "Misses": 2760, + "Active": false + }, + { + "Policy": 2, + "Hits": 5211, + "Misses": 2765, + "Active": false + }, + { + "Policy": 9, + "Hits": 5211, + "Misses": 2765, + "Active": false + }, + { + "Policy": 8, + "Hits": 5197, + "Misses": 2779, + "Active": false + }, + { + "Policy": 5, + "Hits": 4806, + "Misses": 3170, + "Active": false + } + ] + }, + "best_policy_name": "TTL", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0017136625642624193, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 3363, + "Misses": 3056, + "Active": false + }, + { + "Policy": 1, + "Hits": 3352, + "Misses": 3067, + "Active": true + }, + { + "Policy": 4, + "Hits": 3338, + "Misses": 3081, + "Active": false + }, + { + "Policy": 6, + "Hits": 3338, + "Misses": 3081, + "Active": false + }, + { + "Policy": 3, + "Hits": 3335, + "Misses": 3084, + "Active": false + }, + { + "Policy": 8, + "Hits": 3335, + "Misses": 3084, + "Active": false + }, + { + "Policy": 2, + "Hits": 3325, + "Misses": 3094, + "Active": false + }, + { + "Policy": 9, + "Hits": 3322, + "Misses": 3097, + "Active": false + }, + { + "Policy": 5, + "Hits": 3100, + "Misses": 3319, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 4725, + "Misses": 2919, + "Active": true + }, + { + "Policy": 3, + "Hits": 4724, + "Misses": 2920, + "Active": false + }, + { + "Policy": 6, + "Hits": 4709, + "Misses": 2935, + "Active": false + }, + { + "Policy": 2, + "Hits": 4704, + "Misses": 2940, + "Active": false + }, + { + "Policy": 9, + "Hits": 4701, + "Misses": 2943, + "Active": false + }, + { + "Policy": 4, + "Hits": 4699, + "Misses": 2945, + "Active": false + }, + { + "Policy": 7, + "Hits": 4699, + "Misses": 2945, + "Active": false + }, + { + "Policy": 8, + "Hits": 4695, + "Misses": 2949, + "Active": false + }, + { + "Policy": 5, + "Hits": 4279, + "Misses": 3365, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.018219461697722594, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 7, + "Hits": 1886, + "Misses": 2944, + "Active": false + }, + { + "Policy": 8, + "Hits": 1817, + "Misses": 3013, + "Active": false + }, + { + "Policy": 3, + "Hits": 1812, + "Misses": 3018, + "Active": false + }, + { + "Policy": 4, + "Hits": 1811, + "Misses": 3019, + "Active": false + }, + { + "Policy": 9, + "Hits": 1807, + "Misses": 3023, + "Active": false + }, + { + "Policy": 2, + "Hits": 1804, + "Misses": 3026, + "Active": false + }, + { + "Policy": 1, + "Hits": 1798, + "Misses": 3032, + "Active": true + }, + { + "Policy": 6, + "Hits": 1798, + "Misses": 3032, + "Active": false + }, + { + "Policy": 5, + "Hits": 1672, + "Misses": 3158, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.004354136429608135, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 2, + "Hits": 3365, + "Misses": 2836, + "Active": false + }, + { + "Policy": 9, + "Hits": 3362, + "Misses": 2839, + "Active": false + }, + { + "Policy": 4, + "Hits": 3354, + "Misses": 2847, + "Active": false + }, + { + "Policy": 6, + "Hits": 3350, + "Misses": 2851, + "Active": false + }, + { + "Policy": 7, + "Hits": 3349, + "Misses": 2852, + "Active": false + }, + { + "Policy": 3, + "Hits": 3346, + "Misses": 2855, + "Active": false + }, + { + "Policy": 8, + "Hits": 3342, + "Misses": 2859, + "Active": false + }, + { + "Policy": 1, + "Hits": 3338, + "Misses": 2863, + "Active": true + }, + { + "Policy": 5, + "Hits": 3088, + "Misses": 3113, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.001438618925831192, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 8, + "Hits": 3346, + "Misses": 2910, + "Active": false + }, + { + "Policy": 1, + "Hits": 3337, + "Misses": 2919, + "Active": true + }, + { + "Policy": 3, + "Hits": 3337, + "Misses": 2919, + "Active": false + }, + { + "Policy": 6, + "Hits": 3331, + "Misses": 2925, + "Active": false + }, + { + "Policy": 4, + "Hits": 3328, + "Misses": 2928, + "Active": false + }, + { + "Policy": 7, + "Hits": 3327, + "Misses": 2929, + "Active": false + }, + { + "Policy": 9, + "Hits": 3316, + "Misses": 2940, + "Active": false + }, + { + "Policy": 2, + "Hits": 3298, + "Misses": 2958, + "Active": false + }, + { + "Policy": 5, + "Hits": 3102, + "Misses": 3154, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 54.415, + "epoch_requests": 5000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.064, + "Reports": [ + { + "Policy": 1, + "Hits": 3329, + "Misses": 3056, + "Active": true + }, + { + "Policy": 8, + "Hits": 3329, + "Misses": 3056, + "Active": false + }, + { + "Policy": 2, + "Hits": 3324, + "Misses": 3061, + "Active": false + }, + { + "Policy": 9, + "Hits": 3323, + "Misses": 3062, + "Active": false + }, + { + "Policy": 7, + "Hits": 3315, + "Misses": 3070, + "Active": false + }, + { + "Policy": 6, + "Hits": 3313, + "Misses": 3072, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 3077, + "Active": false + }, + { + "Policy": 3, + "Hits": 3305, + "Misses": 3080, + "Active": false + }, + { + "Policy": 5, + "Hits": 3009, + "Misses": 3376, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 5000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 54361, + "sieve_hits": 54361, + "fifo_hits": 49957, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_p3", + "source": "ARC paper P3 workstation trace (FAST '03)", + "requests": 2000000, + "distinct_keys": 426527, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 7.74445, + 7.74445, + 7.74445 + ] + }, + "ARC": { + "runs": [ + 10.25295, + 10.25295, + 10.25295 + ] + }, + "LFU": { + "runs": [ + 4.8162, + 4.8162, + 4.8162 + ] + }, + "LRU": { + "runs": [ + 1.8679500000000002, + 1.8679500000000002, + 1.8679500000000002 + ] + }, + "Random": { + "runs": [ + 3.07655, + 3.0668, + 3.0894999999999997, + 3.0867999999999998, + 3.0752, + 3.0764, + 3.0781, + 3.0805, + 3.07945, + 3.082, + 3.0903, + 3.07745, + 3.08705, + 3.08825, + 3.0821 + ] + }, + "S3-FIFO": { + "runs": [ + 10.75245, + 10.75245, + 10.75245 + ] + }, + "SIEVE": { + "runs": [ + 4.8162, + 4.8162, + 4.8162 + ] + }, + "TTL": { + "runs": [ + 1.8679500000000002, + 1.8679500000000002, + 1.8679500000000002 + ] + }, + "W-TinyLFU": { + "runs": [ + 12.088550000000001, + 12.241349999999999, + 12.23175, + 12.3759, + 12.22885, + 11.52, + 12.33145, + 12.1054, + 12.095799999999999, + 12.3031, + 11.59475, + 11.8256, + 11.7034, + 11.639, + 11.737499999999999 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.3819, + 12.4169, + 12.684599999999998, + 12.557599999999999, + 12.150500000000001, + 11.97455, + 12.52825, + 12.5963, + 12.57915, + 12.4438, + 11.92975, + 12.3026, + 12.1276, + 12.4693, + 12.545300000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.2404, + 12.916250000000002, + 12.641849999999998, + 12.5986, + 13.0035, + 12.926099999999998, + 13.1112, + 12.902, + 12.84535, + 13.09695, + 12.9724, + 12.897649999999999, + 13.1049, + 12.505849999999999, + 12.9947 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.595600000000001, + 12.39815, + 13.588049999999999, + 11.8984, + 8.578199999999999, + 12.3863, + 12.5047, + 12.81245, + 12.28115, + 12.4156, + 13.4935, + 12.104149999999999, + 12.4265, + 12.26415, + 13.3653 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11664154356346096, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13513, + "Misses": 85997, + "Active": false + }, + { + "Policy": 8, + "Hits": 10478, + "Misses": 89032, + "Active": false + }, + { + "Policy": 4, + "Hits": 10076, + "Misses": 89434, + "Active": false + }, + { + "Policy": 3, + "Hits": 6995, + "Misses": 92515, + "Active": false + }, + { + "Policy": 2, + "Hits": 4780, + "Misses": 94730, + "Active": false + }, + { + "Policy": 9, + "Hits": 4780, + "Misses": 94730, + "Active": false + }, + { + "Policy": 5, + "Hits": 3037, + "Misses": 96473, + "Active": false + }, + { + "Policy": 1, + "Hits": 1906, + "Misses": 97604, + "Active": true + }, + { + "Policy": 6, + "Hits": 1865, + "Misses": 97645, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11326107587033614, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13254, + "Misses": 86851, + "Active": false + }, + { + "Policy": 8, + "Hits": 10780, + "Misses": 89325, + "Active": false + }, + { + "Policy": 4, + "Hits": 10438, + "Misses": 89667, + "Active": false + }, + { + "Policy": 3, + "Hits": 7801, + "Misses": 92304, + "Active": false + }, + { + "Policy": 2, + "Hits": 4936, + "Misses": 95169, + "Active": false + }, + { + "Policy": 9, + "Hits": 4936, + "Misses": 95169, + "Active": false + }, + { + "Policy": 5, + "Hits": 3117, + "Misses": 96988, + "Active": false + }, + { + "Policy": 1, + "Hits": 1916, + "Misses": 98189, + "Active": true + }, + { + "Policy": 6, + "Hits": 1844, + "Misses": 98261, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11183700256547939, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13238, + "Misses": 87328, + "Active": false + }, + { + "Policy": 8, + "Hits": 10901, + "Misses": 89665, + "Active": false + }, + { + "Policy": 4, + "Hits": 10452, + "Misses": 90114, + "Active": false + }, + { + "Policy": 3, + "Hits": 7182, + "Misses": 93384, + "Active": false + }, + { + "Policy": 2, + "Hits": 5115, + "Misses": 95451, + "Active": false + }, + { + "Policy": 9, + "Hits": 5115, + "Misses": 95451, + "Active": false + }, + { + "Policy": 5, + "Hits": 3120, + "Misses": 97446, + "Active": false + }, + { + "Policy": 6, + "Hits": 1997, + "Misses": 98569, + "Active": false + }, + { + "Policy": 1, + "Hits": 1991, + "Misses": 98575, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11773316190287805, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13709, + "Misses": 87401, + "Active": false + }, + { + "Policy": 8, + "Hits": 10618, + "Misses": 90492, + "Active": false + }, + { + "Policy": 4, + "Hits": 10255, + "Misses": 90855, + "Active": false + }, + { + "Policy": 3, + "Hits": 7010, + "Misses": 94100, + "Active": false + }, + { + "Policy": 2, + "Hits": 4974, + "Misses": 96136, + "Active": false + }, + { + "Policy": 9, + "Hits": 4974, + "Misses": 96136, + "Active": false + }, + { + "Policy": 5, + "Hits": 2948, + "Misses": 98162, + "Active": false + }, + { + "Policy": 1, + "Hits": 1805, + "Misses": 99305, + "Active": true + }, + { + "Policy": 6, + "Hits": 1745, + "Misses": 99365, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11509288232265219, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13511, + "Misses": 87477, + "Active": false + }, + { + "Policy": 8, + "Hits": 10936, + "Misses": 90052, + "Active": false + }, + { + "Policy": 4, + "Hits": 10349, + "Misses": 90639, + "Active": false + }, + { + "Policy": 3, + "Hits": 6833, + "Misses": 94155, + "Active": false + }, + { + "Policy": 2, + "Hits": 4823, + "Misses": 96165, + "Active": false + }, + { + "Policy": 9, + "Hits": 4823, + "Misses": 96165, + "Active": false + }, + { + "Policy": 5, + "Hits": 3047, + "Misses": 97941, + "Active": false + }, + { + "Policy": 1, + "Hits": 1888, + "Misses": 99100, + "Active": true + }, + { + "Policy": 6, + "Hits": 1868, + "Misses": 99120, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11654723255998099, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13544, + "Misses": 87488, + "Active": false + }, + { + "Policy": 8, + "Hits": 11168, + "Misses": 89864, + "Active": false + }, + { + "Policy": 4, + "Hits": 10761, + "Misses": 90271, + "Active": false + }, + { + "Policy": 3, + "Hits": 6990, + "Misses": 94042, + "Active": false + }, + { + "Policy": 2, + "Hits": 4562, + "Misses": 96470, + "Active": false + }, + { + "Policy": 9, + "Hits": 4562, + "Misses": 96470, + "Active": false + }, + { + "Policy": 5, + "Hits": 2928, + "Misses": 98104, + "Active": false + }, + { + "Policy": 1, + "Hits": 1769, + "Misses": 99263, + "Active": true + }, + { + "Policy": 6, + "Hits": 1672, + "Misses": 99360, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10269260423462429, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12327, + "Misses": 88839, + "Active": false + }, + { + "Policy": 8, + "Hits": 10767, + "Misses": 90399, + "Active": false + }, + { + "Policy": 4, + "Hits": 10352, + "Misses": 90814, + "Active": false + }, + { + "Policy": 3, + "Hits": 7530, + "Misses": 93636, + "Active": false + }, + { + "Policy": 2, + "Hits": 4809, + "Misses": 96357, + "Active": false + }, + { + "Policy": 9, + "Hits": 4809, + "Misses": 96357, + "Active": false + }, + { + "Policy": 5, + "Hits": 3092, + "Misses": 98074, + "Active": false + }, + { + "Policy": 1, + "Hits": 1938, + "Misses": 99228, + "Active": true + }, + { + "Policy": 6, + "Hits": 1877, + "Misses": 99289, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11724408104225889, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13577, + "Misses": 85976, + "Active": false + }, + { + "Policy": 8, + "Hits": 10322, + "Misses": 89231, + "Active": false + }, + { + "Policy": 4, + "Hits": 10004, + "Misses": 89549, + "Active": false + }, + { + "Policy": 3, + "Hits": 7356, + "Misses": 92197, + "Active": false + }, + { + "Policy": 2, + "Hits": 4682, + "Misses": 94871, + "Active": false + }, + { + "Policy": 9, + "Hits": 4682, + "Misses": 94871, + "Active": false + }, + { + "Policy": 5, + "Hits": 3055, + "Misses": 96498, + "Active": false + }, + { + "Policy": 1, + "Hits": 1905, + "Misses": 97648, + "Active": true + }, + { + "Policy": 6, + "Hits": 1841, + "Misses": 97712, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10934889009739457, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12834, + "Misses": 88301, + "Active": false + }, + { + "Policy": 8, + "Hits": 11060, + "Misses": 90075, + "Active": false + }, + { + "Policy": 4, + "Hits": 10633, + "Misses": 90502, + "Active": false + }, + { + "Policy": 3, + "Hits": 7050, + "Misses": 94085, + "Active": false + }, + { + "Policy": 2, + "Hits": 4932, + "Misses": 96203, + "Active": false + }, + { + "Policy": 9, + "Hits": 4932, + "Misses": 96203, + "Active": false + }, + { + "Policy": 5, + "Hits": 2960, + "Misses": 98175, + "Active": false + }, + { + "Policy": 1, + "Hits": 1775, + "Misses": 99360, + "Active": true + }, + { + "Policy": 6, + "Hits": 1703, + "Misses": 99432, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11216997812340795, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13242, + "Misses": 86865, + "Active": false + }, + { + "Policy": 8, + "Hits": 10665, + "Misses": 89442, + "Active": false + }, + { + "Policy": 4, + "Hits": 10500, + "Misses": 89607, + "Active": false + }, + { + "Policy": 3, + "Hits": 7774, + "Misses": 92333, + "Active": false + }, + { + "Policy": 2, + "Hits": 4955, + "Misses": 95152, + "Active": false + }, + { + "Policy": 9, + "Hits": 4955, + "Misses": 95152, + "Active": false + }, + { + "Policy": 5, + "Hits": 3292, + "Misses": 96815, + "Active": false + }, + { + "Policy": 6, + "Hits": 2015, + "Misses": 98092, + "Active": false + }, + { + "Policy": 1, + "Hits": 2013, + "Misses": 98094, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11005807709137198, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12944, + "Misses": 87612, + "Active": false + }, + { + "Policy": 8, + "Hits": 10931, + "Misses": 89625, + "Active": false + }, + { + "Policy": 4, + "Hits": 10417, + "Misses": 90139, + "Active": false + }, + { + "Policy": 3, + "Hits": 6927, + "Misses": 93629, + "Active": false + }, + { + "Policy": 2, + "Hits": 4687, + "Misses": 95869, + "Active": false + }, + { + "Policy": 9, + "Hits": 4687, + "Misses": 95869, + "Active": false + }, + { + "Policy": 5, + "Hits": 3094, + "Misses": 97462, + "Active": false + }, + { + "Policy": 1, + "Hits": 1877, + "Misses": 98679, + "Active": true + }, + { + "Policy": 6, + "Hits": 1877, + "Misses": 98679, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11642673547967612, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13223, + "Misses": 85208, + "Active": false + }, + { + "Policy": 8, + "Hits": 10478, + "Misses": 87953, + "Active": false + }, + { + "Policy": 4, + "Hits": 10029, + "Misses": 88402, + "Active": false + }, + { + "Policy": 3, + "Hits": 7952, + "Misses": 90479, + "Active": false + }, + { + "Policy": 2, + "Hits": 4813, + "Misses": 93618, + "Active": false + }, + { + "Policy": 9, + "Hits": 4813, + "Misses": 93618, + "Active": false + }, + { + "Policy": 5, + "Hits": 3047, + "Misses": 95384, + "Active": false + }, + { + "Policy": 6, + "Hits": 1789, + "Misses": 96642, + "Active": false + }, + { + "Policy": 1, + "Hits": 1763, + "Misses": 96668, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.11520838972939915, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 13349, + "Misses": 86392, + "Active": false + }, + { + "Policy": 8, + "Hits": 10847, + "Misses": 88894, + "Active": false + }, + { + "Policy": 4, + "Hits": 10253, + "Misses": 89488, + "Active": false + }, + { + "Policy": 3, + "Hits": 7369, + "Misses": 92372, + "Active": false + }, + { + "Policy": 2, + "Hits": 4673, + "Misses": 95068, + "Active": false + }, + { + "Policy": 9, + "Hits": 4673, + "Misses": 95068, + "Active": false + }, + { + "Policy": 5, + "Hits": 3084, + "Misses": 96657, + "Active": false + }, + { + "Policy": 6, + "Hits": 1873, + "Misses": 97868, + "Active": false + }, + { + "Policy": 1, + "Hits": 1858, + "Misses": 97883, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10795654402379828, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12547, + "Misses": 86956, + "Active": false + }, + { + "Policy": 8, + "Hits": 10467, + "Misses": 89036, + "Active": false + }, + { + "Policy": 4, + "Hits": 10001, + "Misses": 89502, + "Active": false + }, + { + "Policy": 3, + "Hits": 6748, + "Misses": 92755, + "Active": false + }, + { + "Policy": 2, + "Hits": 4729, + "Misses": 94774, + "Active": false + }, + { + "Policy": 9, + "Hits": 4729, + "Misses": 94774, + "Active": false + }, + { + "Policy": 5, + "Hits": 3035, + "Misses": 96468, + "Active": false + }, + { + "Policy": 6, + "Hits": 1846, + "Misses": 97657, + "Active": false + }, + { + "Policy": 1, + "Hits": 1805, + "Misses": 97698, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.8679500000000002, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.10236619382524735, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 12150, + "Misses": 88518, + "Active": false + }, + { + "Policy": 8, + "Hits": 10747, + "Misses": 89921, + "Active": false + }, + { + "Policy": 4, + "Hits": 10250, + "Misses": 90418, + "Active": false + }, + { + "Policy": 3, + "Hits": 7554, + "Misses": 93114, + "Active": false + }, + { + "Policy": 2, + "Hits": 4627, + "Misses": 96041, + "Active": false + }, + { + "Policy": 9, + "Hits": 4627, + "Misses": 96041, + "Active": false + }, + { + "Policy": 5, + "Hits": 3011, + "Misses": 97657, + "Active": false + }, + { + "Policy": 1, + "Hits": 1845, + "Misses": 98823, + "Active": true + }, + { + "Policy": 6, + "Hits": 1786, + "Misses": 98882, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 96324, + "sieve_hits": 96324, + "fifo_hits": 38093, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "arc_oltp", + "source": "ARC paper OLTP database trace (FAST '03)", + "requests": 914145, + "distinct_keys": 186880, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.25427038380126, + 68.25427038380126, + 68.25427038380126 + ] + }, + "ARC": { + "runs": [ + 67.8008412232195, + 67.8008412232195, + 67.8008412232195 + ] + }, + "LFU": { + "runs": [ + 45.426053853600905, + 45.426053853600905, + 45.426053853600905 + ] + }, + "LRU": { + "runs": [ + 67.0592739663839, + 67.0592739663839, + 67.0592739663839 + ] + }, + "Random": { + "runs": [ + 63.021511904566566, + 63.04907864726056, + 63.02019920253351, + 63.013198125023926, + 63.049188039096634, + 62.973160713015986, + 63.01090089646609, + 63.03398257388051, + 62.98399050478862, + 63.02216825558309, + 63.0203085943696, + 63.054110671720565, + 63.00116502305433, + 63.016479880106544, + 63.040546084045744 + ] + }, + "S3-FIFO": { + "runs": [ + 67.79460588856253, + 67.79460588856253, + 67.79460588856253 + ] + }, + "SIEVE": { + "runs": [ + 67.717484644121, + 67.717484644121, + 67.717484644121 + ] + }, + "TTL": { + "runs": [ + 67.0592739663839, + 67.0592739663839, + 67.0592739663839 + ] + }, + "W-TinyLFU": { + "runs": [ + 63.112088344846825, + 63.239858009396755, + 63.035951626930085, + 62.03753233896154, + 63.39924191457591, + 63.20124269125795, + 63.09699227146678, + 63.17498865059701, + 63.13407610390036, + 62.949532076421136, + 63.106728144878545, + 63.10815023874768, + 63.11077564281378, + 63.01472961072915, + 63.170831760825685 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 91414, + "hit_rate_percent": { + "runs": [ + 67.74472321130675, + 67.46030443747983, + 67.74472321130675, + 67.64123853436817, + 67.51259373512954, + 67.46030443747983, + 67.51259373512954, + 67.46030443747983, + 67.64123853436817, + 67.3695092135274, + 67.3695092135274, + 67.4123908132736, + 67.72984592159888, + 67.47824469859815, + 67.64123853436817 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 91414, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 45707, + "hit_rate_percent": { + "runs": [ + 67.06704078674609, + 67.22434624703958, + 66.91881484884783, + 67.04997566031648, + 66.9715417138419, + 66.80767274338316, + 66.67563679722582, + 66.87680838379032, + 66.93828659567137, + 66.90164033058213, + 67.1288471741354, + 66.9121419468465, + 67.12272123131451, + 66.80056227403749, + 66.87243271034683 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 18282, + "hit_rate_percent": { + "runs": [ + 65.88353051211789, + 65.85541681024345, + 66.58976420589731, + 66.15307199623692, + 66.05232211520054, + 66.08918716396195, + 66.14082011059514, + 65.91383205071406, + 66.21739439585623, + 65.85858917348997, + 66.33017737886222, + 66.20929939998578, + 66.19529724496661, + 66.32864589315699, + 66.02836530309743 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 18282, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011587881897676011, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32210, + "Misses": 14563, + "Active": false + }, + { + "Policy": 9, + "Hits": 32085, + "Misses": 14688, + "Active": false + }, + { + "Policy": 8, + "Hits": 32023, + "Misses": 14750, + "Active": false + }, + { + "Policy": 4, + "Hits": 32000, + "Misses": 14773, + "Active": false + }, + { + "Policy": 6, + "Hits": 31703, + "Misses": 15070, + "Active": false + }, + { + "Policy": 1, + "Hits": 31668, + "Misses": 15105, + "Active": true + }, + { + "Policy": 7, + "Hits": 30130, + "Misses": 16643, + "Active": false + }, + { + "Policy": 5, + "Hits": 29887, + "Misses": 16886, + "Active": false + }, + { + "Policy": 2, + "Hits": 25448, + "Misses": 21325, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011703292077123839, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32970, + "Misses": 14538, + "Active": false + }, + { + "Policy": 4, + "Hits": 32947, + "Misses": 14561, + "Active": false + }, + { + "Policy": 9, + "Hits": 32863, + "Misses": 14645, + "Active": false + }, + { + "Policy": 8, + "Hits": 32755, + "Misses": 14753, + "Active": false + }, + { + "Policy": 1, + "Hits": 32414, + "Misses": 15094, + "Active": true + }, + { + "Policy": 6, + "Hits": 32331, + "Misses": 15177, + "Active": false + }, + { + "Policy": 7, + "Hits": 30674, + "Misses": 16834, + "Active": false + }, + { + "Policy": 5, + "Hits": 30356, + "Misses": 17152, + "Active": false + }, + { + "Policy": 2, + "Hits": 26711, + "Misses": 20797, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.008997007433149906, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 37025, + "Misses": 14770, + "Active": false + }, + { + "Policy": 4, + "Hits": 36906, + "Misses": 14889, + "Active": false + }, + { + "Policy": 9, + "Hits": 36874, + "Misses": 14921, + "Active": false + }, + { + "Policy": 8, + "Hits": 36751, + "Misses": 15044, + "Active": false + }, + { + "Policy": 1, + "Hits": 36559, + "Misses": 15236, + "Active": true + }, + { + "Policy": 6, + "Hits": 36466, + "Misses": 15329, + "Active": false + }, + { + "Policy": 7, + "Hits": 34768, + "Misses": 17027, + "Active": false + }, + { + "Policy": 5, + "Hits": 34284, + "Misses": 17511, + "Active": false + }, + { + "Policy": 2, + "Hits": 30724, + "Misses": 21071, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.013302646720368294, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 29095, + "Misses": 14355, + "Active": false + }, + { + "Policy": 9, + "Hits": 29013, + "Misses": 14437, + "Active": false + }, + { + "Policy": 4, + "Hits": 28924, + "Misses": 14526, + "Active": false + }, + { + "Policy": 8, + "Hits": 28912, + "Misses": 14538, + "Active": false + }, + { + "Policy": 6, + "Hits": 28593, + "Misses": 14857, + "Active": false + }, + { + "Policy": 1, + "Hits": 28517, + "Misses": 14933, + "Active": true + }, + { + "Policy": 5, + "Hits": 26850, + "Misses": 16600, + "Active": false + }, + { + "Policy": 7, + "Hits": 26712, + "Misses": 16738, + "Active": false + }, + { + "Policy": 2, + "Hits": 23201, + "Misses": 20249, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010568307608763816, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 33471, + "Misses": 14408, + "Active": false + }, + { + "Policy": 4, + "Hits": 33321, + "Misses": 14558, + "Active": false + }, + { + "Policy": 8, + "Hits": 33235, + "Misses": 14644, + "Active": false + }, + { + "Policy": 9, + "Hits": 33211, + "Misses": 14668, + "Active": false + }, + { + "Policy": 6, + "Hits": 32968, + "Misses": 14911, + "Active": false + }, + { + "Policy": 1, + "Hits": 32965, + "Misses": 14914, + "Active": true + }, + { + "Policy": 5, + "Hits": 31039, + "Misses": 16840, + "Active": false + }, + { + "Policy": 7, + "Hits": 31008, + "Misses": 16871, + "Active": false + }, + { + "Policy": 2, + "Hits": 27226, + "Misses": 20653, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010168655888576184, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 34061, + "Misses": 14618, + "Active": false + }, + { + "Policy": 4, + "Hits": 33955, + "Misses": 14724, + "Active": false + }, + { + "Policy": 9, + "Hits": 33820, + "Misses": 14859, + "Active": false + }, + { + "Policy": 8, + "Hits": 33748, + "Misses": 14931, + "Active": false + }, + { + "Policy": 1, + "Hits": 33566, + "Misses": 15113, + "Active": true + }, + { + "Policy": 6, + "Hits": 33510, + "Misses": 15169, + "Active": false + }, + { + "Policy": 7, + "Hits": 31838, + "Misses": 16841, + "Active": false + }, + { + "Policy": 5, + "Hits": 31734, + "Misses": 16945, + "Active": false + }, + { + "Policy": 2, + "Hits": 27538, + "Misses": 21141, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.012740803541990586, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 28085, + "Misses": 14377, + "Active": false + }, + { + "Policy": 4, + "Hits": 28033, + "Misses": 14429, + "Active": false + }, + { + "Policy": 8, + "Hits": 27872, + "Misses": 14590, + "Active": false + }, + { + "Policy": 9, + "Hits": 27765, + "Misses": 14697, + "Active": false + }, + { + "Policy": 6, + "Hits": 27585, + "Misses": 14877, + "Active": false + }, + { + "Policy": 1, + "Hits": 27544, + "Misses": 14918, + "Active": true + }, + { + "Policy": 5, + "Hits": 25804, + "Misses": 16658, + "Active": false + }, + { + "Policy": 7, + "Hits": 25709, + "Misses": 16753, + "Active": false + }, + { + "Policy": 2, + "Hits": 21294, + "Misses": 21168, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.012099305209844036, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 31546, + "Misses": 14655, + "Active": false + }, + { + "Policy": 4, + "Hits": 31433, + "Misses": 14768, + "Active": false + }, + { + "Policy": 9, + "Hits": 31392, + "Misses": 14809, + "Active": false + }, + { + "Policy": 8, + "Hits": 31383, + "Misses": 14818, + "Active": false + }, + { + "Policy": 1, + "Hits": 30987, + "Misses": 15214, + "Active": true + }, + { + "Policy": 6, + "Hits": 30953, + "Misses": 15248, + "Active": false + }, + { + "Policy": 7, + "Hits": 29348, + "Misses": 16853, + "Active": false + }, + { + "Policy": 5, + "Hits": 29101, + "Misses": 17100, + "Active": false + }, + { + "Policy": 2, + "Hits": 26001, + "Misses": 20200, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 4, + "Improvement": 0.011801695069716622, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 4, + "Hits": 29546, + "Misses": 14346, + "Active": false + }, + { + "Policy": 3, + "Hits": 29542, + "Misses": 14350, + "Active": false + }, + { + "Policy": 9, + "Hits": 29379, + "Misses": 14513, + "Active": false + }, + { + "Policy": 8, + "Hits": 29287, + "Misses": 14605, + "Active": false + }, + { + "Policy": 6, + "Hits": 29067, + "Misses": 14825, + "Active": false + }, + { + "Policy": 1, + "Hits": 29028, + "Misses": 14864, + "Active": true + }, + { + "Policy": 5, + "Hits": 27268, + "Misses": 16624, + "Active": false + }, + { + "Policy": 7, + "Hits": 27157, + "Misses": 16735, + "Active": false + }, + { + "Policy": 2, + "Hits": 22951, + "Misses": 20941, + "Active": false + } + ] + }, + "best_policy_name": "ARC", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011101412296604662, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 29913, + "Misses": 14766, + "Active": false + }, + { + "Policy": 4, + "Hits": 29754, + "Misses": 14925, + "Active": false + }, + { + "Policy": 9, + "Hits": 29732, + "Misses": 14947, + "Active": false + }, + { + "Policy": 8, + "Hits": 29617, + "Misses": 15062, + "Active": false + }, + { + "Policy": 1, + "Hits": 29417, + "Misses": 15262, + "Active": true + }, + { + "Policy": 6, + "Hits": 29392, + "Misses": 15287, + "Active": false + }, + { + "Policy": 5, + "Hits": 27600, + "Misses": 17079, + "Active": false + }, + { + "Policy": 7, + "Hits": 27554, + "Misses": 17125, + "Active": false + }, + { + "Policy": 2, + "Hits": 22290, + "Misses": 22389, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.01054831126559641, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 35210, + "Misses": 14561, + "Active": false + }, + { + "Policy": 8, + "Hits": 35107, + "Misses": 14664, + "Active": false + }, + { + "Policy": 4, + "Hits": 35092, + "Misses": 14679, + "Active": false + }, + { + "Policy": 9, + "Hits": 34999, + "Misses": 14772, + "Active": false + }, + { + "Policy": 1, + "Hits": 34685, + "Misses": 15086, + "Active": true + }, + { + "Policy": 6, + "Hits": 34654, + "Misses": 15117, + "Active": false + }, + { + "Policy": 7, + "Hits": 32868, + "Misses": 16903, + "Active": false + }, + { + "Policy": 5, + "Hits": 32748, + "Misses": 17023, + "Active": false + }, + { + "Policy": 2, + "Hits": 28974, + "Misses": 20797, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.014666700499885832, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 25056, + "Misses": 14353, + "Active": false + }, + { + "Policy": 9, + "Hits": 24960, + "Misses": 14449, + "Active": false + }, + { + "Policy": 4, + "Hits": 24937, + "Misses": 14472, + "Active": false + }, + { + "Policy": 8, + "Hits": 24883, + "Misses": 14526, + "Active": false + }, + { + "Policy": 6, + "Hits": 24524, + "Misses": 14885, + "Active": false + }, + { + "Policy": 1, + "Hits": 24478, + "Misses": 14931, + "Active": true + }, + { + "Policy": 7, + "Hits": 22785, + "Misses": 16624, + "Active": false + }, + { + "Policy": 5, + "Hits": 22733, + "Misses": 16676, + "Active": false + }, + { + "Policy": 2, + "Hits": 19009, + "Misses": 20400, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010125123477115583, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 34149, + "Misses": 14443, + "Active": false + }, + { + "Policy": 4, + "Hits": 34079, + "Misses": 14513, + "Active": false + }, + { + "Policy": 9, + "Hits": 33997, + "Misses": 14595, + "Active": false + }, + { + "Policy": 8, + "Hits": 33908, + "Misses": 14684, + "Active": false + }, + { + "Policy": 1, + "Hits": 33657, + "Misses": 14935, + "Active": true + }, + { + "Policy": 6, + "Hits": 33639, + "Misses": 14953, + "Active": false + }, + { + "Policy": 7, + "Hits": 31912, + "Misses": 16680, + "Active": false + }, + { + "Policy": 5, + "Hits": 31692, + "Misses": 16900, + "Active": false + }, + { + "Policy": 2, + "Hits": 26919, + "Misses": 21673, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.011841541755888696, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 32183, + "Misses": 14517, + "Active": false + }, + { + "Policy": 4, + "Hits": 32006, + "Misses": 14694, + "Active": false + }, + { + "Policy": 8, + "Hits": 31935, + "Misses": 14765, + "Active": false + }, + { + "Policy": 9, + "Hits": 31868, + "Misses": 14832, + "Active": false + }, + { + "Policy": 1, + "Hits": 31630, + "Misses": 15070, + "Active": true + }, + { + "Policy": 6, + "Hits": 31598, + "Misses": 15102, + "Active": false + }, + { + "Policy": 7, + "Hits": 29845, + "Misses": 16855, + "Active": false + }, + { + "Policy": 5, + "Hits": 29628, + "Misses": 17072, + "Active": false + }, + { + "Policy": 2, + "Hits": 25967, + "Misses": 20733, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 67.0592739663839, + "epoch_requests": 45707, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.010278630552209234, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 37229, + "Misses": 14237, + "Active": false + }, + { + "Policy": 4, + "Hits": 37172, + "Misses": 14294, + "Active": false + }, + { + "Policy": 9, + "Hits": 37095, + "Misses": 14371, + "Active": false + }, + { + "Policy": 8, + "Hits": 37002, + "Misses": 14464, + "Active": false + }, + { + "Policy": 6, + "Hits": 36798, + "Misses": 14668, + "Active": false + }, + { + "Policy": 1, + "Hits": 36700, + "Misses": 14766, + "Active": true + }, + { + "Policy": 7, + "Hits": 35069, + "Misses": 16397, + "Active": false + }, + { + "Policy": 5, + "Hits": 34944, + "Misses": 16522, + "Active": false + }, + { + "Policy": 2, + "Hits": 30104, + "Misses": 21362, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 45707, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 415260, + "sieve_hits": 619036, + "fifo_hits": 584567, + "different_lfu_sieve_decisions": 230770, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "meta_kvcache_202206_1", + "source": "Meta production key-value cache, 500 hosts over 5 days (CacheBench kvcache/202206)", + "requests": 2000000, + "distinct_keys": 340723, + "capacity": 10000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 68.15679999999999, + 68.15679999999999, + 68.15679999999999 + ] + }, + "ARC": { + "runs": [ + 68.2667, + 68.2667, + 68.2667 + ] + }, + "LFU": { + "runs": [ + 66.86565, + 66.86565, + 66.86565 + ] + }, + "LRU": { + "runs": [ + 66.389, + 66.389, + 66.389 + ] + }, + "Random": { + "runs": [ + 65.1714, + 65.17875, + 65.1889, + 65.1829, + 65.1828, + 65.1881, + 65.18975, + 65.19185, + 65.17885, + 65.1854, + 65.1868, + 65.1848, + 65.1765, + 65.1882, + 65.17150000000001 + ] + }, + "S3-FIFO": { + "runs": [ + 69.05425, + 69.05425, + 69.05425 + ] + }, + "SIEVE": { + "runs": [ + 68.92399999999999, + 68.92399999999999, + 68.92399999999999 + ] + }, + "TTL": { + "runs": [ + 66.389, + 66.389, + 66.389 + ] + }, + "W-TinyLFU": { + "runs": [ + 68.46605, + 68.56989999999999, + 68.52855, + 68.445, + 68.4972, + 68.6025, + 68.72475, + 68.5674, + 68.71095, + 68.6626, + 68.52544999999999, + 68.31415, + 68.51155, + 68.49515000000001, + 68.53139999999999 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 68.0985, + 68.2, + 68.2854, + 67.84225, + 68.1276, + 68.1095, + 67.90565, + 68.16990000000001, + 67.7405, + 68.15679999999999, + 67.96015, + 67.9432, + 68.10955, + 68.03555, + 67.95225 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 67.58225, + 67.67345, + 67.7445, + 67.64145, + 67.60105, + 67.42045, + 67.60000000000001, + 67.62559999999999, + 67.7093, + 67.4365, + 67.77875, + 67.53635, + 67.56689999999999, + 67.4825, + 67.6261 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 66.9271, + 66.9101, + 66.8771, + 66.85515, + 66.89739999999999, + 66.74195, + 66.92845, + 66.89580000000001, + 66.8997, + 66.91709999999999, + 66.97035, + 66.84259999999999, + 66.88705, + 66.86245, + 66.8175 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03684706115571412, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 50024, + "Misses": 30688, + "Active": false + }, + { + "Policy": 8, + "Hits": 49696, + "Misses": 31016, + "Active": false + }, + { + "Policy": 9, + "Hits": 49580, + "Misses": 31132, + "Active": false + }, + { + "Policy": 4, + "Hits": 48841, + "Misses": 31871, + "Active": false + }, + { + "Policy": 3, + "Hits": 48798, + "Misses": 31914, + "Active": false + }, + { + "Policy": 2, + "Hits": 48628, + "Misses": 32084, + "Active": false + }, + { + "Policy": 6, + "Hits": 47123, + "Misses": 33589, + "Active": false + }, + { + "Policy": 1, + "Hits": 47050, + "Misses": 33662, + "Active": true + }, + { + "Policy": 5, + "Hits": 45789, + "Misses": 34923, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.034632185510479085, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 55388, + "Misses": 30688, + "Active": false + }, + { + "Policy": 8, + "Hits": 55091, + "Misses": 30985, + "Active": false + }, + { + "Policy": 9, + "Hits": 54941, + "Misses": 31135, + "Active": false + }, + { + "Policy": 2, + "Hits": 54296, + "Misses": 31780, + "Active": false + }, + { + "Policy": 4, + "Hits": 54262, + "Misses": 31814, + "Active": false + }, + { + "Policy": 3, + "Hits": 54258, + "Misses": 31818, + "Active": false + }, + { + "Policy": 6, + "Hits": 52482, + "Misses": 33594, + "Active": false + }, + { + "Policy": 1, + "Hits": 52407, + "Misses": 33669, + "Active": true + }, + { + "Policy": 5, + "Hits": 51318, + "Misses": 34758, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03289744131012029, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 58940, + "Misses": 31067, + "Active": false + }, + { + "Policy": 8, + "Hits": 58603, + "Misses": 31404, + "Active": false + }, + { + "Policy": 9, + "Hits": 58406, + "Misses": 31601, + "Active": false + }, + { + "Policy": 3, + "Hits": 57782, + "Misses": 32225, + "Active": false + }, + { + "Policy": 4, + "Hits": 57713, + "Misses": 32294, + "Active": false + }, + { + "Policy": 2, + "Hits": 57585, + "Misses": 32422, + "Active": false + }, + { + "Policy": 1, + "Hits": 55979, + "Misses": 34028, + "Active": true + }, + { + "Policy": 6, + "Hits": 55976, + "Misses": 34031, + "Active": false + }, + { + "Policy": 5, + "Hits": 54614, + "Misses": 35393, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03468344567873538, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 53987, + "Misses": 30722, + "Active": false + }, + { + "Policy": 9, + "Hits": 53489, + "Misses": 31220, + "Active": false + }, + { + "Policy": 8, + "Hits": 53430, + "Misses": 31279, + "Active": false + }, + { + "Policy": 3, + "Hits": 52784, + "Misses": 31925, + "Active": false + }, + { + "Policy": 4, + "Hits": 52723, + "Misses": 31986, + "Active": false + }, + { + "Policy": 2, + "Hits": 52307, + "Misses": 32402, + "Active": false + }, + { + "Policy": 6, + "Hits": 51119, + "Misses": 33590, + "Active": false + }, + { + "Policy": 1, + "Hits": 51049, + "Misses": 33660, + "Active": true + }, + { + "Policy": 5, + "Hits": 49823, + "Misses": 34886, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03533409110353347, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 50860, + "Misses": 30959, + "Active": false + }, + { + "Policy": 8, + "Hits": 50584, + "Misses": 31235, + "Active": false + }, + { + "Policy": 9, + "Hits": 50426, + "Misses": 31393, + "Active": false + }, + { + "Policy": 3, + "Hits": 49708, + "Misses": 32111, + "Active": false + }, + { + "Policy": 4, + "Hits": 49682, + "Misses": 32137, + "Active": false + }, + { + "Policy": 2, + "Hits": 49529, + "Misses": 32290, + "Active": false + }, + { + "Policy": 6, + "Hits": 48023, + "Misses": 33796, + "Active": false + }, + { + "Policy": 1, + "Hits": 47969, + "Misses": 33850, + "Active": true + }, + { + "Policy": 5, + "Hits": 46708, + "Misses": 35111, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03607656119095182, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 46800, + "Misses": 30785, + "Active": false + }, + { + "Policy": 8, + "Hits": 46446, + "Misses": 31139, + "Active": false + }, + { + "Policy": 9, + "Hits": 46274, + "Misses": 31311, + "Active": false + }, + { + "Policy": 3, + "Hits": 45669, + "Misses": 31916, + "Active": false + }, + { + "Policy": 4, + "Hits": 45632, + "Misses": 31953, + "Active": false + }, + { + "Policy": 2, + "Hits": 45389, + "Misses": 32196, + "Active": false + }, + { + "Policy": 6, + "Hits": 44079, + "Misses": 33506, + "Active": false + }, + { + "Policy": 1, + "Hits": 44001, + "Misses": 33584, + "Active": true + }, + { + "Policy": 5, + "Hits": 42860, + "Misses": 34725, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02853076563855106, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 58985, + "Misses": 30953, + "Active": false + }, + { + "Policy": 8, + "Hits": 58880, + "Misses": 31058, + "Active": false + }, + { + "Policy": 9, + "Hits": 58790, + "Misses": 31148, + "Active": false + }, + { + "Policy": 4, + "Hits": 58159, + "Misses": 31779, + "Active": false + }, + { + "Policy": 3, + "Hits": 58155, + "Misses": 31783, + "Active": false + }, + { + "Policy": 2, + "Hits": 57818, + "Misses": 32120, + "Active": false + }, + { + "Policy": 6, + "Hits": 56508, + "Misses": 33430, + "Active": false + }, + { + "Policy": 1, + "Hits": 56419, + "Misses": 33519, + "Active": true + }, + { + "Policy": 5, + "Hits": 55227, + "Misses": 34711, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.04042190862166839, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 45006, + "Misses": 30745, + "Active": false + }, + { + "Policy": 8, + "Hits": 44597, + "Misses": 31154, + "Active": false + }, + { + "Policy": 9, + "Hits": 44572, + "Misses": 31179, + "Active": false + }, + { + "Policy": 4, + "Hits": 43822, + "Misses": 31929, + "Active": false + }, + { + "Policy": 3, + "Hits": 43740, + "Misses": 32011, + "Active": false + }, + { + "Policy": 2, + "Hits": 43441, + "Misses": 32310, + "Active": false + }, + { + "Policy": 6, + "Hits": 41993, + "Misses": 33758, + "Active": false + }, + { + "Policy": 1, + "Hits": 41944, + "Misses": 33807, + "Active": true + }, + { + "Policy": 5, + "Hits": 40806, + "Misses": 34945, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.040767116441779105, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 49537, + "Misses": 30503, + "Active": false + }, + { + "Policy": 8, + "Hits": 49068, + "Misses": 30972, + "Active": false + }, + { + "Policy": 9, + "Hits": 48855, + "Misses": 31185, + "Active": false + }, + { + "Policy": 4, + "Hits": 48202, + "Misses": 31838, + "Active": false + }, + { + "Policy": 2, + "Hits": 48178, + "Misses": 31862, + "Active": false + }, + { + "Policy": 3, + "Hits": 48127, + "Misses": 31913, + "Active": false + }, + { + "Policy": 6, + "Hits": 46276, + "Misses": 33764, + "Active": false + }, + { + "Policy": 1, + "Hits": 46274, + "Misses": 33766, + "Active": true + }, + { + "Policy": 5, + "Hits": 44981, + "Misses": 35059, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.03415345845215201, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 59964, + "Misses": 30510, + "Active": false + }, + { + "Policy": 8, + "Hits": 59474, + "Misses": 31000, + "Active": false + }, + { + "Policy": 9, + "Hits": 59418, + "Misses": 31056, + "Active": false + }, + { + "Policy": 4, + "Hits": 58796, + "Misses": 31678, + "Active": false + }, + { + "Policy": 3, + "Hits": 58785, + "Misses": 31689, + "Active": false + }, + { + "Policy": 2, + "Hits": 58676, + "Misses": 31798, + "Active": false + }, + { + "Policy": 6, + "Hits": 56956, + "Misses": 33518, + "Active": false + }, + { + "Policy": 1, + "Hits": 56874, + "Misses": 33600, + "Active": true + }, + { + "Policy": 5, + "Hits": 55648, + "Misses": 34826, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.0379887484064142, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 54912, + "Misses": 30587, + "Active": false + }, + { + "Policy": 8, + "Hits": 54264, + "Misses": 31235, + "Active": false + }, + { + "Policy": 9, + "Hits": 54209, + "Misses": 31290, + "Active": false + }, + { + "Policy": 4, + "Hits": 53491, + "Misses": 32008, + "Active": false + }, + { + "Policy": 3, + "Hits": 53486, + "Misses": 32013, + "Active": false + }, + { + "Policy": 2, + "Hits": 53406, + "Misses": 32093, + "Active": false + }, + { + "Policy": 6, + "Hits": 51704, + "Misses": 33795, + "Active": false + }, + { + "Policy": 1, + "Hits": 51664, + "Misses": 33835, + "Active": true + }, + { + "Policy": 5, + "Hits": 50503, + "Misses": 34996, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.047505236586282806, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 44061, + "Misses": 30415, + "Active": false + }, + { + "Policy": 8, + "Hits": 43470, + "Misses": 31006, + "Active": false + }, + { + "Policy": 9, + "Hits": 43388, + "Misses": 31088, + "Active": false + }, + { + "Policy": 3, + "Hits": 42612, + "Misses": 31864, + "Active": false + }, + { + "Policy": 2, + "Hits": 42580, + "Misses": 31896, + "Active": false + }, + { + "Policy": 4, + "Hits": 42559, + "Misses": 31917, + "Active": false + }, + { + "Policy": 6, + "Hits": 40563, + "Misses": 33913, + "Active": false + }, + { + "Policy": 1, + "Hits": 40523, + "Misses": 33953, + "Active": true + }, + { + "Policy": 5, + "Hits": 39413, + "Misses": 35063, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.033245494329678604, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 54102, + "Misses": 30902, + "Active": false + }, + { + "Policy": 8, + "Hits": 53688, + "Misses": 31316, + "Active": false + }, + { + "Policy": 9, + "Hits": 53657, + "Misses": 31347, + "Active": false + }, + { + "Policy": 4, + "Hits": 52985, + "Misses": 32019, + "Active": false + }, + { + "Policy": 3, + "Hits": 52983, + "Misses": 32021, + "Active": false + }, + { + "Policy": 2, + "Hits": 52785, + "Misses": 32219, + "Active": false + }, + { + "Policy": 6, + "Hits": 51312, + "Misses": 33692, + "Active": false + }, + { + "Policy": 1, + "Hits": 51276, + "Misses": 33728, + "Active": true + }, + { + "Policy": 5, + "Hits": 49814, + "Misses": 35190, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.02663216400177215, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 68493, + "Misses": 30823, + "Active": false + }, + { + "Policy": 8, + "Hits": 68236, + "Misses": 31080, + "Active": false + }, + { + "Policy": 9, + "Hits": 68193, + "Misses": 31123, + "Active": false + }, + { + "Policy": 3, + "Hits": 67478, + "Misses": 31838, + "Active": false + }, + { + "Policy": 4, + "Hits": 67421, + "Misses": 31895, + "Active": false + }, + { + "Policy": 2, + "Hits": 67360, + "Misses": 31956, + "Active": false + }, + { + "Policy": 6, + "Hits": 65925, + "Misses": 33391, + "Active": false + }, + { + "Policy": 1, + "Hits": 65848, + "Misses": 33468, + "Active": true + }, + { + "Policy": 5, + "Hits": 64628, + "Misses": 34688, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 66.389, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.026871383323580522, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 77022, + "Misses": 30639, + "Active": false + }, + { + "Policy": 8, + "Hits": 76710, + "Misses": 30951, + "Active": false + }, + { + "Policy": 9, + "Hits": 76702, + "Misses": 30959, + "Active": false + }, + { + "Policy": 3, + "Hits": 76018, + "Misses": 31643, + "Active": false + }, + { + "Policy": 4, + "Hits": 76010, + "Misses": 31651, + "Active": false + }, + { + "Policy": 2, + "Hits": 75808, + "Misses": 31853, + "Active": false + }, + { + "Policy": 6, + "Hits": 74179, + "Misses": 33482, + "Active": false + }, + { + "Policy": 1, + "Hits": 74129, + "Misses": 33532, + "Active": true + }, + { + "Policy": 5, + "Hits": 72934, + "Misses": 34727, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 1337313, + "sieve_hits": 1378480, + "fifo_hits": 1313815, + "different_lfu_sieve_decisions": 130305, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_hm_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 818034, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 17.0071, + 17.0071, + 17.0071 + ] + }, + "ARC": { + "runs": [ + 16.64985, + 16.64985, + 16.64985 + ] + }, + "LFU": { + "runs": [ + 14.9886, + 14.9886, + 14.9886 + ] + }, + "LRU": { + "runs": [ + 11.397350000000001, + 11.397350000000001, + 11.397350000000001 + ] + }, + "Random": { + "runs": [ + 12.601299999999998, + 12.611349999999998, + 12.6382, + 12.6311, + 12.63065, + 12.61825, + 12.614700000000001, + 12.62325, + 12.631899999999998, + 12.6268, + 12.618199999999998, + 12.61635, + 12.62865, + 12.62165, + 12.63555 + ] + }, + "S3-FIFO": { + "runs": [ + 15.8427, + 15.8427, + 15.8427 + ] + }, + "SIEVE": { + "runs": [ + 15.187249999999999, + 15.187249999999999, + 15.187249999999999 + ] + }, + "TTL": { + "runs": [ + 11.397350000000001, + 11.397350000000001, + 11.397350000000001 + ] + }, + "W-TinyLFU": { + "runs": [ + 16.0467, + 16.08315, + 16.1326, + 15.98685, + 15.89, + 15.81715, + 15.9939, + 16.1886, + 16.10725, + 16.0112, + 15.851799999999999, + 16.25415, + 15.808050000000001, + 16.3279, + 16.1858 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 14.37675, + 14.339550000000001, + 15.116150000000001, + 14.447, + 14.47205, + 15.511849999999999, + 15.472549999999998, + 15.38375, + 14.329, + 14.493400000000001, + 15.58835, + 14.3127, + 15.13085, + 15.489700000000001, + 12.53265 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 13.0995, + 12.1231, + 12.876399999999999, + 13.74585, + 12.8886, + 12.74305, + 12.423399999999999, + 12.882850000000001, + 13.48805, + 13.713000000000001, + 13.57805, + 12.8882, + 14.410899999999998, + 13.0345, + 14.355550000000001 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 14.1995, + 14.547699999999999, + 15.825849999999999, + 15.81655, + 14.438200000000002, + 14.657899999999998, + 13.483149999999998, + 16.0838, + 14.60435, + 15.8362, + 13.901150000000001, + 15.65325, + 15.902450000000002, + 14.189850000000002, + 14.3657 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05503816122506816, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18889, + "Misses": 83440, + "Active": false + }, + { + "Policy": 7, + "Hits": 18386, + "Misses": 83943, + "Active": false + }, + { + "Policy": 4, + "Hits": 18342, + "Misses": 83987, + "Active": false + }, + { + "Policy": 8, + "Hits": 17647, + "Misses": 84682, + "Active": false + }, + { + "Policy": 2, + "Hits": 17351, + "Misses": 84978, + "Active": false + }, + { + "Policy": 9, + "Hits": 15803, + "Misses": 86526, + "Active": false + }, + { + "Policy": 5, + "Hits": 14471, + "Misses": 87858, + "Active": false + }, + { + "Policy": 1, + "Hits": 13257, + "Misses": 89072, + "Active": true + }, + { + "Policy": 6, + "Hits": 13255, + "Misses": 89074, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05540705928428061, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18770, + "Misses": 83365, + "Active": false + }, + { + "Policy": 7, + "Hits": 18735, + "Misses": 83400, + "Active": false + }, + { + "Policy": 4, + "Hits": 18543, + "Misses": 83592, + "Active": false + }, + { + "Policy": 8, + "Hits": 17538, + "Misses": 84597, + "Active": false + }, + { + "Policy": 2, + "Hits": 16764, + "Misses": 85371, + "Active": false + }, + { + "Policy": 9, + "Hits": 15343, + "Misses": 86792, + "Active": false + }, + { + "Policy": 5, + "Hits": 14406, + "Misses": 87729, + "Active": false + }, + { + "Policy": 1, + "Hits": 13111, + "Misses": 89024, + "Active": true + }, + { + "Policy": 6, + "Hits": 13082, + "Misses": 89053, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05567274519467719, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 18611, + "Misses": 82839, + "Active": false + }, + { + "Policy": 4, + "Hits": 18239, + "Misses": 83211, + "Active": false + }, + { + "Policy": 7, + "Hits": 17788, + "Misses": 83662, + "Active": false + }, + { + "Policy": 8, + "Hits": 17343, + "Misses": 84107, + "Active": false + }, + { + "Policy": 2, + "Hits": 16665, + "Misses": 84785, + "Active": false + }, + { + "Policy": 9, + "Hits": 15104, + "Misses": 86346, + "Active": false + }, + { + "Policy": 5, + "Hits": 14305, + "Misses": 87145, + "Active": false + }, + { + "Policy": 1, + "Hits": 12963, + "Misses": 88487, + "Active": true + }, + { + "Policy": 6, + "Hits": 12952, + "Misses": 88498, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05613001544393646, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 15149, + "Misses": 82624, + "Active": false + }, + { + "Policy": 7, + "Hits": 14961, + "Misses": 82812, + "Active": false + }, + { + "Policy": 4, + "Hits": 14668, + "Misses": 83105, + "Active": false + }, + { + "Policy": 8, + "Hits": 14091, + "Misses": 83682, + "Active": false + }, + { + "Policy": 2, + "Hits": 13239, + "Misses": 84534, + "Active": false + }, + { + "Policy": 9, + "Hits": 12127, + "Misses": 85646, + "Active": false + }, + { + "Policy": 5, + "Hits": 10992, + "Misses": 86781, + "Active": false + }, + { + "Policy": 6, + "Hits": 9689, + "Misses": 88084, + "Active": false + }, + { + "Policy": 1, + "Hits": 9661, + "Misses": 88112, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05897804929598728, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 17252, + "Misses": 82107, + "Active": false + }, + { + "Policy": 3, + "Hits": 17073, + "Misses": 82286, + "Active": false + }, + { + "Policy": 4, + "Hits": 16789, + "Misses": 82570, + "Active": false + }, + { + "Policy": 8, + "Hits": 16105, + "Misses": 83254, + "Active": false + }, + { + "Policy": 2, + "Hits": 15814, + "Misses": 83545, + "Active": false + }, + { + "Policy": 9, + "Hits": 14567, + "Misses": 84792, + "Active": false + }, + { + "Policy": 5, + "Hits": 12777, + "Misses": 86582, + "Active": false + }, + { + "Policy": 6, + "Hits": 11442, + "Misses": 87917, + "Active": false + }, + { + "Policy": 1, + "Hits": 11392, + "Misses": 87967, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05434178042759144, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 19060, + "Misses": 83421, + "Active": false + }, + { + "Policy": 4, + "Hits": 18737, + "Misses": 83744, + "Active": false + }, + { + "Policy": 7, + "Hits": 18103, + "Misses": 84378, + "Active": false + }, + { + "Policy": 8, + "Hits": 18043, + "Misses": 84438, + "Active": false + }, + { + "Policy": 2, + "Hits": 17475, + "Misses": 85006, + "Active": false + }, + { + "Policy": 9, + "Hits": 16308, + "Misses": 86173, + "Active": false + }, + { + "Policy": 5, + "Hits": 14648, + "Misses": 87833, + "Active": false + }, + { + "Policy": 6, + "Hits": 13496, + "Misses": 88985, + "Active": false + }, + { + "Policy": 1, + "Hits": 13491, + "Misses": 88990, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05686675898609188, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 17519, + "Misses": 82135, + "Active": false + }, + { + "Policy": 3, + "Hits": 17141, + "Misses": 82513, + "Active": false + }, + { + "Policy": 4, + "Hits": 16956, + "Misses": 82698, + "Active": false + }, + { + "Policy": 8, + "Hits": 16320, + "Misses": 83334, + "Active": false + }, + { + "Policy": 2, + "Hits": 15690, + "Misses": 83964, + "Active": false + }, + { + "Policy": 9, + "Hits": 14339, + "Misses": 85315, + "Active": false + }, + { + "Policy": 5, + "Hits": 13119, + "Misses": 86535, + "Active": false + }, + { + "Policy": 6, + "Hits": 11894, + "Misses": 87760, + "Active": false + }, + { + "Policy": 1, + "Hits": 11852, + "Misses": 87802, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.054319628959987404, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 18589, + "Misses": 83179, + "Active": false + }, + { + "Policy": 3, + "Hits": 18523, + "Misses": 83245, + "Active": false + }, + { + "Policy": 4, + "Hits": 18293, + "Misses": 83475, + "Active": false + }, + { + "Policy": 8, + "Hits": 17578, + "Misses": 84190, + "Active": false + }, + { + "Policy": 2, + "Hits": 16505, + "Misses": 85263, + "Active": false + }, + { + "Policy": 9, + "Hits": 15358, + "Misses": 86410, + "Active": false + }, + { + "Policy": 5, + "Hits": 14244, + "Misses": 87524, + "Active": false + }, + { + "Policy": 1, + "Hits": 13061, + "Misses": 88707, + "Active": true + }, + { + "Policy": 6, + "Hits": 13014, + "Misses": 88754, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05747680319885168, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 15625, + "Misses": 81910, + "Active": false + }, + { + "Policy": 3, + "Hits": 15536, + "Misses": 81999, + "Active": false + }, + { + "Policy": 4, + "Hits": 15183, + "Misses": 82352, + "Active": false + }, + { + "Policy": 8, + "Hits": 14332, + "Misses": 83203, + "Active": false + }, + { + "Policy": 2, + "Hits": 13758, + "Misses": 83777, + "Active": false + }, + { + "Policy": 9, + "Hits": 12412, + "Misses": 85123, + "Active": false + }, + { + "Policy": 5, + "Hits": 11427, + "Misses": 86108, + "Active": false + }, + { + "Policy": 6, + "Hits": 10047, + "Misses": 87488, + "Active": false + }, + { + "Policy": 1, + "Hits": 10019, + "Misses": 87516, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.056161501163889946, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 14755, + "Misses": 83622, + "Active": false + }, + { + "Policy": 4, + "Hits": 14351, + "Misses": 84026, + "Active": false + }, + { + "Policy": 7, + "Hits": 13787, + "Misses": 84590, + "Active": false + }, + { + "Policy": 8, + "Hits": 13392, + "Misses": 84985, + "Active": false + }, + { + "Policy": 2, + "Hits": 12969, + "Misses": 85408, + "Active": false + }, + { + "Policy": 9, + "Hits": 11445, + "Misses": 86932, + "Active": false + }, + { + "Policy": 5, + "Hits": 10271, + "Misses": 88106, + "Active": false + }, + { + "Policy": 6, + "Hits": 9231, + "Misses": 89146, + "Active": false + }, + { + "Policy": 1, + "Hits": 9230, + "Misses": 89147, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.05708595748122239, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 15666, + "Misses": 83255, + "Active": false + }, + { + "Policy": 4, + "Hits": 15294, + "Misses": 83627, + "Active": false + }, + { + "Policy": 8, + "Hits": 14402, + "Misses": 84519, + "Active": false + }, + { + "Policy": 7, + "Hits": 14324, + "Misses": 84597, + "Active": false + }, + { + "Policy": 2, + "Hits": 13533, + "Misses": 85388, + "Active": false + }, + { + "Policy": 9, + "Hits": 12453, + "Misses": 86468, + "Active": false + }, + { + "Policy": 5, + "Hits": 11140, + "Misses": 87781, + "Active": false + }, + { + "Policy": 1, + "Hits": 10019, + "Misses": 88902, + "Active": true + }, + { + "Policy": 6, + "Hits": 10001, + "Misses": 88920, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.055903575440478484, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 16580, + "Misses": 82233, + "Active": false + }, + { + "Policy": 3, + "Hits": 16399, + "Misses": 82414, + "Active": false + }, + { + "Policy": 4, + "Hits": 16057, + "Misses": 82756, + "Active": false + }, + { + "Policy": 8, + "Hits": 15438, + "Misses": 83375, + "Active": false + }, + { + "Policy": 2, + "Hits": 14715, + "Misses": 84098, + "Active": false + }, + { + "Policy": 9, + "Hits": 14422, + "Misses": 84391, + "Active": false + }, + { + "Policy": 5, + "Hits": 12354, + "Misses": 86459, + "Active": false + }, + { + "Policy": 6, + "Hits": 11061, + "Misses": 87752, + "Active": false + }, + { + "Policy": 1, + "Hits": 11056, + "Misses": 87757, + "Active": true + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.057784339680276964, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 16515, + "Misses": 81695, + "Active": false + }, + { + "Policy": 7, + "Hits": 16358, + "Misses": 81852, + "Active": false + }, + { + "Policy": 4, + "Hits": 16281, + "Misses": 81929, + "Active": false + }, + { + "Policy": 8, + "Hits": 15324, + "Misses": 82886, + "Active": false + }, + { + "Policy": 2, + "Hits": 15279, + "Misses": 82931, + "Active": false + }, + { + "Policy": 9, + "Hits": 14252, + "Misses": 83958, + "Active": false + }, + { + "Policy": 5, + "Hits": 12187, + "Misses": 86023, + "Active": false + }, + { + "Policy": 6, + "Hits": 10907, + "Misses": 87303, + "Active": false + }, + { + "Policy": 1, + "Hits": 10840, + "Misses": 87370, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.058537228379351255, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 16434, + "Misses": 82187, + "Active": false + }, + { + "Policy": 4, + "Hits": 16108, + "Misses": 82513, + "Active": false + }, + { + "Policy": 7, + "Hits": 15874, + "Misses": 82747, + "Active": false + }, + { + "Policy": 2, + "Hits": 14968, + "Misses": 83653, + "Active": false + }, + { + "Policy": 8, + "Hits": 14966, + "Misses": 83655, + "Active": false + }, + { + "Policy": 9, + "Hits": 13447, + "Misses": 85174, + "Active": false + }, + { + "Policy": 5, + "Hits": 12028, + "Misses": 86593, + "Active": false + }, + { + "Policy": 6, + "Hits": 10720, + "Misses": 87901, + "Active": false + }, + { + "Policy": 1, + "Hits": 10661, + "Misses": 87960, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 11.397350000000001, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.05739375882076213, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 18583, + "Misses": 83449, + "Active": false + }, + { + "Policy": 3, + "Hits": 18183, + "Misses": 83849, + "Active": false + }, + { + "Policy": 4, + "Hits": 18058, + "Misses": 83974, + "Active": false + }, + { + "Policy": 8, + "Hits": 17190, + "Misses": 84842, + "Active": false + }, + { + "Policy": 2, + "Hits": 16503, + "Misses": 85529, + "Active": false + }, + { + "Policy": 9, + "Hits": 15372, + "Misses": 86660, + "Active": false + }, + { + "Policy": 5, + "Hits": 13831, + "Misses": 88201, + "Active": false + }, + { + "Policy": 1, + "Hits": 12727, + "Misses": 89305, + "Active": true + }, + { + "Policy": 6, + "Hits": 12618, + "Misses": 89414, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 299772, + "sieve_hits": 303745, + "fifo_hits": 228175, + "different_lfu_sieve_decisions": 34189, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_prn_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1900653, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.03775, + 1.03775, + 1.03775 + ] + }, + "ARC": { + "runs": [ + 1.02225, + 1.02225, + 1.02225 + ] + }, + "LFU": { + "runs": [ + 1.05595, + 1.05595, + 1.05595 + ] + }, + "LRU": { + "runs": [ + 1.0038, + 1.0038, + 1.0038 + ] + }, + "Random": { + "runs": [ + 0.9417500000000001, + 0.9482499999999999, + 0.9435499999999999, + 0.9471999999999999, + 0.9421, + 0.9440000000000001, + 0.9433, + 0.9499000000000001, + 0.9442, + 0.9436, + 0.9424999999999999, + 0.94815, + 0.9467, + 0.94555, + 0.9466 + ] + }, + "S3-FIFO": { + "runs": [ + 1.008, + 1.008, + 1.008 + ] + }, + "SIEVE": { + "runs": [ + 1.05595, + 1.05595, + 1.05595 + ] + }, + "TTL": { + "runs": [ + 1.0038, + 1.0038, + 1.0038 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.7302000000000001, + 0.7536499999999999, + 0.6962, + 0.68825, + 0.78425, + 0.7935, + 0.92935, + 0.73585, + 0.7497, + 0.7593, + 0.78225, + 0.66565, + 0.7807, + 0.7156, + 0.74005 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 0.8665499999999999, + 0.8373, + 0.8399, + 0.86795, + 0.8651000000000001, + 0.8697999999999999, + 0.84025, + 0.86825, + 0.86475, + 0.8686499999999999, + 0.8684499999999999, + 0.86675, + 0.8382499999999999, + 0.86765, + 0.8685 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 0.931, + 0.7058, + 0.729, + 0.9643999999999999, + 0.9653, + 0.8369, + 0.7254499999999999, + 0.7307, + 0.72275, + 0.71085, + 0.72305, + 0.7104, + 0.84765, + 0.70195, + 0.83815 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.05655, + 1.01575, + 1.0473, + 1.05545, + 1.0707, + 1.0852499999999998, + 1.0545, + 1.04605, + 0.9756499999999999, + 1.0381, + 1.0795000000000001, + 0.9756, + 1.04515, + 1.0838, + 1.0828 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000362358956808825, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 853, + "Misses": 98496, + "Active": false + }, + { + "Policy": 9, + "Hits": 853, + "Misses": 98496, + "Active": false + }, + { + "Policy": 3, + "Hits": 849, + "Misses": 98500, + "Active": false + }, + { + "Policy": 4, + "Hits": 846, + "Misses": 98503, + "Active": false + }, + { + "Policy": 8, + "Hits": 819, + "Misses": 98530, + "Active": false + }, + { + "Policy": 6, + "Hits": 818, + "Misses": 98531, + "Active": false + }, + { + "Policy": 1, + "Hits": 817, + "Misses": 98532, + "Active": true + }, + { + "Policy": 5, + "Hits": 758, + "Misses": 98591, + "Active": false + }, + { + "Policy": 7, + "Hits": 588, + "Misses": 98761, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005302439121996107, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1262, + "Misses": 98692, + "Active": false + }, + { + "Policy": 9, + "Hits": 1262, + "Misses": 98692, + "Active": false + }, + { + "Policy": 3, + "Hits": 1249, + "Misses": 98705, + "Active": false + }, + { + "Policy": 4, + "Hits": 1240, + "Misses": 98714, + "Active": false + }, + { + "Policy": 8, + "Hits": 1218, + "Misses": 98736, + "Active": false + }, + { + "Policy": 6, + "Hits": 1211, + "Misses": 98743, + "Active": false + }, + { + "Policy": 1, + "Hits": 1209, + "Misses": 98745, + "Active": true + }, + { + "Policy": 5, + "Hits": 1150, + "Misses": 98804, + "Active": false + }, + { + "Policy": 7, + "Hits": 872, + "Misses": 99082, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0006821077128326535, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 883, + "Misses": 98808, + "Active": false + }, + { + "Policy": 9, + "Hits": 883, + "Misses": 98808, + "Active": false + }, + { + "Policy": 3, + "Hits": 870, + "Misses": 98821, + "Active": false + }, + { + "Policy": 4, + "Hits": 852, + "Misses": 98839, + "Active": false + }, + { + "Policy": 8, + "Hits": 820, + "Misses": 98871, + "Active": false + }, + { + "Policy": 6, + "Hits": 816, + "Misses": 98875, + "Active": false + }, + { + "Policy": 1, + "Hits": 815, + "Misses": 98876, + "Active": true + }, + { + "Policy": 5, + "Hits": 766, + "Misses": 98925, + "Active": false + }, + { + "Policy": 7, + "Hits": 530, + "Misses": 99161, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004382295526074668, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1314, + "Misses": 99090, + "Active": false + }, + { + "Policy": 9, + "Hits": 1314, + "Misses": 99090, + "Active": false + }, + { + "Policy": 3, + "Hits": 1279, + "Misses": 99125, + "Active": false + }, + { + "Policy": 4, + "Hits": 1276, + "Misses": 99128, + "Active": false + }, + { + "Policy": 1, + "Hits": 1270, + "Misses": 99134, + "Active": true + }, + { + "Policy": 6, + "Hits": 1269, + "Misses": 99135, + "Active": false + }, + { + "Policy": 8, + "Hits": 1268, + "Misses": 99136, + "Active": false + }, + { + "Policy": 5, + "Hits": 1190, + "Misses": 99214, + "Active": false + }, + { + "Policy": 7, + "Hits": 817, + "Misses": 99587, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0006399872002559939, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1035, + "Misses": 98967, + "Active": false + }, + { + "Policy": 9, + "Hits": 1035, + "Misses": 98967, + "Active": false + }, + { + "Policy": 3, + "Hits": 1000, + "Misses": 99002, + "Active": false + }, + { + "Policy": 4, + "Hits": 993, + "Misses": 99009, + "Active": false + }, + { + "Policy": 8, + "Hits": 980, + "Misses": 99022, + "Active": false + }, + { + "Policy": 1, + "Hits": 971, + "Misses": 99031, + "Active": true + }, + { + "Policy": 6, + "Hits": 967, + "Misses": 99035, + "Active": false + }, + { + "Policy": 5, + "Hits": 920, + "Misses": 99082, + "Active": false + }, + { + "Policy": 7, + "Hits": 618, + "Misses": 99384, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000582955584815012, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1193, + "Misses": 98300, + "Active": false + }, + { + "Policy": 9, + "Hits": 1193, + "Misses": 98300, + "Active": false + }, + { + "Policy": 3, + "Hits": 1185, + "Misses": 98308, + "Active": false + }, + { + "Policy": 4, + "Hits": 1177, + "Misses": 98316, + "Active": false + }, + { + "Policy": 8, + "Hits": 1137, + "Misses": 98356, + "Active": false + }, + { + "Policy": 1, + "Hits": 1135, + "Misses": 98358, + "Active": true + }, + { + "Policy": 6, + "Hits": 1131, + "Misses": 98362, + "Active": false + }, + { + "Policy": 5, + "Hits": 1076, + "Misses": 98417, + "Active": false + }, + { + "Policy": 7, + "Hits": 781, + "Misses": 98712, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00038844621513944334, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1019, + "Misses": 99381, + "Active": false + }, + { + "Policy": 9, + "Hits": 1019, + "Misses": 99381, + "Active": false + }, + { + "Policy": 4, + "Hits": 1006, + "Misses": 99394, + "Active": false + }, + { + "Policy": 3, + "Hits": 991, + "Misses": 99409, + "Active": false + }, + { + "Policy": 8, + "Hits": 984, + "Misses": 99416, + "Active": false + }, + { + "Policy": 1, + "Hits": 980, + "Misses": 99420, + "Active": true + }, + { + "Policy": 6, + "Hits": 979, + "Misses": 99421, + "Active": false + }, + { + "Policy": 5, + "Hits": 936, + "Misses": 99464, + "Active": false + }, + { + "Policy": 7, + "Hits": 731, + "Misses": 99669, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00038947032036430393, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1008, + "Misses": 99128, + "Active": false + }, + { + "Policy": 9, + "Hits": 1008, + "Misses": 99128, + "Active": false + }, + { + "Policy": 3, + "Hits": 1004, + "Misses": 99132, + "Active": false + }, + { + "Policy": 4, + "Hits": 995, + "Misses": 99141, + "Active": false + }, + { + "Policy": 8, + "Hits": 983, + "Misses": 99153, + "Active": false + }, + { + "Policy": 6, + "Hits": 971, + "Misses": 99165, + "Active": false + }, + { + "Policy": 1, + "Hits": 969, + "Misses": 99167, + "Active": true + }, + { + "Policy": 5, + "Hits": 914, + "Misses": 99222, + "Active": false + }, + { + "Policy": 7, + "Hits": 609, + "Misses": 99527, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005915439296564039, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1089, + "Misses": 98650, + "Active": false + }, + { + "Policy": 9, + "Hits": 1089, + "Misses": 98650, + "Active": false + }, + { + "Policy": 3, + "Hits": 1078, + "Misses": 98661, + "Active": false + }, + { + "Policy": 4, + "Hits": 1054, + "Misses": 98685, + "Active": false + }, + { + "Policy": 8, + "Hits": 1036, + "Misses": 98703, + "Active": false + }, + { + "Policy": 6, + "Hits": 1033, + "Misses": 98706, + "Active": false + }, + { + "Policy": 1, + "Hits": 1030, + "Misses": 98709, + "Active": true + }, + { + "Policy": 5, + "Hits": 964, + "Misses": 98775, + "Active": false + }, + { + "Policy": 7, + "Hits": 761, + "Misses": 98978, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004905690601097277, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 861, + "Misses": 99023, + "Active": false + }, + { + "Policy": 9, + "Hits": 861, + "Misses": 99023, + "Active": false + }, + { + "Policy": 3, + "Hits": 853, + "Misses": 99031, + "Active": false + }, + { + "Policy": 4, + "Hits": 835, + "Misses": 99049, + "Active": false + }, + { + "Policy": 8, + "Hits": 816, + "Misses": 99068, + "Active": false + }, + { + "Policy": 1, + "Hits": 812, + "Misses": 99072, + "Active": true + }, + { + "Policy": 6, + "Hits": 812, + "Misses": 99072, + "Active": false + }, + { + "Policy": 5, + "Hits": 764, + "Misses": 99120, + "Active": false + }, + { + "Policy": 7, + "Hits": 543, + "Misses": 99341, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.000523823914576409, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 968, + "Misses": 98302, + "Active": false + }, + { + "Policy": 9, + "Hits": 968, + "Misses": 98302, + "Active": false + }, + { + "Policy": 3, + "Hits": 954, + "Misses": 98316, + "Active": false + }, + { + "Policy": 4, + "Hits": 946, + "Misses": 98324, + "Active": false + }, + { + "Policy": 8, + "Hits": 929, + "Misses": 98341, + "Active": false + }, + { + "Policy": 6, + "Hits": 921, + "Misses": 98349, + "Active": false + }, + { + "Policy": 1, + "Hits": 916, + "Misses": 98354, + "Active": true + }, + { + "Policy": 5, + "Hits": 862, + "Misses": 98408, + "Active": false + }, + { + "Policy": 7, + "Hits": 575, + "Misses": 98695, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004016386858382206, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 861, + "Misses": 98731, + "Active": false + }, + { + "Policy": 9, + "Hits": 861, + "Misses": 98731, + "Active": false + }, + { + "Policy": 3, + "Hits": 852, + "Misses": 98740, + "Active": false + }, + { + "Policy": 4, + "Hits": 848, + "Misses": 98744, + "Active": false + }, + { + "Policy": 8, + "Hits": 828, + "Misses": 98764, + "Active": false + }, + { + "Policy": 1, + "Hits": 821, + "Misses": 98771, + "Active": true + }, + { + "Policy": 6, + "Hits": 819, + "Misses": 98773, + "Active": false + }, + { + "Policy": 5, + "Hits": 753, + "Misses": 98839, + "Active": false + }, + { + "Policy": 7, + "Hits": 585, + "Misses": 99007, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004894420360788704, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1296, + "Misses": 98818, + "Active": false + }, + { + "Policy": 9, + "Hits": 1296, + "Misses": 98818, + "Active": false + }, + { + "Policy": 3, + "Hits": 1285, + "Misses": 98829, + "Active": false + }, + { + "Policy": 4, + "Hits": 1269, + "Misses": 98845, + "Active": false + }, + { + "Policy": 6, + "Hits": 1250, + "Misses": 98864, + "Active": false + }, + { + "Policy": 1, + "Hits": 1247, + "Misses": 98867, + "Active": true + }, + { + "Policy": 8, + "Hits": 1247, + "Misses": 98867, + "Active": false + }, + { + "Policy": 5, + "Hits": 1183, + "Misses": 98931, + "Active": false + }, + { + "Policy": 7, + "Hits": 889, + "Misses": 99225, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0005552085502116728, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1029, + "Misses": 99834, + "Active": false + }, + { + "Policy": 9, + "Hits": 1029, + "Misses": 99834, + "Active": false + }, + { + "Policy": 3, + "Hits": 1014, + "Misses": 99849, + "Active": false + }, + { + "Policy": 4, + "Hits": 1002, + "Misses": 99861, + "Active": false + }, + { + "Policy": 8, + "Hits": 985, + "Misses": 99878, + "Active": false + }, + { + "Policy": 1, + "Hits": 973, + "Misses": 99890, + "Active": true + }, + { + "Policy": 6, + "Hits": 973, + "Misses": 99890, + "Active": false + }, + { + "Policy": 5, + "Hits": 909, + "Misses": 99954, + "Active": false + }, + { + "Policy": 7, + "Hits": 547, + "Misses": 100316, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.0038, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0004388414585494282, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 1456, + "Misses": 98808, + "Active": false + }, + { + "Policy": 9, + "Hits": 1456, + "Misses": 98808, + "Active": false + }, + { + "Policy": 3, + "Hits": 1439, + "Misses": 98825, + "Active": false + }, + { + "Policy": 4, + "Hits": 1432, + "Misses": 98832, + "Active": false + }, + { + "Policy": 8, + "Hits": 1419, + "Misses": 98845, + "Active": false + }, + { + "Policy": 1, + "Hits": 1412, + "Misses": 98852, + "Active": true + }, + { + "Policy": 6, + "Hits": 1412, + "Misses": 98852, + "Active": false + }, + { + "Policy": 5, + "Hits": 1343, + "Misses": 98921, + "Active": false + }, + { + "Policy": 7, + "Hits": 969, + "Misses": 99295, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 21119, + "sieve_hits": 21119, + "fifo_hits": 20052, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_proj_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1748195, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 5.38475, + 5.38475, + 5.38475 + ] + }, + "ARC": { + "runs": [ + 5.38475, + 5.38475, + 5.38475 + ] + }, + "LFU": { + "runs": [ + 4.72735, + 4.72735, + 4.72735 + ] + }, + "LRU": { + "runs": [ + 5.3511999999999995, + 5.3511999999999995, + 5.3511999999999995 + ] + }, + "Random": { + "runs": [ + 5.199800000000001, + 5.20305, + 5.20995, + 5.2, + 5.1986, + 5.20455, + 5.20285, + 5.2183, + 5.2040500000000005, + 5.199249999999999, + 5.2073, + 5.2099, + 5.2011, + 5.2105, + 5.2063 + ] + }, + "S3-FIFO": { + "runs": [ + 5.7946, + 5.7946, + 5.7946 + ] + }, + "SIEVE": { + "runs": [ + 4.72735, + 4.72735, + 4.72735 + ] + }, + "TTL": { + "runs": [ + 5.3511999999999995, + 5.3511999999999995, + 5.3511999999999995 + ] + }, + "W-TinyLFU": { + "runs": [ + 4.22635, + 4.9845, + 4.10585, + 4.2909999999999995, + 4.94925, + 4.290150000000001, + 4.255649999999999, + 4.23055, + 4.17295, + 4.1902, + 4.15115, + 4.2851, + 4.125249999999999, + 5.03775, + 5.06415 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 5.1378, + 5.3511999999999995, + 5.1556999999999995, + 5.3511999999999995, + 5.13095, + 5.1432, + 5.1450000000000005, + 5.12815, + 5.13185, + 5.1362, + 5.138199999999999, + 5.13235, + 5.3511999999999995, + 5.1352, + 5.1328 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 5.0832500000000005, + 5.1277, + 5.07925, + 5.09625, + 5.0764, + 5.06895, + 5.06715, + 5.12265, + 5.08085, + 5.0935500000000005, + 5.13975, + 5.098, + 5.079750000000001, + 5.183800000000001, + 5.0964 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 5.556649999999999, + 5.35845, + 5.327, + 5.42245, + 5.5105, + 5.36935, + 5.41735, + 5.34525, + 5.35935, + 5.5329999999999995, + 5.3634, + 5.3869, + 5.38535, + 5.4166, + 5.52585 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.00777071349278434, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5582, + "Misses": 93508, + "Active": false + }, + { + "Policy": 8, + "Hits": 5292, + "Misses": 93798, + "Active": false + }, + { + "Policy": 6, + "Hits": 4949, + "Misses": 94141, + "Active": false + }, + { + "Policy": 3, + "Hits": 4825, + "Misses": 94265, + "Active": false + }, + { + "Policy": 4, + "Hits": 4824, + "Misses": 94266, + "Active": false + }, + { + "Policy": 1, + "Hits": 4812, + "Misses": 94278, + "Active": true + }, + { + "Policy": 5, + "Hits": 4624, + "Misses": 94466, + "Active": false + }, + { + "Policy": 9, + "Hits": 4510, + "Misses": 94580, + "Active": false + }, + { + "Policy": 2, + "Hits": 4230, + "Misses": 94860, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.006584899969840151, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6025, + "Misses": 93445, + "Active": false + }, + { + "Policy": 8, + "Hits": 5856, + "Misses": 93614, + "Active": false + }, + { + "Policy": 6, + "Hits": 5464, + "Misses": 94006, + "Active": false + }, + { + "Policy": 4, + "Hits": 5400, + "Misses": 94070, + "Active": false + }, + { + "Policy": 3, + "Hits": 5398, + "Misses": 94072, + "Active": false + }, + { + "Policy": 1, + "Hits": 5370, + "Misses": 94100, + "Active": true + }, + { + "Policy": 5, + "Hits": 5250, + "Misses": 94220, + "Active": false + }, + { + "Policy": 9, + "Hits": 5107, + "Misses": 94363, + "Active": false + }, + { + "Policy": 2, + "Hits": 4735, + "Misses": 94735, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.005855152534230128, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5625, + "Misses": 94287, + "Active": false + }, + { + "Policy": 8, + "Hits": 5519, + "Misses": 94393, + "Active": false + }, + { + "Policy": 6, + "Hits": 5174, + "Misses": 94738, + "Active": false + }, + { + "Policy": 3, + "Hits": 5080, + "Misses": 94832, + "Active": false + }, + { + "Policy": 4, + "Hits": 5074, + "Misses": 94838, + "Active": false + }, + { + "Policy": 9, + "Hits": 5046, + "Misses": 94866, + "Active": false + }, + { + "Policy": 1, + "Hits": 5040, + "Misses": 94872, + "Active": true + }, + { + "Policy": 5, + "Hits": 4972, + "Misses": 94940, + "Active": false + }, + { + "Policy": 2, + "Hits": 4427, + "Misses": 95485, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004568578553615962, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6118, + "Misses": 94132, + "Active": false + }, + { + "Policy": 7, + "Hits": 5798, + "Misses": 94452, + "Active": false + }, + { + "Policy": 4, + "Hits": 5707, + "Misses": 94543, + "Active": false + }, + { + "Policy": 3, + "Hits": 5705, + "Misses": 94545, + "Active": false + }, + { + "Policy": 1, + "Hits": 5660, + "Misses": 94590, + "Active": true + }, + { + "Policy": 6, + "Hits": 5623, + "Misses": 94627, + "Active": false + }, + { + "Policy": 5, + "Hits": 5537, + "Misses": 94713, + "Active": false + }, + { + "Policy": 9, + "Hits": 5359, + "Misses": 94891, + "Active": false + }, + { + "Policy": 2, + "Hits": 5006, + "Misses": 95244, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007184598142811402, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6288, + "Misses": 93648, + "Active": false + }, + { + "Policy": 8, + "Hits": 6072, + "Misses": 93864, + "Active": false + }, + { + "Policy": 3, + "Hits": 5612, + "Misses": 94324, + "Active": false + }, + { + "Policy": 6, + "Hits": 5605, + "Misses": 94331, + "Active": false + }, + { + "Policy": 1, + "Hits": 5570, + "Misses": 94366, + "Active": true + }, + { + "Policy": 4, + "Hits": 5537, + "Misses": 94399, + "Active": false + }, + { + "Policy": 5, + "Hits": 5481, + "Misses": 94455, + "Active": false + }, + { + "Policy": 9, + "Hits": 5372, + "Misses": 94564, + "Active": false + }, + { + "Policy": 2, + "Hits": 4978, + "Misses": 94958, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007255163291278774, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5823, + "Misses": 93968, + "Active": false + }, + { + "Policy": 8, + "Hits": 5651, + "Misses": 94140, + "Active": false + }, + { + "Policy": 6, + "Hits": 5256, + "Misses": 94535, + "Active": false + }, + { + "Policy": 3, + "Hits": 5159, + "Misses": 94632, + "Active": false + }, + { + "Policy": 4, + "Hits": 5152, + "Misses": 94639, + "Active": false + }, + { + "Policy": 1, + "Hits": 5099, + "Misses": 94692, + "Active": true + }, + { + "Policy": 5, + "Hits": 4961, + "Misses": 94830, + "Active": false + }, + { + "Policy": 9, + "Hits": 4824, + "Misses": 94967, + "Active": false + }, + { + "Policy": 2, + "Hits": 4452, + "Misses": 95339, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.005766145206578421, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5618, + "Misses": 94102, + "Active": false + }, + { + "Policy": 7, + "Hits": 5168, + "Misses": 94552, + "Active": false + }, + { + "Policy": 4, + "Hits": 5131, + "Misses": 94589, + "Active": false + }, + { + "Policy": 3, + "Hits": 5118, + "Misses": 94602, + "Active": false + }, + { + "Policy": 6, + "Hits": 5048, + "Misses": 94672, + "Active": false + }, + { + "Policy": 1, + "Hits": 5043, + "Misses": 94677, + "Active": true + }, + { + "Policy": 5, + "Hits": 4960, + "Misses": 94760, + "Active": false + }, + { + "Policy": 9, + "Hits": 4804, + "Misses": 94916, + "Active": false + }, + { + "Policy": 2, + "Hits": 4477, + "Misses": 95243, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004723698726306291, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5404, + "Misses": 94306, + "Active": false + }, + { + "Policy": 3, + "Hits": 4948, + "Misses": 94762, + "Active": false + }, + { + "Policy": 1, + "Hits": 4933, + "Misses": 94777, + "Active": true + }, + { + "Policy": 6, + "Hits": 4925, + "Misses": 94785, + "Active": false + }, + { + "Policy": 4, + "Hits": 4913, + "Misses": 94797, + "Active": false + }, + { + "Policy": 7, + "Hits": 4778, + "Misses": 94932, + "Active": false + }, + { + "Policy": 5, + "Hits": 4774, + "Misses": 94936, + "Active": false + }, + { + "Policy": 9, + "Hits": 4623, + "Misses": 95087, + "Active": false + }, + { + "Policy": 2, + "Hits": 4286, + "Misses": 95424, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.007524941943328721, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 6103, + "Misses": 94230, + "Active": false + }, + { + "Policy": 8, + "Hits": 5850, + "Misses": 94483, + "Active": false + }, + { + "Policy": 3, + "Hits": 5398, + "Misses": 94935, + "Active": false + }, + { + "Policy": 4, + "Hits": 5390, + "Misses": 94943, + "Active": false + }, + { + "Policy": 1, + "Hits": 5348, + "Misses": 94985, + "Active": true + }, + { + "Policy": 6, + "Hits": 5277, + "Misses": 95056, + "Active": false + }, + { + "Policy": 5, + "Hits": 5174, + "Misses": 95159, + "Active": false + }, + { + "Policy": 9, + "Hits": 5023, + "Misses": 95310, + "Active": false + }, + { + "Policy": 2, + "Hits": 4776, + "Misses": 95557, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0046654291698513956, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6507, + "Misses": 94234, + "Active": false + }, + { + "Policy": 7, + "Hits": 6134, + "Misses": 94607, + "Active": false + }, + { + "Policy": 3, + "Hits": 6091, + "Misses": 94650, + "Active": false + }, + { + "Policy": 4, + "Hits": 6085, + "Misses": 94656, + "Active": false + }, + { + "Policy": 1, + "Hits": 6037, + "Misses": 94704, + "Active": true + }, + { + "Policy": 6, + "Hits": 5996, + "Misses": 94745, + "Active": false + }, + { + "Policy": 5, + "Hits": 5870, + "Misses": 94871, + "Active": false + }, + { + "Policy": 9, + "Hits": 5758, + "Misses": 94983, + "Active": false + }, + { + "Policy": 2, + "Hits": 5373, + "Misses": 95368, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.004913931444177538, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6217, + "Misses": 94110, + "Active": false + }, + { + "Policy": 7, + "Hits": 5992, + "Misses": 94335, + "Active": false + }, + { + "Policy": 3, + "Hits": 5769, + "Misses": 94558, + "Active": false + }, + { + "Policy": 6, + "Hits": 5765, + "Misses": 94562, + "Active": false + }, + { + "Policy": 4, + "Hits": 5756, + "Misses": 94571, + "Active": false + }, + { + "Policy": 1, + "Hits": 5724, + "Misses": 94603, + "Active": true + }, + { + "Policy": 5, + "Hits": 5610, + "Misses": 94717, + "Active": false + }, + { + "Policy": 9, + "Hits": 5401, + "Misses": 94926, + "Active": false + }, + { + "Policy": 2, + "Hits": 5079, + "Misses": 95248, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.00700271657108361, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5800, + "Misses": 93590, + "Active": false + }, + { + "Policy": 8, + "Hits": 5709, + "Misses": 93681, + "Active": false + }, + { + "Policy": 6, + "Hits": 5356, + "Misses": 94034, + "Active": false + }, + { + "Policy": 3, + "Hits": 5113, + "Misses": 94277, + "Active": false + }, + { + "Policy": 4, + "Hits": 5113, + "Misses": 94277, + "Active": false + }, + { + "Policy": 1, + "Hits": 5104, + "Misses": 94286, + "Active": true + }, + { + "Policy": 5, + "Hits": 5012, + "Misses": 94378, + "Active": false + }, + { + "Policy": 9, + "Hits": 4886, + "Misses": 94504, + "Active": false + }, + { + "Policy": 2, + "Hits": 4446, + "Misses": 94944, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 7, + "Improvement": 0.006525742653535109, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 7, + "Hits": 5794, + "Misses": 94118, + "Active": false + }, + { + "Policy": 8, + "Hits": 5635, + "Misses": 94277, + "Active": false + }, + { + "Policy": 6, + "Hits": 5165, + "Misses": 94747, + "Active": false + }, + { + "Policy": 3, + "Hits": 5163, + "Misses": 94749, + "Active": false + }, + { + "Policy": 4, + "Hits": 5143, + "Misses": 94769, + "Active": false + }, + { + "Policy": 1, + "Hits": 5142, + "Misses": 94770, + "Active": true + }, + { + "Policy": 5, + "Hits": 4990, + "Misses": 94922, + "Active": false + }, + { + "Policy": 9, + "Hits": 4898, + "Misses": 95014, + "Active": false + }, + { + "Policy": 2, + "Hits": 4456, + "Misses": 95456, + "Active": false + } + ] + }, + "best_policy_name": "TinyLFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0063627471740730634, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 5368, + "Misses": 93803, + "Active": false + }, + { + "Policy": 6, + "Hits": 4890, + "Misses": 94281, + "Active": false + }, + { + "Policy": 3, + "Hits": 4809, + "Misses": 94362, + "Active": false + }, + { + "Policy": 4, + "Hits": 4752, + "Misses": 94419, + "Active": false + }, + { + "Policy": 1, + "Hits": 4737, + "Misses": 94434, + "Active": true + }, + { + "Policy": 5, + "Hits": 4678, + "Misses": 94493, + "Active": false + }, + { + "Policy": 9, + "Hits": 4613, + "Misses": 94558, + "Active": false + }, + { + "Policy": 7, + "Hits": 4494, + "Misses": 94677, + "Active": false + }, + { + "Policy": 2, + "Hits": 4100, + "Misses": 95071, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 5.3511999999999995, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0052464023960885064, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 6572, + "Misses": 94259, + "Active": false + }, + { + "Policy": 7, + "Hits": 6213, + "Misses": 94618, + "Active": false + }, + { + "Policy": 4, + "Hits": 6096, + "Misses": 94735, + "Active": false + }, + { + "Policy": 3, + "Hits": 6094, + "Misses": 94737, + "Active": false + }, + { + "Policy": 1, + "Hits": 6043, + "Misses": 94788, + "Active": true + }, + { + "Policy": 6, + "Hits": 5999, + "Misses": 94832, + "Active": false + }, + { + "Policy": 5, + "Hits": 5909, + "Misses": 94922, + "Active": false + }, + { + "Policy": 9, + "Hits": 5874, + "Misses": 94957, + "Active": false + }, + { + "Policy": 2, + "Hits": 5547, + "Misses": 95284, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 94547, + "sieve_hits": 94547, + "fifo_hits": 102774, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_src1_2", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1947636, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 1.7661, + 1.7661, + 1.7661 + ] + }, + "ARC": { + "runs": [ + 1.72685, + 1.72685, + 1.72685 + ] + }, + "LFU": { + "runs": [ + 1.4181, + 1.4181, + 1.4181 + ] + }, + "LRU": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "Random": { + "runs": [ + 1.63565, + 1.6329500000000001, + 1.6311, + 1.6350500000000001, + 1.6331499999999999, + 1.6340000000000001, + 1.6365, + 1.6306999999999998, + 1.63535, + 1.6315, + 1.6344999999999998, + 1.6358000000000001, + 1.6336, + 1.6329, + 1.6320999999999999 + ] + }, + "S3-FIFO": { + "runs": [ + 1.7013500000000001, + 1.7013500000000001, + 1.7013500000000001 + ] + }, + "SIEVE": { + "runs": [ + 1.4181, + 1.4181, + 1.4181 + ] + }, + "TTL": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "W-TinyLFU": { + "runs": [ + 0.9726500000000001, + 1.18435, + 0.9742000000000001, + 1.2151, + 1.13585, + 0.9096500000000001, + 1.1509, + 1.204, + 0.9816999999999999, + 1.21295, + 1.1889, + 1.1714499999999999, + 0.9353, + 1.1518000000000002, + 1.1813 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998, + 1.7021499999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 1.7009, + 1.70095, + 1.701, + 1.2382499999999999, + 1.24335, + 1.701, + 1.7012, + 1.7007999999999999, + 1.7007999999999999, + 1.70115, + 1.7013500000000001, + 1.701, + 1.7007499999999998, + 1.25855, + 1.4647999999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007117223681308779, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1633, + "Misses": 98125, + "Active": false + }, + { + "Policy": 4, + "Hits": 1595, + "Misses": 98163, + "Active": false + }, + { + "Policy": 1, + "Hits": 1562, + "Misses": 98196, + "Active": true + }, + { + "Policy": 6, + "Hits": 1562, + "Misses": 98196, + "Active": false + }, + { + "Policy": 8, + "Hits": 1560, + "Misses": 98198, + "Active": false + }, + { + "Policy": 5, + "Hits": 1507, + "Misses": 98251, + "Active": false + }, + { + "Policy": 9, + "Hits": 1453, + "Misses": 98305, + "Active": false + }, + { + "Policy": 2, + "Hits": 1303, + "Misses": 98455, + "Active": false + }, + { + "Policy": 7, + "Hits": 1219, + "Misses": 98539, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006504813562035888, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1758, + "Misses": 98168, + "Active": false + }, + { + "Policy": 4, + "Hits": 1718, + "Misses": 98208, + "Active": false + }, + { + "Policy": 1, + "Hits": 1693, + "Misses": 98233, + "Active": true + }, + { + "Policy": 6, + "Hits": 1692, + "Misses": 98234, + "Active": false + }, + { + "Policy": 8, + "Hits": 1691, + "Misses": 98235, + "Active": false + }, + { + "Policy": 5, + "Hits": 1640, + "Misses": 98286, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98466, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98466, + "Active": false + }, + { + "Policy": 7, + "Hits": 1010, + "Misses": 98916, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.000741743096276247, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1800, + "Misses": 97965, + "Active": false + }, + { + "Policy": 4, + "Hits": 1751, + "Misses": 98014, + "Active": false + }, + { + "Policy": 1, + "Hits": 1726, + "Misses": 98039, + "Active": true + }, + { + "Policy": 6, + "Hits": 1726, + "Misses": 98039, + "Active": false + }, + { + "Policy": 8, + "Hits": 1726, + "Misses": 98039, + "Active": false + }, + { + "Policy": 5, + "Hits": 1672, + "Misses": 98093, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98305, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98305, + "Active": false + }, + { + "Policy": 7, + "Hits": 1239, + "Misses": 98526, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006214666613207145, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1857, + "Misses": 97907, + "Active": false + }, + { + "Policy": 4, + "Hits": 1815, + "Misses": 97949, + "Active": false + }, + { + "Policy": 1, + "Hits": 1795, + "Misses": 97969, + "Active": true + }, + { + "Policy": 6, + "Hits": 1795, + "Misses": 97969, + "Active": false + }, + { + "Policy": 8, + "Hits": 1793, + "Misses": 97971, + "Active": false + }, + { + "Policy": 9, + "Hits": 1782, + "Misses": 97982, + "Active": false + }, + { + "Policy": 5, + "Hits": 1723, + "Misses": 98041, + "Active": false + }, + { + "Policy": 2, + "Hits": 1443, + "Misses": 98321, + "Active": false + }, + { + "Policy": 7, + "Hits": 1039, + "Misses": 98725, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006652302987579031, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1836, + "Misses": 98881, + "Active": false + }, + { + "Policy": 4, + "Hits": 1795, + "Misses": 98922, + "Active": false + }, + { + "Policy": 6, + "Hits": 1770, + "Misses": 98947, + "Active": false + }, + { + "Policy": 1, + "Hits": 1769, + "Misses": 98948, + "Active": true + }, + { + "Policy": 8, + "Hits": 1767, + "Misses": 98950, + "Active": false + }, + { + "Policy": 9, + "Hits": 1736, + "Misses": 98981, + "Active": false + }, + { + "Policy": 5, + "Hits": 1707, + "Misses": 99010, + "Active": false + }, + { + "Policy": 2, + "Hits": 1495, + "Misses": 99222, + "Active": false + }, + { + "Policy": 7, + "Hits": 1425, + "Misses": 99292, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005292854646227578, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1733, + "Misses": 98402, + "Active": false + }, + { + "Policy": 4, + "Hits": 1687, + "Misses": 98448, + "Active": false + }, + { + "Policy": 6, + "Hits": 1682, + "Misses": 98453, + "Active": false + }, + { + "Policy": 1, + "Hits": 1680, + "Misses": 98455, + "Active": true + }, + { + "Policy": 8, + "Hits": 1679, + "Misses": 98456, + "Active": false + }, + { + "Policy": 5, + "Hits": 1619, + "Misses": 98516, + "Active": false + }, + { + "Policy": 9, + "Hits": 1435, + "Misses": 98700, + "Active": false + }, + { + "Policy": 2, + "Hits": 1387, + "Misses": 98748, + "Active": false + }, + { + "Policy": 7, + "Hits": 1211, + "Misses": 98924, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007803199311717801, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1743, + "Misses": 98216, + "Active": false + }, + { + "Policy": 4, + "Hits": 1700, + "Misses": 98259, + "Active": false + }, + { + "Policy": 8, + "Hits": 1666, + "Misses": 98293, + "Active": false + }, + { + "Policy": 1, + "Hits": 1665, + "Misses": 98294, + "Active": true + }, + { + "Policy": 6, + "Hits": 1665, + "Misses": 98294, + "Active": false + }, + { + "Policy": 5, + "Hits": 1602, + "Misses": 98357, + "Active": false + }, + { + "Policy": 9, + "Hits": 1573, + "Misses": 98386, + "Active": false + }, + { + "Policy": 2, + "Hits": 1347, + "Misses": 98612, + "Active": false + }, + { + "Policy": 7, + "Hits": 1215, + "Misses": 98744, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006132748879013918, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1688, + "Misses": 97778, + "Active": false + }, + { + "Policy": 4, + "Hits": 1643, + "Misses": 97823, + "Active": false + }, + { + "Policy": 1, + "Hits": 1627, + "Misses": 97839, + "Active": true + }, + { + "Policy": 6, + "Hits": 1627, + "Misses": 97839, + "Active": false + }, + { + "Policy": 8, + "Hits": 1627, + "Misses": 97839, + "Active": false + }, + { + "Policy": 9, + "Hits": 1582, + "Misses": 97884, + "Active": false + }, + { + "Policy": 5, + "Hits": 1553, + "Misses": 97913, + "Active": false + }, + { + "Policy": 2, + "Hits": 1357, + "Misses": 98109, + "Active": false + }, + { + "Policy": 7, + "Hits": 1158, + "Misses": 98308, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0007309795125468137, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1810, + "Misses": 98056, + "Active": false + }, + { + "Policy": 4, + "Hits": 1775, + "Misses": 98091, + "Active": false + }, + { + "Policy": 1, + "Hits": 1737, + "Misses": 98129, + "Active": true + }, + { + "Policy": 6, + "Hits": 1737, + "Misses": 98129, + "Active": false + }, + { + "Policy": 8, + "Hits": 1737, + "Misses": 98129, + "Active": false + }, + { + "Policy": 5, + "Hits": 1673, + "Misses": 98193, + "Active": false + }, + { + "Policy": 2, + "Hits": 1460, + "Misses": 98406, + "Active": false + }, + { + "Policy": 9, + "Hits": 1460, + "Misses": 98406, + "Active": false + }, + { + "Policy": 7, + "Hits": 1403, + "Misses": 98463, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.000570245205438337, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1809, + "Misses": 98148, + "Active": false + }, + { + "Policy": 4, + "Hits": 1762, + "Misses": 98195, + "Active": false + }, + { + "Policy": 8, + "Hits": 1754, + "Misses": 98203, + "Active": false + }, + { + "Policy": 6, + "Hits": 1753, + "Misses": 98204, + "Active": false + }, + { + "Policy": 1, + "Hits": 1752, + "Misses": 98205, + "Active": true + }, + { + "Policy": 9, + "Hits": 1681, + "Misses": 98276, + "Active": false + }, + { + "Policy": 5, + "Hits": 1679, + "Misses": 98278, + "Active": false + }, + { + "Policy": 2, + "Hits": 1432, + "Misses": 98525, + "Active": false + }, + { + "Policy": 7, + "Hits": 1260, + "Misses": 98697, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005694817715878528, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1619, + "Misses": 98472, + "Active": false + }, + { + "Policy": 4, + "Hits": 1571, + "Misses": 98520, + "Active": false + }, + { + "Policy": 8, + "Hits": 1564, + "Misses": 98527, + "Active": false + }, + { + "Policy": 1, + "Hits": 1562, + "Misses": 98529, + "Active": true + }, + { + "Policy": 6, + "Hits": 1562, + "Misses": 98529, + "Active": false + }, + { + "Policy": 9, + "Hits": 1551, + "Misses": 98540, + "Active": false + }, + { + "Policy": 5, + "Hits": 1502, + "Misses": 98589, + "Active": false + }, + { + "Policy": 2, + "Hits": 1314, + "Misses": 98777, + "Active": false + }, + { + "Policy": 7, + "Hits": 798, + "Misses": 99293, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006215289612446634, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1713, + "Misses": 98041, + "Active": false + }, + { + "Policy": 4, + "Hits": 1673, + "Misses": 98081, + "Active": false + }, + { + "Policy": 6, + "Hits": 1656, + "Misses": 98098, + "Active": false + }, + { + "Policy": 1, + "Hits": 1651, + "Misses": 98103, + "Active": true + }, + { + "Policy": 8, + "Hits": 1650, + "Misses": 98104, + "Active": false + }, + { + "Policy": 9, + "Hits": 1585, + "Misses": 98169, + "Active": false + }, + { + "Policy": 5, + "Hits": 1583, + "Misses": 98171, + "Active": false + }, + { + "Policy": 2, + "Hits": 1335, + "Misses": 98419, + "Active": false + }, + { + "Policy": 7, + "Hits": 1050, + "Misses": 98704, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005286993994772886, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1828, + "Misses": 98418, + "Active": false + }, + { + "Policy": 4, + "Hits": 1793, + "Misses": 98453, + "Active": false + }, + { + "Policy": 1, + "Hits": 1775, + "Misses": 98471, + "Active": true + }, + { + "Policy": 6, + "Hits": 1775, + "Misses": 98471, + "Active": false + }, + { + "Policy": 8, + "Hits": 1774, + "Misses": 98472, + "Active": false + }, + { + "Policy": 9, + "Hits": 1723, + "Misses": 98523, + "Active": false + }, + { + "Policy": 5, + "Hits": 1695, + "Misses": 98551, + "Active": false + }, + { + "Policy": 2, + "Hits": 1482, + "Misses": 98764, + "Active": false + }, + { + "Policy": 7, + "Hits": 1427, + "Misses": 98819, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0005927205874966084, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1792, + "Misses": 97749, + "Active": false + }, + { + "Policy": 4, + "Hits": 1744, + "Misses": 97797, + "Active": false + }, + { + "Policy": 6, + "Hits": 1735, + "Misses": 97806, + "Active": false + }, + { + "Policy": 1, + "Hits": 1733, + "Misses": 97808, + "Active": true + }, + { + "Policy": 8, + "Hits": 1732, + "Misses": 97809, + "Active": false + }, + { + "Policy": 5, + "Hits": 1668, + "Misses": 97873, + "Active": false + }, + { + "Policy": 9, + "Hits": 1468, + "Misses": 98073, + "Active": false + }, + { + "Policy": 2, + "Hits": 1461, + "Misses": 98080, + "Active": false + }, + { + "Policy": 7, + "Hits": 1031, + "Misses": 98510, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 1.7021499999999998, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0006815607741728555, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 1757, + "Misses": 98014, + "Active": false + }, + { + "Policy": 4, + "Hits": 1713, + "Misses": 98058, + "Active": false + }, + { + "Policy": 1, + "Hits": 1689, + "Misses": 98082, + "Active": true + }, + { + "Policy": 6, + "Hits": 1689, + "Misses": 98082, + "Active": false + }, + { + "Policy": 8, + "Hits": 1688, + "Misses": 98083, + "Active": false + }, + { + "Policy": 5, + "Hits": 1618, + "Misses": 98153, + "Active": false + }, + { + "Policy": 9, + "Hits": 1613, + "Misses": 98158, + "Active": false + }, + { + "Policy": 2, + "Hits": 1418, + "Misses": 98353, + "Active": false + }, + { + "Policy": 7, + "Hits": 1165, + "Misses": 98606, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 28362, + "sieve_hits": 28362, + "fifo_hits": 34051, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_usr_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1778953, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 3.5717499999999998, + 3.5717499999999998, + 3.5717499999999998 + ] + }, + "ARC": { + "runs": [ + 3.5526500000000003, + 3.5526500000000003, + 3.5526500000000003 + ] + }, + "LFU": { + "runs": [ + 1.4588, + 1.4588, + 1.4588 + ] + }, + "LRU": { + "runs": [ + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997 + ] + }, + "Random": { + "runs": [ + 3.49265, + 3.49345, + 3.4869, + 3.49475, + 3.4889499999999996, + 3.49465, + 3.49085, + 3.48615, + 3.4975, + 3.4874500000000004, + 3.4941, + 3.4896499999999997, + 3.4965499999999996, + 3.5000999999999998, + 3.4866 + ] + }, + "S3-FIFO": { + "runs": [ + 3.5838, + 3.5838, + 3.5838 + ] + }, + "SIEVE": { + "runs": [ + 1.4588, + 1.4588, + 1.4588 + ] + }, + "TTL": { + "runs": [ + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.82335, + 2.8194500000000002, + 2.9994, + 2.85675, + 2.9017500000000003, + 2.8573999999999997, + 2.23415, + 2.83745, + 2.7112000000000003, + 2.8632, + 2.2304, + 2.9163, + 2.88505, + 2.8815, + 2.84835 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 3.5715999999999997, + 2.9993499999999997, + 3.5715999999999997, + 3.5715999999999997, + 2.9993499999999997, + 3.5715999999999997, + 3.5451, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 3.5715999999999997, + 2.9993499999999997 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 3.5228500000000005, + 3.5027000000000004, + 3.5027999999999997, + 3.5027000000000004, + 3.5027000000000004, + 3.5027999999999997, + 3.4717, + 3.5027999999999997, + 3.5027500000000003, + 3.5027500000000003, + 3.5027000000000004, + 3.5027999999999997, + 3.5027999999999997, + 3.5027999999999997, + 3.5027500000000003 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 3.4062, + 3.66315, + 3.5526500000000003, + 3.6554499999999996, + 3.6654, + 3.4059, + 3.6654, + 3.4236500000000003, + 3.42185, + 3.41115, + 3.4097500000000003, + 3.6380000000000003, + 3.6590499999999997, + 3.4097000000000004, + 3.41325 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 7.01206074448027e-05, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3346, + "Misses": 96482, + "Active": false + }, + { + "Policy": 1, + "Hits": 3339, + "Misses": 96489, + "Active": true + }, + { + "Policy": 6, + "Hits": 3333, + "Misses": 96495, + "Active": false + }, + { + "Policy": 3, + "Hits": 3313, + "Misses": 96515, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 96520, + "Active": false + }, + { + "Policy": 5, + "Hits": 3260, + "Misses": 96568, + "Active": false + }, + { + "Policy": 9, + "Hits": 2858, + "Misses": 96970, + "Active": false + }, + { + "Policy": 7, + "Hits": 2738, + "Misses": 97090, + "Active": false + }, + { + "Policy": 2, + "Hits": 1710, + "Misses": 98118, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 6.001140216640999e-05, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3843, + "Misses": 96138, + "Active": false + }, + { + "Policy": 1, + "Hits": 3837, + "Misses": 96144, + "Active": true + }, + { + "Policy": 8, + "Hits": 3834, + "Misses": 96147, + "Active": false + }, + { + "Policy": 4, + "Hits": 3830, + "Misses": 96151, + "Active": false + }, + { + "Policy": 6, + "Hits": 3816, + "Misses": 96165, + "Active": false + }, + { + "Policy": 5, + "Hits": 3795, + "Misses": 96186, + "Active": false + }, + { + "Policy": 9, + "Hits": 3432, + "Misses": 96549, + "Active": false + }, + { + "Policy": 7, + "Hits": 3247, + "Misses": 96734, + "Active": false + }, + { + "Policy": 2, + "Hits": 1756, + "Misses": 98225, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000593030385268721, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3391, + "Misses": 96098, + "Active": false + }, + { + "Policy": 6, + "Hits": 3356, + "Misses": 96133, + "Active": false + }, + { + "Policy": 1, + "Hits": 3332, + "Misses": 96157, + "Active": true + }, + { + "Policy": 3, + "Hits": 3315, + "Misses": 96174, + "Active": false + }, + { + "Policy": 4, + "Hits": 3308, + "Misses": 96181, + "Active": false + }, + { + "Policy": 5, + "Hits": 3272, + "Misses": 96217, + "Active": false + }, + { + "Policy": 9, + "Hits": 2978, + "Misses": 96511, + "Active": false + }, + { + "Policy": 7, + "Hits": 2706, + "Misses": 96783, + "Active": false + }, + { + "Policy": 2, + "Hits": 1727, + "Misses": 97762, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000240736654161737, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3444, + "Misses": 96250, + "Active": false + }, + { + "Policy": 3, + "Hits": 3439, + "Misses": 96255, + "Active": false + }, + { + "Policy": 1, + "Hits": 3420, + "Misses": 96274, + "Active": true + }, + { + "Policy": 6, + "Hits": 3417, + "Misses": 96277, + "Active": false + }, + { + "Policy": 4, + "Hits": 3401, + "Misses": 96293, + "Active": false + }, + { + "Policy": 5, + "Hits": 3345, + "Misses": 96349, + "Active": false + }, + { + "Policy": 9, + "Hits": 2890, + "Misses": 96804, + "Active": false + }, + { + "Policy": 7, + "Hits": 2272, + "Misses": 97422, + "Active": false + }, + { + "Policy": 2, + "Hits": 1761, + "Misses": 97933, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0002491851645120488, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3629, + "Misses": 96698, + "Active": false + }, + { + "Policy": 3, + "Hits": 3621, + "Misses": 96706, + "Active": false + }, + { + "Policy": 6, + "Hits": 3610, + "Misses": 96717, + "Active": false + }, + { + "Policy": 1, + "Hits": 3604, + "Misses": 96723, + "Active": true + }, + { + "Policy": 4, + "Hits": 3589, + "Misses": 96738, + "Active": false + }, + { + "Policy": 5, + "Hits": 3563, + "Misses": 96764, + "Active": false + }, + { + "Policy": 9, + "Hits": 3154, + "Misses": 97173, + "Active": false + }, + { + "Policy": 7, + "Hits": 2246, + "Misses": 98081, + "Active": false + }, + { + "Policy": 2, + "Hits": 1723, + "Misses": 98604, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 1, + "Hits": 3578, + "Misses": 96188, + "Active": true + }, + { + "Policy": 8, + "Hits": 3565, + "Misses": 96201, + "Active": false + }, + { + "Policy": 3, + "Hits": 3550, + "Misses": 96216, + "Active": false + }, + { + "Policy": 4, + "Hits": 3526, + "Misses": 96240, + "Active": false + }, + { + "Policy": 6, + "Hits": 3525, + "Misses": 96241, + "Active": false + }, + { + "Policy": 5, + "Hits": 3502, + "Misses": 96264, + "Active": false + }, + { + "Policy": 9, + "Hits": 3113, + "Misses": 96653, + "Active": false + }, + { + "Policy": 7, + "Hits": 2938, + "Misses": 96828, + "Active": false + }, + { + "Policy": 2, + "Hits": 1857, + "Misses": 97909, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.00042868394030326495, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3907, + "Misses": 96400, + "Active": false + }, + { + "Policy": 6, + "Hits": 3884, + "Misses": 96423, + "Active": false + }, + { + "Policy": 1, + "Hits": 3864, + "Misses": 96443, + "Active": true + }, + { + "Policy": 3, + "Hits": 3847, + "Misses": 96460, + "Active": false + }, + { + "Policy": 4, + "Hits": 3839, + "Misses": 96468, + "Active": false + }, + { + "Policy": 5, + "Hits": 3770, + "Misses": 96537, + "Active": false + }, + { + "Policy": 9, + "Hits": 3118, + "Misses": 97189, + "Active": false + }, + { + "Policy": 7, + "Hits": 3019, + "Misses": 97288, + "Active": false + }, + { + "Policy": 2, + "Hits": 1882, + "Misses": 98425, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 9.968598913422805e-05, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3794, + "Misses": 96521, + "Active": false + }, + { + "Policy": 3, + "Hits": 3785, + "Misses": 96530, + "Active": false + }, + { + "Policy": 1, + "Hits": 3784, + "Misses": 96531, + "Active": true + }, + { + "Policy": 4, + "Hits": 3765, + "Misses": 96550, + "Active": false + }, + { + "Policy": 5, + "Hits": 3722, + "Misses": 96593, + "Active": false + }, + { + "Policy": 6, + "Hits": 3709, + "Misses": 96606, + "Active": false + }, + { + "Policy": 9, + "Hits": 3350, + "Misses": 96965, + "Active": false + }, + { + "Policy": 7, + "Hits": 2936, + "Misses": 97379, + "Active": false + }, + { + "Policy": 2, + "Hits": 1970, + "Misses": 98345, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.000169403698979588, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3434, + "Misses": 96918, + "Active": false + }, + { + "Policy": 3, + "Hits": 3432, + "Misses": 96920, + "Active": false + }, + { + "Policy": 1, + "Hits": 3417, + "Misses": 96935, + "Active": true + }, + { + "Policy": 4, + "Hits": 3387, + "Misses": 96965, + "Active": false + }, + { + "Policy": 6, + "Hits": 3385, + "Misses": 96967, + "Active": false + }, + { + "Policy": 5, + "Hits": 3354, + "Misses": 96998, + "Active": false + }, + { + "Policy": 9, + "Hits": 2937, + "Misses": 97415, + "Active": false + }, + { + "Policy": 7, + "Hits": 2675, + "Misses": 97677, + "Active": false + }, + { + "Policy": 2, + "Hits": 1662, + "Misses": 98690, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 1, + "Improvement": 0, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 1, + "Hits": 3621, + "Misses": 96434, + "Active": true + }, + { + "Policy": 8, + "Hits": 3613, + "Misses": 96442, + "Active": false + }, + { + "Policy": 3, + "Hits": 3578, + "Misses": 96477, + "Active": false + }, + { + "Policy": 4, + "Hits": 3558, + "Misses": 96497, + "Active": false + }, + { + "Policy": 6, + "Hits": 3526, + "Misses": 96529, + "Active": false + }, + { + "Policy": 5, + "Hits": 3490, + "Misses": 96565, + "Active": false + }, + { + "Policy": 9, + "Hits": 3270, + "Misses": 96785, + "Active": false + }, + { + "Policy": 7, + "Hits": 2725, + "Misses": 97330, + "Active": false + }, + { + "Policy": 2, + "Hits": 1834, + "Misses": 98221, + "Active": false + } + ] + }, + "best_policy_name": "LRU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 6, + "Improvement": 0.00030004200588082397, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 6, + "Hits": 3787, + "Misses": 96199, + "Active": false + }, + { + "Policy": 8, + "Hits": 3772, + "Misses": 96214, + "Active": false + }, + { + "Policy": 1, + "Hits": 3757, + "Misses": 96229, + "Active": true + }, + { + "Policy": 3, + "Hits": 3741, + "Misses": 96245, + "Active": false + }, + { + "Policy": 4, + "Hits": 3730, + "Misses": 96256, + "Active": false + }, + { + "Policy": 5, + "Hits": 3658, + "Misses": 96328, + "Active": false + }, + { + "Policy": 9, + "Hits": 3050, + "Misses": 96936, + "Active": false + }, + { + "Policy": 7, + "Hits": 2245, + "Misses": 97741, + "Active": false + }, + { + "Policy": 2, + "Hits": 1840, + "Misses": 98146, + "Active": false + } + ] + }, + "best_policy_name": "TTL", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.00023923444976076819, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3702, + "Misses": 96618, + "Active": false + }, + { + "Policy": 1, + "Hits": 3678, + "Misses": 96642, + "Active": true + }, + { + "Policy": 4, + "Hits": 3678, + "Misses": 96642, + "Active": false + }, + { + "Policy": 8, + "Hits": 3674, + "Misses": 96646, + "Active": false + }, + { + "Policy": 6, + "Hits": 3619, + "Misses": 96701, + "Active": false + }, + { + "Policy": 5, + "Hits": 3597, + "Misses": 96723, + "Active": false + }, + { + "Policy": 9, + "Hits": 3238, + "Misses": 97082, + "Active": false + }, + { + "Policy": 7, + "Hits": 2870, + "Misses": 97450, + "Active": false + }, + { + "Policy": 2, + "Hits": 1757, + "Misses": 98563, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 0.0001295001295001305, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3481, + "Misses": 96905, + "Active": false + }, + { + "Policy": 6, + "Hits": 3477, + "Misses": 96909, + "Active": false + }, + { + "Policy": 1, + "Hits": 3468, + "Misses": 96918, + "Active": true + }, + { + "Policy": 3, + "Hits": 3448, + "Misses": 96938, + "Active": false + }, + { + "Policy": 4, + "Hits": 3430, + "Misses": 96956, + "Active": false + }, + { + "Policy": 5, + "Hits": 3369, + "Misses": 97017, + "Active": false + }, + { + "Policy": 9, + "Hits": 2942, + "Misses": 97444, + "Active": false + }, + { + "Policy": 7, + "Hits": 2842, + "Misses": 97544, + "Active": false + }, + { + "Policy": 2, + "Hits": 1618, + "Misses": 98768, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 9.935419771484044e-06, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3990, + "Misses": 96660, + "Active": false + }, + { + "Policy": 1, + "Hits": 3989, + "Misses": 96661, + "Active": true + }, + { + "Policy": 8, + "Hits": 3988, + "Misses": 96662, + "Active": false + }, + { + "Policy": 4, + "Hits": 3957, + "Misses": 96693, + "Active": false + }, + { + "Policy": 6, + "Hits": 3946, + "Misses": 96704, + "Active": false + }, + { + "Policy": 5, + "Hits": 3872, + "Misses": 96778, + "Active": false + }, + { + "Policy": 9, + "Hits": 3453, + "Misses": 97197, + "Active": false + }, + { + "Policy": 7, + "Hits": 3326, + "Misses": 97324, + "Active": false + }, + { + "Policy": 2, + "Hits": 1959, + "Misses": 98691, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 3.5715999999999997, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 8, + "Improvement": 5.9939461144242756e-05, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 8, + "Hits": 3321, + "Misses": 96780, + "Active": false + }, + { + "Policy": 1, + "Hits": 3315, + "Misses": 96786, + "Active": true + }, + { + "Policy": 5, + "Hits": 3292, + "Misses": 96809, + "Active": false + }, + { + "Policy": 6, + "Hits": 3286, + "Misses": 96815, + "Active": false + }, + { + "Policy": 3, + "Hits": 3275, + "Misses": 96826, + "Active": false + }, + { + "Policy": 4, + "Hits": 3267, + "Misses": 96834, + "Active": false + }, + { + "Policy": 9, + "Hits": 2963, + "Misses": 97138, + "Active": false + }, + { + "Policy": 7, + "Hits": 2628, + "Misses": 97473, + "Active": false + }, + { + "Policy": 2, + "Hits": 1778, + "Misses": 98323, + "Active": false + } + ] + }, + "best_policy_name": "S3FIFO", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 29176, + "sieve_hits": 29176, + "fifo_hits": 70272, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + }, + { + "trace": "msr_web_0", + "source": "MSR Cambridge enterprise block I/O, read requests (FAST '08)", + "requests": 2000000, + "distinct_keys": 1855956, + "capacity": 20000, + "fixed_hit_rate_percent": { + "2Q": { + "runs": [ + 2.6100000000000003, + 2.6100000000000003, + 2.6100000000000003 + ] + }, + "ARC": { + "runs": [ + 2.6045, + 2.6045, + 2.6045 + ] + }, + "LFU": { + "runs": [ + 2.61025, + 2.61025, + 2.61025 + ] + }, + "LRU": { + "runs": [ + 2.2991, + 2.2991, + 2.2991 + ] + }, + "Random": { + "runs": [ + 2.5539, + 2.5578, + 2.56165, + 2.55125, + 2.5537, + 2.56025, + 2.5652, + 2.55365, + 2.553, + 2.5606, + 2.5584, + 2.55875, + 2.5577, + 2.5569, + 2.5587 + ] + }, + "S3-FIFO": { + "runs": [ + 2.49225, + 2.49225, + 2.49225 + ] + }, + "SIEVE": { + "runs": [ + 2.61025, + 2.61025, + 2.61025 + ] + }, + "TTL": { + "runs": [ + 2.2991, + 2.2991, + 2.2991 + ] + }, + "W-TinyLFU": { + "runs": [ + 2.32015, + 2.30665, + 2.2768, + 2.2866500000000003, + 2.25835, + 2.2798, + 2.29585, + 2.31995, + 2.2407500000000002, + 2.2658, + 2.27125, + 2.2561999999999998, + 2.30665, + 2.2537000000000003, + 2.2363999999999997 + ] + } + }, + "policy_names": { + "ARC": "ARC", + "LFU": "LFU", + "LRU": "LRU", + "Random": "Random", + "S3FIFO": "S3-FIFO", + "SIEVE": "SIEVE", + "TTL": "TTL", + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q" + }, + "adaptive": [ + { + "epochs_per_trace": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 2.2207999999999997, + 2.3472, + 2.3472, + 2.2287999999999997, + 2.3472, + 2.3472, + 2.3472, + 2.23365, + 2.3472, + 2.3472, + 2.28555, + 2.28595, + 2.3472, + 2.3472, + 2.2818 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 2.4061, + 2.409, + 2.40785, + 2.4057, + 2.4084000000000003, + 2.38765, + 2.38625, + 2.4058, + 2.4079, + 2.4076500000000003, + 2.4094, + 2.4059, + 2.4094, + 2.4082, + 2.4074999999999998 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + }, + { + "epochs_per_trace": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 2.4758999999999998, + 2.43825, + 2.45555, + 2.4688499999999998, + 2.4632500000000004, + 2.45505, + 2.4332, + 2.44035, + 2.45575, + 2.434, + 2.40935, + 2.43825, + 2.44375, + 2.43215, + 2.4364500000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + }, + "effective_sample_rate": 0.05 + } + ], + "effective_sample_rate": 0.05, + "observe_only": [ + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0032381542520763147, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2953, + "Misses": 97104, + "Active": false + }, + { + "Policy": 4, + "Hits": 2950, + "Misses": 97107, + "Active": false + }, + { + "Policy": 2, + "Hits": 2949, + "Misses": 97108, + "Active": false + }, + { + "Policy": 9, + "Hits": 2949, + "Misses": 97108, + "Active": false + }, + { + "Policy": 5, + "Hits": 2886, + "Misses": 97171, + "Active": false + }, + { + "Policy": 8, + "Hits": 2863, + "Misses": 97194, + "Active": false + }, + { + "Policy": 7, + "Hits": 2741, + "Misses": 97316, + "Active": false + }, + { + "Policy": 1, + "Hits": 2629, + "Misses": 97428, + "Active": true + }, + { + "Policy": 6, + "Hits": 2621, + "Misses": 97436, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0032177724646343907, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2756, + "Misses": 97624, + "Active": false + }, + { + "Policy": 2, + "Hits": 2755, + "Misses": 97625, + "Active": false + }, + { + "Policy": 9, + "Hits": 2755, + "Misses": 97625, + "Active": false + }, + { + "Policy": 4, + "Hits": 2750, + "Misses": 97630, + "Active": false + }, + { + "Policy": 5, + "Hits": 2679, + "Misses": 97701, + "Active": false + }, + { + "Policy": 8, + "Hits": 2658, + "Misses": 97722, + "Active": false + }, + { + "Policy": 7, + "Hits": 2604, + "Misses": 97776, + "Active": false + }, + { + "Policy": 6, + "Hits": 2446, + "Misses": 97934, + "Active": false + }, + { + "Policy": 1, + "Hits": 2433, + "Misses": 97947, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0031756176476462478, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2751, + "Misses": 97387, + "Active": false + }, + { + "Policy": 2, + "Hits": 2749, + "Misses": 97389, + "Active": false + }, + { + "Policy": 9, + "Hits": 2749, + "Misses": 97389, + "Active": false + }, + { + "Policy": 4, + "Hits": 2747, + "Misses": 97391, + "Active": false + }, + { + "Policy": 5, + "Hits": 2695, + "Misses": 97443, + "Active": false + }, + { + "Policy": 8, + "Hits": 2635, + "Misses": 97503, + "Active": false + }, + { + "Policy": 7, + "Hits": 2526, + "Misses": 97612, + "Active": false + }, + { + "Policy": 1, + "Hits": 2433, + "Misses": 97705, + "Active": true + }, + { + "Policy": 6, + "Hits": 2429, + "Misses": 97709, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033801637235644257, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2901, + "Misses": 97390, + "Active": false + }, + { + "Policy": 4, + "Hits": 2898, + "Misses": 97393, + "Active": false + }, + { + "Policy": 2, + "Hits": 2895, + "Misses": 97396, + "Active": false + }, + { + "Policy": 9, + "Hits": 2895, + "Misses": 97396, + "Active": false + }, + { + "Policy": 5, + "Hits": 2792, + "Misses": 97499, + "Active": false + }, + { + "Policy": 8, + "Hits": 2790, + "Misses": 97501, + "Active": false + }, + { + "Policy": 7, + "Hits": 2642, + "Misses": 97649, + "Active": false + }, + { + "Policy": 1, + "Hits": 2562, + "Misses": 97729, + "Active": true + }, + { + "Policy": 6, + "Hits": 2562, + "Misses": 97729, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0030650346438769183, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3003, + "Misses": 97159, + "Active": false + }, + { + "Policy": 4, + "Hits": 3003, + "Misses": 97159, + "Active": false + }, + { + "Policy": 2, + "Hits": 3001, + "Misses": 97161, + "Active": false + }, + { + "Policy": 9, + "Hits": 3001, + "Misses": 97161, + "Active": false + }, + { + "Policy": 5, + "Hits": 2942, + "Misses": 97220, + "Active": false + }, + { + "Policy": 8, + "Hits": 2891, + "Misses": 97271, + "Active": false + }, + { + "Policy": 7, + "Hits": 2832, + "Misses": 97330, + "Active": false + }, + { + "Policy": 6, + "Hits": 2713, + "Misses": 97449, + "Active": false + }, + { + "Policy": 1, + "Hits": 2696, + "Misses": 97466, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0038092958785811842, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 3146, + "Misses": 97135, + "Active": false + }, + { + "Policy": 4, + "Hits": 3145, + "Misses": 97136, + "Active": false + }, + { + "Policy": 2, + "Hits": 3139, + "Misses": 97142, + "Active": false + }, + { + "Policy": 9, + "Hits": 3139, + "Misses": 97142, + "Active": false + }, + { + "Policy": 8, + "Hits": 3016, + "Misses": 97265, + "Active": false + }, + { + "Policy": 5, + "Hits": 2999, + "Misses": 97282, + "Active": false + }, + { + "Policy": 7, + "Hits": 2783, + "Misses": 97498, + "Active": false + }, + { + "Policy": 1, + "Hits": 2764, + "Misses": 97517, + "Active": true + }, + { + "Policy": 6, + "Hits": 2756, + "Misses": 97525, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0028916143184764195, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2636, + "Misses": 97654, + "Active": false + }, + { + "Policy": 9, + "Hits": 2636, + "Misses": 97654, + "Active": false + }, + { + "Policy": 3, + "Hits": 2620, + "Misses": 97670, + "Active": false + }, + { + "Policy": 4, + "Hits": 2616, + "Misses": 97674, + "Active": false + }, + { + "Policy": 5, + "Hits": 2555, + "Misses": 97735, + "Active": false + }, + { + "Policy": 8, + "Hits": 2533, + "Misses": 97757, + "Active": false + }, + { + "Policy": 7, + "Hits": 2456, + "Misses": 97834, + "Active": false + }, + { + "Policy": 1, + "Hits": 2346, + "Misses": 97944, + "Active": true + }, + { + "Policy": 6, + "Hits": 2341, + "Misses": 97949, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033522252534302424, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2203, + "Misses": 97134, + "Active": false + }, + { + "Policy": 2, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 4, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 9, + "Hits": 2201, + "Misses": 97136, + "Active": false + }, + { + "Policy": 5, + "Hits": 2184, + "Misses": 97153, + "Active": false + }, + { + "Policy": 8, + "Hits": 2068, + "Misses": 97269, + "Active": false + }, + { + "Policy": 7, + "Hits": 1941, + "Misses": 97396, + "Active": false + }, + { + "Policy": 1, + "Hits": 1870, + "Misses": 97467, + "Active": true + }, + { + "Policy": 6, + "Hits": 1870, + "Misses": 97467, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 4, + "Improvement": 0.0031900152522604253, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 4, + "Hits": 2697, + "Misses": 97616, + "Active": false + }, + { + "Policy": 3, + "Hits": 2696, + "Misses": 97617, + "Active": false + }, + { + "Policy": 2, + "Hits": 2693, + "Misses": 97620, + "Active": false + }, + { + "Policy": 9, + "Hits": 2693, + "Misses": 97620, + "Active": false + }, + { + "Policy": 5, + "Hits": 2632, + "Misses": 97681, + "Active": false + }, + { + "Policy": 8, + "Hits": 2576, + "Misses": 97737, + "Active": false + }, + { + "Policy": 7, + "Hits": 2404, + "Misses": 97909, + "Active": false + }, + { + "Policy": 1, + "Hits": 2377, + "Misses": 97936, + "Active": true + }, + { + "Policy": 6, + "Hits": 2376, + "Misses": 97937, + "Active": false + } + ] + }, + "best_policy_name": "ARC", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.0033618826542863994, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2614, + "Misses": 97330, + "Active": false + }, + { + "Policy": 4, + "Hits": 2612, + "Misses": 97332, + "Active": false + }, + { + "Policy": 2, + "Hits": 2605, + "Misses": 97339, + "Active": false + }, + { + "Policy": 9, + "Hits": 2605, + "Misses": 97339, + "Active": false + }, + { + "Policy": 5, + "Hits": 2512, + "Misses": 97432, + "Active": false + }, + { + "Policy": 8, + "Hits": 2497, + "Misses": 97447, + "Active": false + }, + { + "Policy": 7, + "Hits": 2403, + "Misses": 97541, + "Active": false + }, + { + "Policy": 6, + "Hits": 2297, + "Misses": 97647, + "Active": false + }, + { + "Policy": 1, + "Hits": 2278, + "Misses": 97666, + "Active": true + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.003179412556187894, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2760, + "Misses": 97573, + "Active": false + }, + { + "Policy": 9, + "Hits": 2760, + "Misses": 97573, + "Active": false + }, + { + "Policy": 3, + "Hits": 2754, + "Misses": 97579, + "Active": false + }, + { + "Policy": 4, + "Hits": 2751, + "Misses": 97582, + "Active": false + }, + { + "Policy": 5, + "Hits": 2686, + "Misses": 97647, + "Active": false + }, + { + "Policy": 8, + "Hits": 2645, + "Misses": 97688, + "Active": false + }, + { + "Policy": 7, + "Hits": 2521, + "Misses": 97812, + "Active": false + }, + { + "Policy": 1, + "Hits": 2441, + "Misses": 97892, + "Active": true + }, + { + "Policy": 6, + "Hits": 2441, + "Misses": 97892, + "Active": false + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0032157895265754848, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2482, + "Misses": 97027, + "Active": false + }, + { + "Policy": 9, + "Hits": 2482, + "Misses": 97027, + "Active": false + }, + { + "Policy": 3, + "Hits": 2471, + "Misses": 97038, + "Active": false + }, + { + "Policy": 4, + "Hits": 2466, + "Misses": 97043, + "Active": false + }, + { + "Policy": 5, + "Hits": 2398, + "Misses": 97111, + "Active": false + }, + { + "Policy": 8, + "Hits": 2337, + "Misses": 97172, + "Active": false + }, + { + "Policy": 7, + "Hits": 2326, + "Misses": 97183, + "Active": false + }, + { + "Policy": 6, + "Hits": 2169, + "Misses": 97340, + "Active": false + }, + { + "Policy": 1, + "Hits": 2162, + "Misses": 97347, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.0029867444485510777, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 3, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 9, + "Hits": 2447, + "Misses": 97662, + "Active": false + }, + { + "Policy": 4, + "Hits": 2441, + "Misses": 97668, + "Active": false + }, + { + "Policy": 5, + "Hits": 2430, + "Misses": 97679, + "Active": false + }, + { + "Policy": 8, + "Hits": 2344, + "Misses": 97765, + "Active": false + }, + { + "Policy": 7, + "Hits": 2286, + "Misses": 97823, + "Active": false + }, + { + "Policy": 6, + "Hits": 2157, + "Misses": 97952, + "Active": false + }, + { + "Policy": 1, + "Hits": 2148, + "Misses": 97961, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 3, + "Improvement": 0.003071491967250716, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 3, + "Hits": 2544, + "Misses": 97733, + "Active": false + }, + { + "Policy": 2, + "Hits": 2540, + "Misses": 97737, + "Active": false + }, + { + "Policy": 9, + "Hits": 2540, + "Misses": 97737, + "Active": false + }, + { + "Policy": 4, + "Hits": 2537, + "Misses": 97740, + "Active": false + }, + { + "Policy": 5, + "Hits": 2483, + "Misses": 97794, + "Active": false + }, + { + "Policy": 8, + "Hits": 2438, + "Misses": 97839, + "Active": false + }, + { + "Policy": 7, + "Hits": 2330, + "Misses": 97947, + "Active": false + }, + { + "Policy": 1, + "Hits": 2236, + "Misses": 98041, + "Active": true + }, + { + "Policy": 6, + "Hits": 2226, + "Misses": 98051, + "Active": false + } + ] + }, + "best_policy_name": "TwoQueue", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + }, + { + "hit_rate_percent": 2.2991, + "epoch_requests": 100000, + "advice": { + "Epochs": 20, + "Active": 1, + "Best": 2, + "Improvement": 0.00293668154984867, + "Sampled": true, + "SampleRate": 0.05, + "Reports": [ + { + "Policy": 2, + "Hits": 2616, + "Misses": 97497, + "Active": false + }, + { + "Policy": 9, + "Hits": 2616, + "Misses": 97497, + "Active": false + }, + { + "Policy": 3, + "Hits": 2606, + "Misses": 97507, + "Active": false + }, + { + "Policy": 4, + "Hits": 2604, + "Misses": 97509, + "Active": false + }, + { + "Policy": 5, + "Hits": 2569, + "Misses": 97544, + "Active": false + }, + { + "Policy": 8, + "Hits": 2497, + "Misses": 97616, + "Active": false + }, + { + "Policy": 7, + "Hits": 2413, + "Misses": 97700, + "Active": false + }, + { + "Policy": 6, + "Hits": 2335, + "Misses": 97778, + "Active": false + }, + { + "Policy": 1, + "Hits": 2322, + "Misses": 97791, + "Active": true + } + ] + }, + "best_policy_name": "LFU", + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": true, + "MinShadowCapacity": 64 + } + } + ], + "lfu_sieve_diagnostic": { + "lfu_hits": 52205, + "sieve_hits": 52205, + "fifo_hits": 45560, + "different_lfu_sieve_decisions": 0, + "sieve_reference_disagreements": 0 + } + } + ], + "tree_modified": false, + "batches": 3, + "runs_per_batch": 5 +} diff --git a/bench/results/current/tuning.json b/bench/results/current/tuning.json new file mode 100644 index 0000000..8a1315d --- /dev/null +++ b/bench/results/current/tuning.json @@ -0,0 +1,473 @@ +{ + "commit": "1cb65fe0242bfae6312d5c1f54b8660d68e40e24", + "records": [ + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.082650000000001, + 12.0152, + 12.250900000000001, + 12.11015, + 12.01725, + 12.3888, + 12.1608, + 11.7821, + 12.1843, + 11.90005, + 12.38715, + 12.06135, + 12.3026, + 12.09975, + 11.74155 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 7.5211, + 7.72825, + 7.524400000000001, + 7.649, + 4.748349999999999, + 7.64755, + 7.745349999999999, + 7.4418999999999995, + 7.447900000000001, + 4.4357, + 4.57145, + 7.71355, + 7.528600000000001, + 4.3308, + 7.61825 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 12.463799999999999, + 12.557699999999999, + 12.340950000000001, + 12.09465, + 12.5502, + 12.55665, + 12.442, + 12.41465, + 12.4099, + 12.50165, + 12.47435, + 12.442300000000001, + 12.546650000000001, + 12.56205, + 12.29745 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 10, + "epoch_requests": 200000, + "hit_rate_percent": { + "runs": [ + 8.09635, + 8.265450000000001, + 7.8083, + 7.81785, + 7.4352, + 7.9056, + 8.01325, + 7.939, + 8.11555, + 7.69625, + 7.925949999999999, + 7.98165, + 7.93065, + 8.17475, + 7.785 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 200000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 11.4338, + 13.510050000000001, + 12.64795, + 11.128549999999999, + 13.7359, + 13.532549999999999, + 13.286950000000001, + 11.138399999999999, + 13.2505, + 12.823699999999999, + 13.04085, + 13.25865, + 13.5602, + 11.1013, + 13.337750000000002 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.0358, + 9.01375, + 7.4294, + 7.63215, + 10.3894, + 8.9698, + 9.12365, + 7.352549999999999, + 10.2559, + 7.5563, + 9.782250000000001, + 9.9442, + 10.44905, + 7.36435, + 10.3719 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 12.8338, + 12.78975, + 12.835849999999999, + 12.953700000000001, + 13.1249, + 12.47395, + 12.880249999999998, + 12.627849999999999, + 12.86435, + 12.6399, + 12.6419, + 13.1242, + 12.28915, + 12.968750000000002, + 12.534049999999999 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 20, + "epoch_requests": 100000, + "hit_rate_percent": { + "runs": [ + 9.1987, + 9.276900000000001, + 9.334299999999999, + 8.981200000000001, + 10.4677, + 9.164200000000001, + 10.518650000000001, + 9.2827, + 9.29585, + 9.30455, + 9.249749999999999, + 9.87415, + 9.65835, + 9.76375, + 9.38475 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 100000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 11.8685, + 11.7964, + 12.27275, + 12.249500000000001, + 8.097999999999999, + 12.1163, + 11.7712, + 11.863750000000001, + 8.778550000000001, + 3.7064500000000002, + 11.780050000000001, + 11.96705, + 12.12325, + 12.1138, + 12.01965 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "cold", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 7.7906, + 10.5512, + 9.71175, + 11.186, + 9.16825, + 8.85215, + 8.892999999999999, + 10.0299, + 10.3517, + 10.18615, + 10.52175, + 10.291549999999999, + 8.222999999999999, + 12.2599, + 9.17775 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 1, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": false, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 12.2791, + 12.4282, + 12.22125, + 12.22955, + 12.21175, + 12.0556, + 12.1357, + 8.5305, + 13.032850000000002, + 12.238449999999998, + 12.38785, + 13.263050000000002, + 11.6614, + 8.39705, + 12.4455 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0, + "SwitchCooldownEpochs": 0, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + }, + { + "trace": "arc_p3", + "strategy": "warm", + "gates": true, + "epochs": 50, + "epoch_requests": 40000, + "hit_rate_percent": { + "runs": [ + 8.3146, + 9.64165, + 11.484, + 11.135349999999999, + 11.34585, + 12.2959, + 12.388150000000001, + 10.1663, + 10.179, + 10.692699999999999, + 10.627699999999999, + 9.66335, + 10.7239, + 10.76835, + 10.99535 + ] + }, + "settings": { + "EpochDuration": 0, + "EpochRequests": 40000, + "EvictPartialCapacityFilling": true, + "MigrationStrategy": 2, + "MigrationMaxRequests": 0, + "MinHitRateImprovement": 0.02, + "SwitchCooldownEpochs": 3, + "MinEpochRequests": 0, + "ShadowSampleRate": 0.05, + "ObserveOnly": false, + "MinShadowCapacity": 64 + } + } + ] +} diff --git a/bench/sieve_diagnostic_test.go b/bench/sieve_diagnostic_test.go new file mode 100644 index 0000000..a3a766a --- /dev/null +++ b/bench/sieve_diagnostic_test.go @@ -0,0 +1,126 @@ +package bench_test + +import ( + "container/list" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/sshaplygin/as-cache/bench" +) + +type sieveDiagnostic struct { + LFUHits int `json:"lfu_hits"` + SieveHits int `json:"sieve_hits"` + FIFOHits int `json:"fifo_hits"` + DifferentDecisions int `json:"different_lfu_sieve_decisions"` + ReferenceDisagreements int `json:"sieve_reference_disagreements"` +} + +// sieveModel implements the insertion order, visited bit and sweeping hand +// directly. It has no adapter, value storage, resizing, TTL or callbacks. +type sieveModel struct { + order *list.List + entries map[string]*list.Element + visited map[string]bool + hand *list.Element + capacity int +} + +func newSieveModel(capacity int) *sieveModel { + return &sieveModel{order: list.New(), entries: map[string]*list.Element{}, visited: map[string]bool{}, capacity: capacity} +} + +func (s *sieveModel) access(key string) bool { + if _, ok := s.entries[key]; ok { + s.visited[key] = true + return true + } + if s.order.Len() == s.capacity { + for { + if s.hand == nil { + s.hand = s.order.Front() + } + victim := s.hand + s.hand = victim.Next() + k := victim.Value.(string) + if s.visited[k] { + s.visited[k] = false + continue + } + s.order.Remove(victim) + delete(s.entries, k) + delete(s.visited, k) + break + } + } + s.entries[key] = s.order.PushBack(key) + return false +} + +func diagnoseSieve(t *testing.T, capacity int, w bench.Workload) sieveDiagnostic { + t.Helper() + l, err := fixedPolicy(t, "LFU").Build(capacity) + require.NoError(t, err) + s, err := fixedPolicy(t, "SIEVE").Build(capacity) + require.NoError(t, err) + model := newSieveModel(capacity) + queue := make([]string, 0, capacity) + live := map[string]bool{} + head := 0 + var d sieveDiagnostic + for _, key := range w.Keys { + _, a := l.Get(key) + _, b := s.Get(key) + if a { + d.LFUHits++ + } else { + l.Add(key, 1) + } + if b { + d.SieveHits++ + } else { + s.Add(key, 1) + } + if a != b { + d.DifferentDecisions++ + } + if b != model.access(key) { + d.ReferenceDisagreements++ + } + if live[key] { + d.FIFOHits++ + } else { + if len(queue) == capacity { + delete(live, queue[head]) + queue[head] = key + head = (head + 1) % capacity + } else { + queue = append(queue, key) + } + live[key] = true + } + } + require.Zero(t, d.ReferenceDisagreements, "SIEVE adapter differs from visited-bit model on %s", w.Name) + return d +} + +func TestSieveLFUDistinction(t *testing.T) { + for _, tc := range []struct { + name string + keys []string + lfu, sieve, fifo int + }{ + {"cold scan", []string{"a", "b", "c", "d"}, 0, 0, 0}, + {"protect visited", []string{"a", "b", "a", "c", "a"}, 2, 2, 1}, + {"frequency outlives bit", []string{"a", "a", "b", "b", "c", "d", "a", "b"}, 3, 2, 2}, + } { + t.Run(tc.name, func(t *testing.T) { + d := diagnoseSieve(t, 2, bench.Workload{Name: tc.name, Keys: tc.keys}) + assert.Equal(t, tc.lfu, d.LFUHits) + assert.Equal(t, tc.sieve, d.SieveHits) + assert.Equal(t, tc.fifo, d.FIFOHits) + }) + } +} diff --git a/bench/trace_evidence_test.go b/bench/trace_evidence_test.go new file mode 100644 index 0000000..4b1fcb1 --- /dev/null +++ b/bench/trace_evidence_test.go @@ -0,0 +1,299 @@ +package bench_test + +import ( + "encoding/json" + "fmt" + "math" + "os" + "os/exec" + "runtime" + "sort" + "strings" + "testing" + "time" + + "github.com/stretchr/testify/require" + + ascache "github.com/sshaplygin/as-cache" + "github.com/sshaplygin/as-cache/bench" +) + +// traceEvidenceRuns is how many times each subject whose result is not +// reproducible is replayed. The adaptive cache samples its shadows through a +// hash seeded afresh for every cache, and two of the arms are not +// deterministic, so a single replay is one draw, not a measurement. +const traceEvidenceRuns = 5 + +// traceEvidenceEpochs are the epoch lengths the adaptive cache is replayed at, +// given as the number of epochs over the whole trace so that a 100k-request +// trace and a 2M-request one are both re-evaluated the same number of times. +// All three are reported: the result depends on the choice, and publishing +// only the best of them would hide that. +var traceEvidenceEpochs = []int{10, 20, 50} + +// traceEvidenceSettings is the configuration the adaptive cache is replayed +// with: request-counted epochs, so the number of epochs does not depend on how +// fast the machine is. The sampling floor is an experimental choice, not the default. +func traceEvidenceSettings(epochRequests int64) *ascache.Settings { + return &ascache.Settings{ + EpochRequests: epochRequests, + EvictPartialCapacityFilling: true, + MigrationStrategy: ascache.MigrationWarm, + ShadowSampleRate: 0.05, + MinShadowCapacity: 64, + } +} + +// nondeterministicArm names the arms whose replay differs between runs: Random +// seeds itself from the global source, and W-TinyLFU evicts asynchronously. +func nondeterministicArm(name string) bool { + return name == "Random" || name == "W-TinyLFU" +} + +// spread is one subject's hit rates, in percent, over repeated replays. +type spread struct { + Runs []float64 `json:"runs"` +} + +func (s spread) sorted() []float64 { + out := append([]float64(nil), s.Runs...) + sort.Float64s(out) + + return out +} + +func (s spread) median() float64 { + v := s.sorted() + if len(v) == 0 { + return math.NaN() + } + // Standard even-count median: the mean of the two central observations. + if len(v)%2 == 1 { + return v[len(v)/2] + } + + return (v[len(v)/2-1] + v[len(v)/2]) / 2 +} + +func (s spread) String() string { + v := s.sorted() + if len(v) == 0 { + return "n/a" + } + if v[0] == v[len(v)-1] { + return fmt.Sprintf("%.2f%%", v[0]) + } + + return fmt.Sprintf("%.2f%% [%.2f-%.2f]", s.median(), v[0], v[len(v)-1]) +} + +type adaptiveRecord struct { + EpochsPerTrace int `json:"epochs_per_trace"` + EpochRequests int64 `json:"epoch_requests"` + HitRate spread `json:"hit_rate_percent"` + Settings ascache.Settings `json:"settings"` + EffectiveSampleRate float64 `json:"effective_sample_rate"` +} + +type traceRecord struct { + Trace string `json:"trace"` + Source string `json:"source"` + Requests int `json:"requests"` + Distinct int `json:"distinct_keys"` + Capacity int `json:"capacity"` + Fixed map[string]spread `json:"fixed_hit_rate_percent"` + PolicyNames map[string]string `json:"policy_names"` + Adaptive []adaptiveRecord `json:"adaptive"` + EffectiveSampleRate float64 `json:"effective_sample_rate"` + Observe []observeRun `json:"observe_only"` + Diagnostic sieveDiagnostic `json:"lfu_sieve_diagnostic"` +} + +// bestAndWorst returns the fixed policies with the highest and lowest median +// hit rate. +func (r traceRecord) bestAndWorst() (best, worst string) { + names := make([]string, 0, len(r.Fixed)) + for name := range r.Fixed { + names = append(names, name) + } + sort.Strings(names) + if len(names) == 0 { + return "", "" + } + + best, worst = names[0], names[0] + for _, name := range names { + if r.Fixed[name].median() > r.Fixed[best].median() { + best = name + } + if r.Fixed[name].median() < r.Fixed[worst].median() { + worst = name + } + } + + return best, worst +} + +// TestTraceEvidence is the real-workload counterpart to TestAdaptiveVersusFixed. +// The synthetic result rests on workloads chosen by the author of the library, +// which is exactly the kind of evidence that should not be trusted on its own. +// +// Every fixed policy is replayed on its own, the two non-deterministic ones +// traceEvidenceRuns times. The adaptive cache, holding all nine arms, is +// replayed traceEvidenceRuns times at each of traceEvidenceEpochs. Set +// AS_CACHE_EVIDENCE_OUT to a file path to keep every run, with the commit it +// was measured at, as JSON. +func TestTraceEvidence(t *testing.T) { + if testing.Short() { + t.Skip("evidence run; use make evidence") + } + + var records []traceRecord + + for _, found := range loadKnownTraces(t) { + spec, w := found.spec, found.workload + + t.Run(w.Name, func(t *testing.T) { + record := traceRecord{ + Trace: w.Name, + Source: spec.source, + Requests: len(w.Keys), + Distinct: bench.DistinctKeys(w), + Capacity: spec.cache, + Fixed: map[string]spread{}, + PolicyNames: map[string]string{}, + } + t.Logf("\n%s\n%s\n%s\ncache %d entries, %.1f%% of the %d distinct keys", + w.Name, spec.source, w.Description, spec.cache, + float64(spec.cache)/float64(record.Distinct)*100, record.Distinct) + + for _, builder := range bench.FixedPolicies() { + runs := 1 + if nondeterministicArm(builder.Name) { + runs = traceEvidenceRuns + } + + var s spread + for range runs { + policy, err := builder.Build(spec.cache) + require.NoError(t, err) + record.PolicyNames[policy.GetType().String()] = builder.Name + s.Runs = append(s.Runs, bench.Replay(builder.Name, policy, w).HitRate()*100) + } + record.Fixed[builder.Name] = s + } + + record.Diagnostic = diagnoseSieve(t, spec.cache, w) + record.Observe = observeTrace(t, spec.cache, w) + record.EffectiveSampleRate = record.Observe[0].Advice.SampleRate + for _, epochs := range traceEvidenceEpochs { + settings := traceEvidenceSettings(int64(len(w.Keys) / epochs)) + cell := replayAdaptiveEvidence(t, spec.cache, w, epochs, settings) + require.Equal(t, record.EffectiveSampleRate, cell.EffectiveSampleRate) + record.Adaptive = append(record.Adaptive, cell) + } + + t.Logf("\n%s", traceRecordTable(record)) + + // Relative performance is an observation, never an acceptance gate. + // Retain below-baseline results too; filtering them biases the evidence. + + records = append(records, record) + }) + } + + t.Logf("\n%s", traceSummaryTable(records)) + writeTraceEvidence(t, records) +} + +// traceRecordTable renders one trace's results, best median first. +func traceRecordTable(r traceRecord) string { + type row struct { + name string + median float64 + cell string + } + + rows := make([]row, 0, len(r.Fixed)+len(r.Adaptive)) + for name, s := range r.Fixed { + rows = append(rows, row{name, s.median(), s.String()}) + } + for _, a := range r.Adaptive { + rows = append(rows, row{ + fmt.Sprintf("adaptive, %d epochs (every %d requests)", a.EpochsPerTrace, a.EpochRequests), + a.HitRate.median(), a.HitRate.String(), + }) + } + sort.SliceStable(rows, func(i, j int) bool { return rows[i].median > rows[j].median }) + + var b strings.Builder + b.WriteString("| Subject | Hit rate, median [min-max] |\n| --- | --- |\n") + for _, row := range rows { + fmt.Fprintf(&b, "| %s | %s |\n", row.name, row.cell) + } + + return b.String() +} + +// traceSummaryTable renders one row per trace: the best and worst fixed policy +// by median, and the adaptive cache at each epoch length with its distance +// from the best. +func traceSummaryTable(records []traceRecord) string { + var b strings.Builder + + b.WriteString("| Trace | Requests | Best fixed | Worst fixed |") + for _, epochs := range traceEvidenceEpochs { + fmt.Fprintf(&b, " Adaptive, %d epochs |", epochs) + } + b.WriteString("\n| --- | --- | --- | --- |" + strings.Repeat(" --- |", len(traceEvidenceEpochs)) + "\n") + + for _, r := range records { + best, worst := r.bestAndWorst() + fmt.Fprintf(&b, "| %s | %d | %s %s | %s %s |", r.Trace, r.Requests, + best, r.Fixed[best], worst, r.Fixed[worst]) + for _, a := range r.Adaptive { + fmt.Fprintf(&b, " %s (%+.2f) |", a.HitRate, a.HitRate.median()-r.Fixed[best].median()) + } + b.WriteString("\n") + } + + return b.String() +} + +// writeTraceEvidence keeps every run as JSON when AS_CACHE_EVIDENCE_OUT names a +// file, together with what is needed to reproduce it: the commit and whether +// the tree was clean, the Go version and platform, and the settings. +func writeTraceEvidence(t *testing.T, records []traceRecord) { + t.Helper() + + path := os.Getenv("AS_CACHE_EVIDENCE_OUT") + if path == "" { + return + } + + commit, err := exec.Command("git", "rev-parse", "HEAD").Output() + require.NoError(t, err, "the results file must name the commit it was measured at") + status, err := exec.Command("git", "status", "--porcelain", "--untracked-files=no").Output() + require.NoError(t, err) + + out := map[string]any{ + "commit": strings.TrimSpace(string(commit)), + "tree_modified": strings.TrimSpace(string(status)) != "", + "measured_at": time.Now().UTC().Format(time.RFC3339), + "go": runtime.Version(), + "platform": runtime.GOOS + "/" + runtime.GOARCH, + "cpus": runtime.NumCPU(), + "runs": traceEvidenceRuns, + "settings": map[string]any{ + "epoch_mode": "requests", "epochs_per_trace": traceEvidenceEpochs, + "location": "adaptive[].settings and observe_only[].settings (actual constructor arguments)", + }, + "bandit": "bandit.NewThompson(0.7, 13)", + "traces": records, + } + + data, err := json.MarshalIndent(out, "", " ") + require.NoError(t, err) + require.NoError(t, os.WriteFile(path, append(data, '\n'), 0o600)) + t.Logf("wrote %s", path) +} diff --git a/bench/trace_test.go b/bench/trace_test.go index 4373b3e..53b63ee 100644 --- a/bench/trace_test.go +++ b/bench/trace_test.go @@ -7,13 +7,10 @@ import ( "sort" "strings" "testing" - "time" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - ascache "github.com/sshaplygin/as-cache" - "github.com/sshaplygin/as-cache/bandit" "github.com/sshaplygin/as-cache/bench" ) @@ -26,8 +23,7 @@ type traceSpec struct { } // knownTraces are the traces ./scripts/fetch-traces.sh downloads. Each is -// skipped individually when absent, so a partial download still reports on -// what is there. +// required when a trace directory is configured; partial datasets are errors. func knownTraces() []traceSpec { return []traceSpec{ { @@ -74,10 +70,9 @@ func knownTraces() []traceSpec { // msrVolumes finds the MSR Cambridge volumes present locally. // // They are listed by pattern rather than by name because the trace set has -// thirteen servers and several volumes each, SNIA serves them one file at a -// time behind a click-through licence, and which of them somebody downloaded -// is their choice. Anything named msr_.csv (optionally gzipped) is -// picked up. +// thirteen servers and several volumes each: fetch-traces.sh takes six of +// them, and anyone may add others. Anything named msr_.csv +// (optionally gzipped) is picked up. func msrVolumes(dir string) []traceSpec { matches, err := filepath.Glob(filepath.Join(dir, "msr_*.csv*")) if err != nil { @@ -87,6 +82,9 @@ func msrVolumes(dir string) []traceSpec { specs := make([]traceSpec, 0, len(matches)) for _, path := range matches { + if !strings.HasSuffix(path, ".csv") && !strings.HasSuffix(path, ".csv.gz") { + continue + } specs = append(specs, traceSpec{ file: filepath.Base(path), load: func(p string) (bench.Workload, error) { @@ -113,6 +111,11 @@ func loadKnownTraces(t *testing.T) []struct { t.Skipf("%s; run ./scripts/fetch-traces.sh and set %s", err, bench.TraceDirEnv) } + for _, volume := range []string{"hm_0", "prn_0", "proj_0", "src1_2", "usr_0", "web_0"} { + _, plainErr := os.Stat(filepath.Join(dir, "msr_"+volume+".csv")) + _, gzipErr := os.Stat(filepath.Join(dir, "msr_"+volume+".csv.gz")) + require.True(t, plainErr == nil || gzipErr == nil, "required MSR volume absent: %s", volume) + } var found []struct { spec traceSpec workload bench.Workload @@ -120,11 +123,8 @@ func loadKnownTraces(t *testing.T) []struct { for _, spec := range append(knownTraces(), msrVolumes(dir)...) { path := filepath.Join(dir, spec.file) - if _, statErr := os.Stat(path); statErr != nil { - t.Logf("absent, skipping: %s", spec.file) - - continue - } + _, statErr := os.Stat(path) + require.NoError(t, statErr, "required trace absent: %s", spec.file) w, loadErr := spec.load(path) require.NoError(t, loadErr, "load %s", spec.file) @@ -141,76 +141,6 @@ func loadKnownTraces(t *testing.T) []struct { return found } -// TestTraceEvidence is the real-workload counterpart to TestAdaptiveVersusFixed. -// The synthetic result - that adaptive selection never beats the best fixed -// policy - rests on workloads chosen by the author of the library, which is -// exactly the kind of evidence that should not be trusted on its own. -func TestTraceEvidence(t *testing.T) { - if testing.Short() { - t.Skip("evidence run; use make evidence") - } - - for _, found := range loadKnownTraces(t) { - spec, w := found.spec, found.workload - - t.Run(w.Name, func(t *testing.T) { - distinct := bench.DistinctKeys(w) - t.Logf("\n%s\n%s\n%s\ncache %d entries, %.1f%% of the %d distinct keys", - w.Name, spec.source, w.Description, spec.cache, - float64(spec.cache)/float64(distinct)*100, distinct) - - results := make([]bench.Result, 0, len(bench.FixedPolicies())+1) - for _, builder := range bench.FixedPolicies() { - policy, err := builder.Build(spec.cache) - require.NoError(t, err) - results = append(results, bench.Replay(builder.Name, policy, w)) - } - - arms, err := bench.AdaptiveArms(spec.cache) - require.NoError(t, err) - - cache, err := ascache.NewAdaptiveCache(arms, - bandit.NewThompson(0.7, 13), - &ascache.Settings{ - EpochDuration: 2 * time.Millisecond, - EvictPartialCapacityFilling: true, - MigrationStrategy: ascache.MigrationWarm, - ShadowSampleRate: 0.05, - MinShadowCapacity: 64, - }) - require.NoError(t, err) - t.Cleanup(func() { _ = cache.Close() }) - - adaptive := bench.Replay("adaptive", cache, w) - results = append(results, adaptive) - - t.Logf("\n%s", bench.Table(results)) - - best, worst := results[0], results[0] - for _, r := range results { - if r.Policy == "adaptive" { - continue - } - if r.HitRate() > best.HitRate() { - best = r - } - if r.HitRate() < worst.HitRate() { - worst = r - } - } - - t.Logf("adaptive %.2f%% | best fixed %s %.2f%% (%+.2f pts) | worst fixed %s %.2f%%", - adaptive.HitRate()*100, best.Policy, best.HitRate()*100, - (adaptive.HitRate()-best.HitRate())*100, worst.Policy, worst.HitRate()*100) - - // The same claim the synthetic suite makes: the value on offer is a - // bound on the downside of choosing wrong, not beating the best. - assert.Greater(t, adaptive.HitRate(), worst.HitRate(), - "adaptive selection must beat the worst fixed policy on %s", w.Name) - }) - } -} - // TestTraceLoaders checks the parsers against the published ground truth for // each trace, so a format misread cannot quietly produce a plausible-looking // key stream and wrong evidence with it. diff --git a/bench/tuning_test.go b/bench/tuning_test.go index 7ac57cc..98eae6b 100644 --- a/bench/tuning_test.go +++ b/bench/tuning_test.go @@ -1,8 +1,11 @@ package bench_test import ( + "encoding/json" + "os" + "path/filepath" + "strings" "testing" - "time" "github.com/stretchr/testify/require" @@ -11,73 +14,67 @@ import ( "github.com/sshaplygin/as-cache/bench" ) -// TestAdaptiveTuning asks whether the gap between adaptive selection and the -// best fixed policy is a property of the idea or of how it was configured. -// -// The first trace runs used a 2ms epoch with warm migration, which on a 20k -// cache means copying 20,000 entries several hundred times during a replay. -// That is a configuration that spends most of its time migrating, and blaming -// the approach for it would be a measurement error rather than a finding. +type tuningRecord struct { + Trace string `json:"trace"` + Strategy string `json:"strategy"` + Gates bool `json:"gates"` + Epochs int `json:"epochs"` + EpochRequests int64 `json:"epoch_requests"` + HitRate spread `json:"hit_rate_percent"` + Settings ascache.Settings `json:"settings"` +} + +// TestAdaptiveTuning isolates configuration effects on the P3 example used in +// configuration.md. All four combinations use 5 repeats and 10/20/50 request +// epochs. It is not a search for a universally best production setting. func TestAdaptiveTuning(t *testing.T) { if testing.Short() { t.Skip("evidence run; use make evidence") } - - configs := []struct { - name string - epoch time.Duration - strategy ascache.MigrationStrategy - gates bool - }{ - {"2ms epoch, warm migration", 2 * time.Millisecond, ascache.MigrationWarm, false}, - {"2ms epoch, cold migration", 2 * time.Millisecond, ascache.MigrationCold, false}, - {"50ms epoch, warm migration", 50 * time.Millisecond, ascache.MigrationWarm, false}, - {"50ms epoch, warm + stability gates", 50 * time.Millisecond, ascache.MigrationWarm, true}, + dir, err := bench.TraceDir() + if err != nil { + t.Skipf("%s; configure %s", err, bench.TraceDirEnv) } - - for _, found := range loadKnownTraces(t) { - spec, w := found.spec, found.workload - - t.Run(w.Name, func(t *testing.T) { - // The bar: the best any single policy manages on this trace. - best := bench.Result{} - bestName := "" - for _, builder := range bench.FixedPolicies() { - policy, err := builder.Build(spec.cache) - require.NoError(t, err) - r := bench.Replay(builder.Name, policy, w) - if r.HitRate() > best.HitRate() { - best, bestName = r, builder.Name + var records []tuningRecord + for _, spec := range knownTraces() { + if spec.file != "arc_p3.gz" { + continue + } + workload, loadErr := spec.load(filepath.Join(dir, spec.file)) + require.NoError(t, loadErr) + for _, epochs := range traceEvidenceEpochs { + for _, strategy := range []ascache.MigrationStrategy{ascache.MigrationCold, ascache.MigrationWarm} { + for _, gates := range []bool{false, true} { + record := tuningRecord{Trace: workload.Name, Epochs: epochs, EpochRequests: int64(len(workload.Keys) / epochs), Gates: gates, Strategy: "cold"} + if strategy == ascache.MigrationWarm { + record.Strategy = "warm" + } + for range traceEvidenceRuns { + arms, err := bench.AdaptiveArms(spec.cache) + require.NoError(t, err) + settings := traceEvidenceSettings(record.EpochRequests) + settings.MigrationStrategy = strategy + if gates { + settings.MinHitRateImprovement = 0.02 + settings.SwitchCooldownEpochs = 3 + } + record.Settings = *settings + cache, err := ascache.NewAdaptiveCache(arms, bandit.NewThompson(0.7, 13), settings) + require.NoError(t, err) + t.Cleanup(func() { require.NoError(t, cache.Close()) }) + record.HitRate.Runs = append(record.HitRate.Runs, bench.Replay("tuning", cache, workload).HitRate()*100) + require.NoError(t, cache.Close()) + } + t.Logf("%s %d epochs %s gates=%v: %s", record.Trace, epochs, record.Strategy, gates, record.HitRate) + records = append(records, record) } } - - t.Logf("\n%s: best fixed is %s at %.2f%%", w.Name, bestName, best.HitRate()*100) - - for _, cfg := range configs { - arms, err := bench.AdaptiveArms(spec.cache) - require.NoError(t, err) - - settings := &ascache.Settings{ - EpochDuration: cfg.epoch, - EvictPartialCapacityFilling: true, - MigrationStrategy: cfg.strategy, - ShadowSampleRate: 0.05, - MinShadowCapacity: 64, - } - if cfg.gates { - settings.MinHitRateImprovement = 0.02 - settings.SwitchCooldownEpochs = 3 - } - - cache, err := ascache.NewAdaptiveCache(arms, bandit.NewThompson(0.7, 13), settings) - require.NoError(t, err) - - r := bench.Replay("adaptive", cache, w) - _ = cache.Close() - - t.Logf(" %-36s %6.2f%% (%+6.2f pts vs best) %7.0f ns/op", - cfg.name, r.HitRate()*100, (r.HitRate()-best.HitRate())*100, r.NsPerOp()) - } - }) + } + } + require.Len(t, records, 12) + if path := os.Getenv("AS_CACHE_EVIDENCE_OUT"); path != "" { + data, err := json.MarshalIndent(records, "", " ") + require.NoError(t, err) + require.NoError(t, os.WriteFile(strings.TrimSuffix(path, ".json")+"-tuning.json", append(data, '\n'), 0o600)) } } diff --git a/benchclient/benchclient.go b/benchclient/benchclient.go index dc29b0a..f876809 100644 --- a/benchclient/benchclient.go +++ b/benchclient/benchclient.go @@ -32,7 +32,6 @@ import ( ascache "github.com/sshaplygin/as-cache" "github.com/sshaplygin/as-cache/bandit" "github.com/sshaplygin/as-cache/policies" - "github.com/sshaplygin/as-cache/policies/fifo" "github.com/sshaplygin/as-cache/policies/tinylfu" ) @@ -107,40 +106,17 @@ type Cache[K comparable, V any] struct { } // DefaultArms is the policy set used when Cache.Arms is nil: LRU, LFU, 2Q, -// Random and S3-FIFO. LRU, LFU, 2Q and S3-FIFO are deterministic, which is -// most of what makes a replay through this package reproducible. +// and Random. LRU, LFU and 2Q are deterministic. The experimental FIFO +// adapters are excluded until their module is published. // -// Random is the exception, and it is a real one rather than a caveat: it seeds -// itself from the global source at construction (see policies.NewRandom), so -// two replays of one trace do not agree. Measured over 20,000 requests against -// a 50-entry cache, three identical replays served 44, 44 and 40 hits. +// Random seeds itself at construction, so repeated replays need not agree. +// It can be a strong arm on cyclic traffic; a fixed bandit seed does not +// remove the policy's own randomness. // -// Do not assume that bounds the damage. Random is not a weak arm everywhere - -// on a cyclic workload it serves 82.2% where LRU and LFU serve 0.00%, making it -// the best of these five - so it is exactly the workloads where the bandit -// would select it that inherit its jitter. A replay through this package is -// reproducible up to that arm, not exactly. Giving RandomCache a fixed default -// seed would close it; that is a behaviour change to a published module and -// has not been made. -// -// Two absences are deliberate. -// -// ARC is patented by IBM (US 6,996,676), which is why it lives in its own -// module here; pulling it into a package anyone might import would defeat that -// separation. -// -// W-TinyLFU is left out because it is not reproducible. Measured directly, -// with no cache and no bandit above it, one trace replayed three times gave -// three different hit counts and left the cache at 527, 504 and 545 entries -// against a capacity of 500: otter evicts asynchronously and reports an -// approximate size, so its result depends on how the run was scheduled. It is -// the strongest arm available and worth including when a comparison matters -// more than repeatability - see ArmsWithWindowTinyLFU, which is that trade -// made explicitly. -// -// S3-FIFO is here for the opposite reason to W-TinyLFU's absence: it is the -// other strong admission policy, and it is deterministic and unencumbered, so -// including it costs the set nothing it was built to protect. +// Other optional arms are excluded: ARC lives in a separate module for its +// patent constraints, W-TinyLFU performs asynchronous maintenance, and the +// experimental FIFO module is not published. ArmsWithWindowTinyLFU explicitly +// adds W-TinyLFU when that comparison matters more than exact repeatability. func DefaultArms[K comparable, V any](capacity int) ([]ascache.Policy[K, V], error) { lru, err := policies.NewLRU[K, V](capacity) if err != nil { @@ -157,17 +133,11 @@ func DefaultArms[K comparable, V any](capacity int) ([]ascache.Policy[K, V], err return nil, fmt.Errorf("build 2Q arm: %w", err) } - s3, err := fifo.NewS3FIFOPolicy[K, V](capacity) - if err != nil { - return nil, fmt.Errorf("build S3-FIFO arm: %w", err) - } - return []ascache.Policy[K, V]{ lru, lfu, twoQueue, policies.NewRandomPolicy[K, V](capacity), - s3, }, nil } diff --git a/benchclient/benchclient_test.go b/benchclient/benchclient_test.go index e8ed938..b004cea 100644 --- a/benchclient/benchclient_test.go +++ b/benchclient/benchclient_test.go @@ -127,7 +127,7 @@ func TestDefaultArmsAreDistinctAndPatentFree(t *testing.T) { arms, err := benchclient.DefaultArms[uint64, uint64](256) require.NoError(t, err) - require.Len(t, arms, 5) + require.Len(t, arms, 4) seen := make(map[ascache.PolicyType]bool, len(arms)) for _, arm := range arms { @@ -139,8 +139,9 @@ func TestDefaultArmsAreDistinctAndPatentFree(t *testing.T) { assert.False(t, seen[ascache.ARC], "ARC is patented and must not be pulled in by default") assert.False(t, seen[ascache.TinyLFU], "W-TinyLFU is not reproducible and must be opted into, not defaulted to") - assert.True(t, seen[ascache.S3FIFO], - "S3-FIFO is deterministic and unencumbered, so it belongs in the default set") + assert.ElementsMatch(t, []ascache.PolicyType{ascache.LRU, ascache.LFU, ascache.TwoQueue, ascache.Random}, + []ascache.PolicyType{arms[0].GetType(), arms[1].GetType(), arms[2].GetType(), arms[3].GetType()}, + "default arms must all belong to modules published in this release") } func TestArmsWithWindowTinyLFUAddsExactlyThatArm(t *testing.T) { diff --git a/benchclient/go.mod b/benchclient/go.mod index 333af88..8ded118 100644 --- a/benchclient/go.mod +++ b/benchclient/go.mod @@ -3,11 +3,10 @@ module github.com/sshaplygin/as-cache/benchclient go 1.25.2 require ( - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/bandit v0.3.1 - github.com/sshaplygin/as-cache/policies v0.3.1 - github.com/sshaplygin/as-cache/policies/fifo v0.3.1 - github.com/sshaplygin/as-cache/policies/tinylfu v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/bandit v0.4.0 + github.com/sshaplygin/as-cache/policies v0.4.0 + github.com/sshaplygin/as-cache/policies/tinylfu v0.4.0 github.com/stretchr/testify v1.11.1 ) @@ -16,19 +15,6 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect github.com/maypok86/otter/v2 v2.3.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/scalalang2/golang-fifo v1.2.0 // indirect - github.com/sshaplygin/as-cache/lfu v0.3.1 // indirect + github.com/sshaplygin/as-cache/lfu v0.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => .. - -replace github.com/sshaplygin/as-cache/bandit => ../bandit - -replace github.com/sshaplygin/as-cache/policies => ../policies - -replace github.com/sshaplygin/as-cache/policies/fifo => ../policies/fifo - -replace github.com/sshaplygin/as-cache/policies/tinylfu => ../policies/tinylfu - -replace github.com/sshaplygin/as-cache/lfu => ../lfu diff --git a/doc.go b/doc.go index 1516878..944d90e 100644 --- a/doc.go +++ b/doc.go @@ -47,21 +47,20 @@ // // # Cost // -// Shadow policies hold keys and eviction bookkeeping but never values, so they -// cost far less than a full copy: six policies measure at 2.65x the memory of -// one, and 1.32x with [Settings.ShadowSampleRate] set. Sampling has shadows -// track a deterministic fraction of the keyspace, which stops per-operation -// cost scaling with the number of policies. +// Shadow policies hold keys and eviction bookkeeping while omitting payload +// values. Each additional arm still requires storage and work. Sampling reduces +// the measured keyspace and shadow capacity; it does not remove the dependence +// on the number of policies. Costs depend on the workload, payload and host. // // # What to expect // -// Adaptive selection reliably beats the worst policy you might have picked and -// lands close to the best. On published traces it comes within about a point -// of the best fixed policy and occasionally beats it, without being told in -// advance which that is. It will not dramatically outperform a policy you have -// already measured and know suits your traffic. +// Adaptive selection is experimental. Its hit rate can fall below fixed-policy +// baselines, and the observed differences depend on the workload and settings. +// Sampled shadows and asynchronous policies introduce variation across replays; +// an observed range does not bound future outcomes. Evaluate fixed alternatives +// on representative traffic before enabling automatic switching. // -// Epoch duration is the setting that matters most: too short and the cache -// spends its time migrating between policies rather than serving. See the -// README for measurements and configuration guidance. +// Request-counted replays compare epoch settings reproducibly. Production uses +// wall-clock epochs, where switching and migration costs require evaluation on +// the service itself. See the README for current evidence and configuration. package ascache diff --git a/docs/advisor-mode.md b/docs/advisor-mode.md index 8aa6396..c08aeb4 100644 --- a/docs/advisor-mode.md +++ b/docs/advisor-mode.md @@ -2,10 +2,10 @@ ## Advisor mode -The safest way to adopt this library is not to let it switch anything. In -`ObserveOnly` mode the cache behaves exactly like the first policy you give it --- nothing ever migrates, nothing ever switches -- while every other policy is -measured in the background against your real traffic. +`ObserveOnly` lets you study policy rankings with switching disabled. The +first policy you give the cache stays active and no migration runs. Shadow +lookups still run on request paths and add CPU, memory and latency overhead; +epoch reporting can use either the timer or request-count clock. ```go cache, err := ascache.NewAdaptiveCache( @@ -34,11 +34,13 @@ policy hit rate hits misses * currently active ``` -That answers a question that is otherwise expensive to ask, at no risk: you -learn whether a different eviction policy would serve your traffic better, and -by how much, without changing what your cache does. Acting on the answer is -then your choice -- switch to that policy directly, or turn `ObserveOnly` off -and let the bandit do it. +The output above is a synthetic example of the report format, not measured +output from a retained run. In use, the report compares measured rates, +not guaranteed full-cache outcomes. In particular, sampled miniatures can +change rankings and absolute hit rates; validate a recommendation with a +standalone replay before acting on it. See +[sampling evidence](evidence.md#does-sampling-distort-the-comparison). +`ObserveOnly` keeps the active policy unchanged while you collect that evidence. `Advice()` is safe to call at any time. Check `Epochs` before believing it: a handful of epochs is not evidence. diff --git a/docs/benchmarking.md b/docs/benchmarking.md index acd7d34..4f5c92d 100644 --- a/docs/benchmarking.md +++ b/docs/benchmarking.md @@ -2,12 +2,10 @@ ## Reproducible replays -`EpochDuration` measures on a wall clock, which is right in production and -wrong for a benchmark: replaying one trace twice re-evaluates a different -number of times on a machine that happens to be busy, so the hit rate moves -between runs and cannot be compared with anything. `EpochRequests` ends an -epoch every N `Get` calls instead, which takes the clock out of the -measurement entirely. +`EpochDuration` measures on a wall clock. A trace replay can therefore +re-evaluate a different number of times when the machine is busy. +`EpochRequests` ends an epoch every N `Get` calls instead, fixing the request +boundaries independently of replay speed. Other sources of variation remain. ```go &ascache.Settings{EpochRequests: 10_000} // no EpochDuration: no wall clock at all @@ -17,27 +15,25 @@ measurement entirely. counts exactly the requests the bandit is shown. A write-only workload never ends an epoch, which is correct — there is nothing to compare policies on. The epoch runs on whichever goroutine makes the Nth `Get`, so that call pays for -the switch and any migration; prefer `EpochDuration` in production, where that -work belongs on the background goroutine. Setting both applies both. +the switch and any migration. `EpochDuration` performs that work on a +background goroutine instead; it changes the timing model of the experiment. +Setting both applies both. -Two things outside the epoch clock also have to hold still, and one of them is -not in your control: +Exact replay also requires the following: - **Seed the bandit.** `bandit.NewThompson(discount, seed)` takes one. -- **Every arm must be deterministic.** LRU, LFU, 2Q, S3-FIFO and SIEVE are. - **Random is not**, despite being the simplest arm here: it seeds itself from - the global source at construction, so three identical replays served 44, 44 - and 40 hits over 20,000 requests. It is in `DefaultArms` as the control arm, - so replays through `benchclient` are reproducible up to that arm rather than - exactly — and note that Random is not always the weak arm it looks like: on - a cyclic workload it serves 82.2% where LRU and LFU serve 0.00%, so the - workloads where the bandit would actually pick it are the ones that inherit - its jitter. - **W-TinyLFU is not**: otter evicts asynchronously and reports an approximate - size, so replaying one trace three times against it directly gave three - different hit counts and left 527, 504 and 545 entries in a cache with a - capacity of 500. One unstable arm moves which policy the bandit picks, and - with it the whole replay. +- **Disable random key sampling for exact replay.** `ShadowSampleRate: 0` + uses full-size shadows. With sampling enabled, each cache gets a fresh hash + seed, which is not controlled by the bandit's seed. The real-trace matrix + deliberately measures this variation over three batches of five replays. +- **Keep TTL longer than a replay.** Request-counted epochs do not change + wall-clock expiry; the suite uses a one-hour TTL to measure its LRU behavior. +- **Every arm must be deterministic for exact replay.** Random seeds itself + at construction and W-TinyLFU evicts asynchronously. Its retained size can + also exceed nominal capacity. Either arm makes the complete adaptive run + nondeterministic even with fixed request epochs and a seeded bandit. + Random is in `DefaultArms` as a control and can outperform LRU on cyclic + traffic; it must not be dismissed as an always-weak policy. ## Benchmark harnesses @@ -63,23 +59,33 @@ usable by anything wanting the same five methods. It is configured for reproducibility rather than for the best number: request-counted epochs, a seeded bandit, and no sampling. `DefaultArms` is LRU, -LFU, 2Q, Random and S3-FIFO — all deterministic except `Random`, which is +LFU, 2Q and Random — all deterministic except `Random`, which is noted above. `ArmsWithWindowTinyLFU` -adds the strongest arm and gives up repeatability to do it — that trade is +adds another workload-dependent baseline and gives up repeatability to do it — that trade is yours to make explicitly, which is why it is a second function rather than an option. ARC is absent for the [patent reason](policies.md#arc-is-a-separate-module); a harness that wants it can supply its own `Arms`. ## The repository's own suite -`make evidence` replays a suite of deterministic workloads against every policy, -against the adaptive cache, and against competing Go cache libraries. The -generators are in [bench/workload.go](../bench/workload.go) and the results are -written up in [evidence](evidence.md). +`AS_CACHE_TRACES=... make evidence` requires all thirteen files in +[scripts/trace-inputs.json](../scripts/trace-inputs.json), verifies their sizes +and hashes, then replays the synthetic and real-trace suites. Fetch them first +with `./scripts/fetch-traces.sh`. Missing inputs fail before any tests run. +The measured/reference matrix has twelve traces: `lirs_multi2.trace.gz` is part +of the downloaded and hashed inventory but is not replayed by this suite. -`./scripts/fetch-traces.sh` downloads published traces (nothing is committed), -after which `AS_CACHE_TRACES=... make evidence` replays those too. +For synthetic diagnostics without downloaded traces, run: + +```sh +(cd bench && env -u AS_CACHE_TRACES -u AS_CACHE_LRU_REFERENCE go test -count=1 -timeout 45m -v ./...) +``` + +That command skips the trace-dependent tests and cannot produce a publishable +complete dataset. The workload generators are in +[bench/workload.go](../bench/workload.go); the current interpretation is in +[evidence](evidence.md). Evidence tests are guarded by `testing.Short()` and excluded from `make test`. Under `-race` epoch pacing changes by roughly 15x and the measurements become @@ -91,6 +97,52 @@ that looks entirely plausible and quietly invalidates every number taken from it. They are pinned against fixtures copied from the real files in [bench/trace_formats_test.go](../bench/trace_formats_test.go). +## Saved baseline + +The [current artifact](../bench/results/current/README.md) retains all twelve +traces, three full evidence logs and generated provenance for one clean commit. +The trace matrix uses nine arms, warm migration, requested sampling 0.05 and +minimum shadow capacity 64 (the library default is 256). Per-trace effective +rates and 10/20/50 request epochs are recorded explicitly. + +Each batch runs Random, W-TinyLFU and each adaptive setting five times; +deterministic fixed arms run once. Three consecutive full batches provide +fifteen observations per nondeterministic cell. Every outcome is retained, +including comparisons below fixed baselines. Min/max are not confidence bounds. +The artifact also includes an ObserveOnly sweep, P3 tuning and a Meta size +comparison; see [evidence](evidence.md) for their different scopes. + +To produce and verify a new current dataset from committed HEAD: + +```sh +AS_CACHE_TRACES="$PWD/traces" python3 scripts/record_evidence.py --out /tmp/as-cache-current +python3 scripts/record_evidence.py --verify /tmp/as-cache-current +``` + +Use an empty output directory and run heavy measurements sequentially. The +recorder calibrates LRU, runs the object/byte comparison, executes `make evidence` +three times, merges the observations, generates the tables and hashes the +outputs. After review, replace `bench/results/current/`; do not retain past +iteration datasets. The recorder exports one resolved HEAD into a temporary, +private Git checkout and runs that commit's scripts there. Developer edits, +ignored tests, embeds and other untracked assets cannot enter the measurements. +The original workspace, including preserved local probes, is left untouched. +Commit changes before recording if they should be measured. The recorder controls the build environment: ambient Make, shell, Git and Go +configuration cannot inject source overrides. Tool paths, caches, locale and +network proxy settings remain available. The printed commit identifies the snapshot; routine local tests can still include developer files +that CI does not see. Final acceptance uses a clean committed checkout. + +Output must be empty and either outside the repository or inside an ignored +directory; unsuitable output is rejected before recording starts. The recorder +rejects unexpected files introduced into its private snapshot, missing required +traces and failed commands. Failed commands +retain their log and exit code for diagnosis. The verifier requires every +artifact and measurement command and recomputes the pooled JSON from the raw +batches, checking settings, trace inventories and observation counts. + +For one diagnostic batch, use `AS_CACHE_TRACES=... AS_CACHE_EVIDENCE_OUT=... make evidence`. +This is not a replacement for the three-batch publication procedure. + ## Real traces | Trace | Loader | Obtained by | @@ -99,7 +151,7 @@ it. They are pinned against fixtures copied from the real files in | LIRS (`loop`, `2_pools`, `multi2`) | `LoadTrace(p, LIRSFormat, n)` | script | | ARC paper (`p3`, `oltp`) | `LoadARCTrace(p, n)` | script | | Meta kvcache | `LoadMetaKVTrace(p, MetaKVFormat{}, n)` | script, partial download | -| MSR Cambridge | `LoadMSRTrace(p, MSRFormat{}, n)` | by hand — see below | +| MSR Cambridge | `LoadMSRTrace(p, MSRFormat{}, n)` | script, six volumes from a mirror — see below | Three of these layouts expand: **one record is not one request**, and reading them as though it were produces a workload with the same keys, far fewer @@ -123,13 +175,84 @@ requests and much less reuse than the traffic they were taken from. The Meta files are 5 to 10 GB each, so the script fetches only the first slice of one over a byte-range request — no AWS credentials or CLI needed. The slice -ends mid-line and the loader skips the truncated row. `AS_CACHE_META_BYTES` -sets the size; the default of 128 MiB is about 5M rows. - -**MSR Cambridge has to be downloaded by hand.** SNIA serves the files behind a -click-through licence and a cookie check, so the script cannot fetch them and -does not pretend to: it prints a note instead. Take one or more per-volume CSVs -from , name them -`msr_.csv` (`.gz` is fine) and drop them in the trace directory — -anything matching that pattern is picked up automatically, so which volumes you -take is your choice. +ends mid-line and the loader skips the truncated row. The 128 MiB prefix and +its SHA-256 are pinned in `scripts/trace-inputs.json`; a different slice needs +a deliberate catalog update, not an unchecked size override. + +**MSR Cambridge comes from a mirror, not from SNIA.** The canonical source is +[SNIA IOTTA trace 388](https://iotta.snia.org/traces/block-io/388), which hands +files out only through a browser form (cookies, name, affiliation and email) +and did not respond at all in September 2026. The script takes the files from +the [cacheMon](https://github.com/cacheMon/cache_dataset) mirror instead, which +holds SNIA's original `msr-cambridge1.tar` and `msr-cambridge2.tar`. That is a +lawful copy: the SNIA Trace Data Files Download License (v2.0) permits use and +redistribution without restriction. + +The two archives total 5.3 GB, so the script fetches six volumes by byte range +— `hm_0`, `prn_0`, `proj_0`, `src1_2`, `usr_0` and `web_0`, about 210 MB — and +checks each against the MD5 in the archive's own `MD5.txt`. Those checksums +travel inside the mirrored archive, so they catch a corrupted or repacked +download, not a mirror that altered the data deliberately; nobody here has +compared the mirror against a copy downloaded from SNIA. + +Any file named `msr_.csv` (`.gz` is fine) in the trace directory is +picked up, so other volumes, or files you downloaded from SNIA yourself, need +no code change. Cite Narayanan, Donnelly and Rowstron, *Write Off-Loading*, +FAST '08, as the traces' README asks. + +## Checking the loaders against libCacheSim + +A loader that misreads a format produces a workload that looks entirely +plausible, and the fixtures above only prove that the loader reads the rows it +was tested on. `make verify-ref` checks the whole pipeline — loader, replay and +hit counting — against an independent implementation on every trace the +evidence suite reads: + +```bash +AS_CACHE_TRACES=$(pwd)/traces make verify-ref +``` + +1. Each trace is expanded into one key per request by awk in + [scripts/verify-ref.sh](../scripts/verify-ref.sh), straight from the raw + file and following the loader's documented rules. `oracle_trace.py` exports + the sequence in oracleGeneralBin format with unit sizes. +2. [libCacheSim](https://github.com/1a1a11a/libCacheSim) replays that through + LRU, object sizes ignored, at 0.25, 0.5, 1, 2 and 4 times the capacity the + evidence suite uses. The script builds it into `.tools/` at a pinned commit, + `1d7415569978330ea95c9cff06a260630406f7e3`; on macOS that needs + `brew install glib argp-standalone zstd cmake pkg-config`. + `AS_CACHE_LIBCACHESIM` points it at an existing checkout instead. +3. `TestLRUMatchesReference` loads the same files through the Go loaders, + replays this repository's LRU at the same capacities, and requires the same + request count and a miss ratio within 0.0051 percentage points. The reference + must contain finite ratios in [0, 1] with exactly four decimal places, the + pinned simulator format. The bound is half its rounding quantum (0.005 + percentage points) plus 0.0001 numerical slack; coarser input is rejected. + +The gate fails when it cannot run: libCacheSim that will not build, a trace +missing from the directory, or the Go test skipping. On all twelve traces at +all five capacities, 60 points, the largest difference is 0.005 points, which +is the rounding of cachesim's four-decimal output, and every request count +matches. + +Agreement establishes that two independent expansions of the same interpretation +and their LRU hit counting agree within the simulator's rounding. It cannot +detect a shared misunderstanding of a source format, and says nothing about +other policies or automatic selection. Coverage is bidirectional: an additional +MSR volume makes the gate fail until it is included in the reference inventory. + +The fetcher verifies recorded sizes and SHA-256 hashes of existing files on +every run; new downloads are verified as `.part` files before rename. Corrupt +cached files fail with their name. The complete evidence command verifies the +same catalog before loading any trace, so partial input sets cannot quietly +become a publication dataset. + +`make evidence-check` verifies the retained artifact hashes, pooled observations, +and exact generated report without downloading traces or running measurements. +It is part of `make all` and CI. After committing a report-template change, use +`python3 scripts/record_evidence.py --render bench/results/current` to validate +the existing inputs and regenerate presentation; the manifest records the new +report-generator commit. Refresh executes the generator from an isolated export +of that commit, so Git index flags cannot substitute working-tree code while +claiming committed provenance. Strict verification compares exact UTF-8 report +bytes, including line endings, without modifying any artifact. diff --git a/docs/configuration.md b/docs/configuration.md index db4146f..30157e3 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -47,7 +47,7 @@ type Settings struct { | Strategy | Behaviour | Trade-off | | --- | --- | --- | | `MigrationCold` (default) | New active policy starts empty | Simple; causes a temporary miss spike | -| `MigrationWarm` | All key/value pairs copied at switch time | No miss spike; O(n) work at switch | +| `MigrationWarm` | Cached key/value pairs offered to the incoming policy | Transfers values, not eviction history; O(n) work at switch | | `MigrationGradual` | Keys promoted on Get; one key drained per Add | Spreads migration cost; every `Get` takes the write lock while the window is open, which closes at the next epoch at the latest | A gradual window serialises reads for as long as it is open. On a long epoch @@ -58,19 +58,19 @@ miss, the same as it would have been under `MigrationCold`. Only `Get` counts, because `Get` is what takes the write lock; `Add` drains a key per call and shortens the window anyway. Zero, the default, sets no cap. -Measured on zipf with a switch from LRU to LFU, a cap of 100 cost 6.5 points of -hit rate over the first 1,000 requests after the switch, a cap of 10 made gradual -behave like cold, and a cap of 1,000 was never reached because read-through -traffic had already drained the window. [Evidence](evidence.md#what-does-a-switch-cost-right-after-it) -has the table, including what each strategy costs. +A short request cap can end migration before reusable entries transfer. +`TestSwitchWarmupCost` compares those effects in fixed request windows; see +[evidence](evidence.md#what-does-a-switch-cost-right-after-it) for the current +logs and the limits of that comparison. ## Reducing shadow overhead Running policies in parallel costs something on every operation: each shadow is another lookup and another lock. Since a shadow exists only to estimate a hit rate, and a hit rate can be estimated from a sample, `ShadowSampleRate` lets -shadows track a deterministic fraction of the keyspace instead of mirroring -everything. +shadows track a hash-selected subset of the keyspace instead of mirroring +everything. Membership is stable within one cache instance; a new cache gets +a fresh random hash seed. ```go &ascache.Settings{ @@ -79,34 +79,22 @@ everything. } ``` -Shadows shrink along with the rate, so each remains a faithful miniature of a -full-size cache rather than an undersized one, and every shadow samples the same -keys so their hit rates stay comparable. The active policy still serves every +Shadows shrink along with the rate, and every shadow samples the same keys. +This gives each arm a comparable input stream, but a miniature can change +reuse patterns and policy rankings. The active policy still serves every key -- only the measurement is sampled, and it is sampled for the active policy too, so no arm is judged on more evidence than another. `Stats()` continues to report real, unsampled traffic. -The effect is that per-operation cost stops scaling with the number of policies. -Measured with mutex-backed stub policies on an Apple M1 Max at -`-benchtime=300ms`, so the numbers isolate what the adaptive layer adds rather -than what any particular policy costs: +Sampling reduces how often a request visits every shadow; it does not remove +the dependence on policy count. A sampled key still visits each shadow, so +fan-out work scales with both the sampled request fraction and the number of +arms. Sampling selects keys, and a hot selected key can account for many +requests: 5% of keys need not mean exactly 5% of requests. -| Benchmark | shadows | sampling off | rate 0.05 | -| --- | --- | --- | --- | -| `Get` | 1 | 102 ns/op | 40 ns/op | -| `Get` | 3 | 153 ns/op | 44 ns/op | -| `GetParallel` | 1 | 284 ns/op | 183 ns/op | -| `GetParallel` | 3 | 361 ns/op | 187 ns/op | -| `Add` | 1 | 98 ns/op | 53 ns/op | -| `Add` | 3 | 142 ns/op | 55 ns/op | -| `MixedParallel` | 1 | 187 ns/op | 96 ns/op | - -Read the `Get` rows down the shadow count. Unsampled, two further shadows cost -another 51ns, because every operation visits every policy. Sampled, the same -step costs 4ns -- the fan-out happens on 5% of operations, so adding a policy -is close to free. That is what makes carrying nine arms practical. - -Reproduce with `go test -run '^$' -bench . -benchtime=300ms .` +The [warm-cache measurements](evidence.md#memory-and-per-operation-cost) +show the observed overhead with eight real policies. To isolate wrapper cost +with stub policies, run `go test -run '^$' -bench . -benchtime=300ms .`. Sampling is off by default. `MinShadowCapacity` (256 unless you set it) is the floor on a miniature: when the rate would shrink a shadow below it, the @@ -114,9 +102,9 @@ floor on a miniature: when the rate would shrink a shadow below it, the enough that the floor exceeds its nominal size, sampling disables itself. A miniature of a handful of entries measures noise rather than a policy. -Sampling does not distort which policy wins — that was measured directly, see -[evidence](evidence.md#does-sampling-distort-the-comparison). It does distort -the absolute hit rate a shadow reports, so do not quote one as a forecast. +Sampling may change policy rankings and absolute hit-rate estimates, so do not +quote a shadow rate as a forecast. See the +[evidence and its limits](evidence.md#does-sampling-distort-the-comparison). ## Keeping switches stable @@ -139,34 +127,34 @@ against your traffic. ## Tuning, measured -The epoch duration is the setting that matters most, and the failure mode is -not subtle. Measured on the ARC P3 trace with a 20k-entry cache: - -| Configuration | Hit rate | ns/op | -| --- | --- | --- | -| 50ms epoch, warm migration | 11.4% | 795 | -| 2ms epoch, warm migration | 3.2% | 38,056 | -| 2ms epoch, cold migration | 0.7% | 722 | - -An epoch short enough to trigger frequent switches makes the cache copy its -entire contents on every switch, so it spends its time migrating rather than -serving. Cold migration is worse: it discards the cache at each switch, which -on the OLTP trace costs 25.7 points against warm migration at the same epoch -(37.2% against 62.9%, both at 2ms). There is no 50ms cold run to compare -against; the sweep covers 2ms warm, 2ms cold, 50ms warm and 50ms warm with the -stability gates. - -Rules of thumb: - -- Make the epoch long enough that migrating the cache is a small fraction of - the work done in it, and short enough that the workload sees many epochs. -- Prefer `MigrationWarm`. `MigrationCold` is only reasonable if switches are - rare. -- The stability gates help on steady traffic and hurt on fast-changing traffic - -- they cost 20.6 points on the LIRS `loop` trace (17.0% against 37.6%), - which needs to re-adapt constantly, and 0.8 on OLTP, which does not. -- `ShadowSampleRate: 0.05` is a reasonable default. Higher rates cost more and - buy no better ranking. +The [current P3 tuning experiment](../bench/results/current/README.md#p3-tuning) +compares all four combinations of cold/warm migration and stability gates +on/off, at 10/20/50 request-counted epochs. Three batches of five replays give +fifteen observations per cell; every result is retained. Gates use +`MinHitRateImprovement: 0.02` and `SwitchCooldownEpochs: 3`. Each cell in +[tuning.json](../bench/results/current/tuning.json) retains the actual constructor +settings, including its request threshold; this makes the configuration behind +each observation inspectable. + +This is an example on one workload, not a production setting recommendation. +The experimental shadow floor is 64 rather than the default 256. The +[trace context table](../bench/results/current/README.md#workload-context) +reports the effective sample rate, which can exceed the requested 5%. + +For an experiment: + +- Use `EpochRequests` to hold epoch boundaries fixed across replay speeds; + report every tested setting. The trace matrix includes 10/20/50 epochs, + so the comparison does not select only the most favorable setting. +- Measure the tradeoff between migration work and adapting quickly enough. + Warm migration retains values, but does not transfer a policy's learned + history. Cold migration requires refilling; gradual migration spreads work + and its request cap can truncate the transfer. +- Treat stability gates as parameters to test. They can avoid switches on + steady traffic and delay useful switches when the workload changes. +- `ShadowSampleRate: 0.05` is one measured starting point. Validate ranking, + overhead and sensitivity to the random sample on your workload; the + synthetic sampling checks do not establish a universally optimal rate. - Set `EvictPartialCapacityFilling: true` when W-TinyLFU or S3-FIFO could be the **active** arm. The gate reads that one policy and compares its `Len()` against `Cap()` for exact equality, and neither of those two holds that diff --git a/docs/design.md b/docs/design.md index a49bbc1..bcaf506 100644 --- a/docs/design.md +++ b/docs/design.md @@ -1,6 +1,11 @@ # Design -How as-cache works, and what it deliberately does not do. +How this experimental library measures and studies adaptive policy selection. + +The [current trace matrix](../bench/results/current/README.md#trace-matrix) +reports how often adaptive medians trail the best fixed median at each epoch +setting and at all three settings. These counts describe the retained runs; +they are not a guaranteed ranking on future traffic. ## Problem @@ -11,24 +16,23 @@ using a multi-armed bandit to pick the winner dynamically. ## When it fits -Use it when: - -- You do not know which policy suits your traffic, and cannot easily find out. -- Your traffic changes shape and you would rather not re-tune. -- You want the measurement more than the switching. `ObserveOnly` gives you - that at no risk to the cache's behaviour — see [advisor mode](advisor-mode.md). +Use it to investigate policy selection, switching and sampling on a workload. +For a general-purpose production cache, start with otter or theine and read the +[comparison](evidence.md#how-does-it-compare-with-other-go-cache-libraries). +`ObserveOnly` keeps the configured policy active while gathering advice; +it still adds measurement overhead — see [advisor mode](advisor-mode.md). Do not use it when: - You have already measured your traffic and know which policy wins. Use that - policy directly; this library's best case is roughly to match it, and it - [lands within 1.4 points of it on four of six real traces and beats it on - the other two](evidence.md#real-traces). + policy directly. Automatic switching has no guaranteed advantage; see + [the current matrix and its limits](evidence.md#real-traces). - The hot path is latency-critical at single-digit nanoseconds. Even sampled, - the adaptive layer costs several times a bare LRU per operation — the - [figures](evidence.md#memory-and-per-operation-cost) are measured. -- You need a hard memory ceiling. The multiplier is well under the number of - arms, but it is real. + the adaptive layer adds work to a bare LRU operation — the + [diagnostics](evidence.md#memory-and-per-operation-cost) can measure that cost + on your target host. +- You need a hard memory ceiling. Shadow keys and metadata still cost memory; + the multiplier depends on the workload and stored values. - You cannot give it enough traffic per epoch to measure anything. Arms within noise of each other reorder run to run, so a cache seeing a handful of requests per epoch picks essentially at random. `Advice()` reports `Epochs` @@ -50,23 +54,21 @@ On each request: 1. The active policy serves the read or write. A read counts as its hit or miss; a write counts as neither, since nobody asked the cache a question. 2. The sampler decides whether the shadows see the key at all. When - `ShadowSampleRate` is below 1 they track a deterministic fraction of the - keyspace and shrink to match, so per-operation cost stops scaling with the - number of policies. + `ShadowSampleRate` is below 1 they track a hash-selected key subset and + shrink to match. Membership is stable within an instance, but its hash seed + changes for a new cache. Sampling reduces fan-out frequency; each sampled + request still visits every shadow. 3. Each shadow answers the same lookup, and a shadow that **misses fills itself** with `Add(key, zeroValue)` — exactly as the caller would fill a read-through cache that missed. That fill is what makes the measurement mean anything: a read-through caller only calls `Add` when the *active* policy missed, so without it a shadow could never acquire a key the incumbent was already serving, and the better the incumbent performed the less its rivals - were allowed to learn. The drift that causes is not a small bias: measured - on a cyclic workload behind a 94%-hit incumbent, arms that truly serve 0.00% - reported over 90%, because a starved shadow's contents go static and a - static cache covering most of a small keyspace looks excellent. Its sign - depends on which arm is incumbent, so it does not cancel — `Advice()` - recommended switching from the best arm to the worst. Shadows hold keys and - eviction bookkeeping, never data, which is why N policies do not cost N - times the memory — and why no caller can ever be handed a shadow's zero. + were allowed to learn. Without the shadow's own fills, its contents can stay + artificially static and its reported rate no longer models read-through + behavior. Shadows retain keys and eviction bookkeeping while omitting payload + values. Memory still depends on each policy's metadata, capacity and workload; + the cache must never return a shadow's zero as caller data. Then once per epoch: @@ -95,9 +97,10 @@ Then once per epoch: shadows run at if sampling is on. The measurement is the durable part, and you can have it without the -switching: [`ObserveOnly`](advisor-mode.md) runs every arm and reports which -would have served you best, while the cache behaves exactly like the policy you -built it with. +switching: [`ObserveOnly`](advisor-mode.md) reports every arm's measured rates +on the sampled stream while the cache keeps serving the configured policy. +These miniature rates and rankings need validation against full-cache replays +before using them to choose a serving policy. ## Architecture @@ -204,11 +207,10 @@ implementation reports. retried read double-counts its own hit and double-bumps recency), and `MigrationGradual` cannot go lock-free at all, because promotion mutates from inside `Get`. Deferred as its own change rather than smuggled into another. -- **Epochs are wall-clock driven** and cannot be stepped, so every measurement - of the bandit is timing-sensitive. This is why the evidence suite is excluded - from `-race`, and it makes the bandit awkward to test deterministically. - `EpochRequests` takes the clock out of a replay — see - [benchmarking](benchmarking.md) — but not out of production use. +- **Not every replay is deterministic.** `EpochRequests` fixes the request + boundaries, but sampled key selection, Random and asynchronous W-TinyLFU + still vary. Wall-clock epochs and TTL add timing dependencies. See + [benchmarking](benchmarking.md) for the repeatability requirements. - **No adaptive sizing.** The cache's capacity is whatever you set. Only the choice of policy adapts. - **Nothing here has run in production** that I know of. diff --git a/docs/evidence.md b/docs/evidence.md index da01a87..017562a 100644 --- a/docs/evidence.md +++ b/docs/evidence.md @@ -1,449 +1,195 @@ # Evidence -Every measured claim in this repository comes from here. `make evidence` -replays a suite of deterministic workloads against every policy and against the -adaptive cache. The numbers below are from an M1 Max, cache capacity 500, 200k -requests per workload. Reproduce with `make evidence`; the generators are in -[bench/workload.go](../bench/workload.go). +The [current results](../bench/results/current/README.md) are generated from +three consecutive full evidence runs on one clean commit. They include all +observations, input and output hashes, commands, tool versions and exit codes. +The [manifest](../bench/results/current/manifest.json) identifies the measured +source. New validated measurements replace this dataset. ## What the numbers say -Four findings, each with its own section below. - -1. **No single policy wins everywhere.** Across six published traces the best - fixed policy is a different one four times over, and the strongest - general-purpose baseline lands near the bottom on one of them — - [real traces](#real-traces). -2. **Adaptive selection roughly matches the best fixed policy without being - told which it is**: it beats it on two of the six traces and lands within - 1.4 points on the other four. On synthetic workloads it does not manage - that — [against fixed policies](#does-adaptive-selection-beat-picking-one-policy). -3. **Memory does not multiply by the number of arms.** Shadows hold keys and - eviction bookkeeping but never values: eight policies cost 3.92x a single - LRU, or 1.40x with sampling on — - [memory and per-operation cost](#memory-and-per-operation-cost). -4. **The hot path is not free.** 32 ns/op for a bare LRU against 90 sampled and - 856 unsampled, which is the price of the measurement. - -Configuration moves these numbers more than the choice of arms does; see -[tuning](configuration.md#tuning-measured) before drawing conclusions from your -own run. - -Hit rate by policy and workload: - -| Workload | LRU / TTL | LFU | 2Q | ARC | Random | W-TinyLFU | S3-FIFO | SIEVE | -| --- | --- | --- | --- | --- | --- | --- | --- | --- | -| zipf (skewed popularity) | 66.9% | 73.5% | 72.0% | 73.2% | 62.5% | 72.7% | 73.5% | **73.6%** | -| uniform (no structure) | 10.0% | 10.0% | 10.0% | 10.0% | 10.0% | **12.3%** | 10.0% | 10.0% | -| loop (cycle just over capacity) | 0.0% | 0.0% | 68.6% | 0.1% | 82.2% | **92.8%** | 79.7% | 0.0% | -| scan (hot set + sweeps) | 30.0% | **40.0%** | **40.0%** | **40.0%** | 32.0% | 39.8% | **40.0%** | **40.0%** | -| phase-shift (alternating regimes) | 34.5% | 69.7% | 61.5% | 39.9% | 68.2% | **82.4%** | 71.6% | 69.7% | - -TTL shares a column with LRU because these workloads carry no notion of -staleness and its TTL is longer than any run, so it measures its LRU behaviour -exactly -- identically, to the hundredth of a point, on all five. - -Every arm here reproduces to the hundredth of a point between runs except two. -W-TinyLFU does not: on `loop` it has measured 88.7% and 94.5% within a single -process. Neither does `Random`, which seeds itself from the global source — -that is what a control arm is for, but it means its column moves too. Read its column, and any delta computed against it, with that -in mind — the cause is in [reproducible replays](benchmarking.md). - -Two things stand out. LRU and LFU both score **exactly zero** on `loop`, where a -cyclic scan just over capacity evicts every key immediately before it is needed -again -- that is the textbook pathology, and it is worth knowing your workload -is not that shape. **SIEVE joins them at exactly zero** for a different reason: -it has no ghost queue, so a key evicted on the hand's first pass leaves no -trace at all, and a cyclic workload never gets a second chance. S3-FIFO, whose -ghost queue does give one, serves 79.7% on the same workload. That is the -clearest single difference between the two FIFO policies in this repository. - -Otherwise W-TinyLFU wins or ties nearly everywhere here, with the two FIFO -policies close behind and SIEVE ahead of everything on `zipf`. These synthetic -workloads understate both; the real traces below correct that, which is the -same lesson LFU teaches in the opposite direction. +- **Policy rankings depend on the workload and configuration.** Read the + margins and ties alongside the winning names. Several MSR rankings differ + by less than 0.04 percentage points; LFU and SIEVE tie on two volumes. +- **Adaptive selection has no demonstrated universal advantage or floor.** + The matrix retains outcomes below fixed baselines. Relative performance is + reported, not used to accept or reject a trace-matrix result. +- **Sampling and asynchronous maintenance introduce uncertainty.** A median + and observed range summarize this dataset; neither bounds future behavior. + A short W-TinyLFU batch can miss another performance mode on LIRS loop. +- **Shadows still require work and storage.** The library measures multiple + policies. Timings and memory depend on the host, payload and workload; raw + diagnostics are retained without presenting single-run costs as stable claims. + +This is an experimental tool for studying selection and measurement. Evaluate +fixed-cache alternatives on your traffic before enabling automatic switching. +The trace experiments are not a production-service validation. + +## Fixed policies on synthetic workloads + +`TestFixedPolicyEvidence` replays the generators in +[bench/workload.go](../bench/workload.go). Its output is retained in the three +current evidence logs. Deterministic arms can repeat exactly; Random and +W-TinyLFU cannot. The trace matrix reports their repeated results explicitly. ## Memory and per-operation cost -Running N policies in parallel does not multiply memory by N, because shadow -policies hold keys and eviction bookkeeping but never real values. Measured -with eight policies over 50k entries of 256-byte values: - -| Configuration | Memory | Multiplier | -| --- | --- | --- | -| single LRU | 18.5 MiB | 1.00x | -| adaptive, 8 policies | 72.3 MiB | 3.92x | -| adaptive, 8 policies, `ShadowSampleRate: 0.05` | 25.8 MiB | 1.40x | - -Per-operation cost on a warm cache, same configurations (`Get`, 0 allocs/op -throughout): - -| Configuration | ns/op | allocs/op | -| --- | --- | --- | -| single LRU | 32 | 0 | -| adaptive, 8 policies | 856 | 0 | -| adaptive, 8 policies, sampled | 90 | 0 | - -**What an arm costs, measured.** The same test at six policies -- the set -before the FIFO arms joined it -- reported 48.9 MiB (2.65x) and 24.5 MiB -(1.33x) sampled. The two FIFO arms added 23.4 MiB between them, against an -average of 6.1 MiB for the five shadows already there: **each is close to -double an ordinary arm**. Two things account for it, and both are consequences -of wrapping a library rather than of the algorithms. The adapter keeps its own -copy of the key set, because `golang-fifo` cannot enumerate its own contents, -and S3-FIFO's ghost queue remembers roughly a further cache's worth of keys. -Values are never duplicated by either. - -The property that actually matters is per-shadow, and it holds: each shadow -costs 7.7 MiB against the 18.5 MiB a full cache of the same entries costs -- -0.42x. That is what "shadows hold keys and bookkeeping but never values" buys, -and it is what the test asserts, rather than a total multiplier that would -simply move every time an arm was added. - -That is less than S3-FIFO's key count suggests. It tracks up to two keys per -entry of capacity, because the library sizes its ghost queue at the whole cache -capacity -- and a third, because this adapter keeps its own key index to supply -the methods upstream lacks. But a ghost entry is a *reference* to a key the caller already -allocated plus a pair of list pointers, never a copy of the key and never a -value. Counting ghost keys as though they cost what cached entries cost would -overstate this arm substantially. - -The shadow fan-out is broken down further in -[configuration](configuration.md#reducing-shadow-overhead). +`TestMemoryMultiplier` compares a full LRU with eight-policy adaptive caches, +with and without sampling, using 50,000 entries of 256-byte payloads. +`TestAllocationsPerOperation` measures a warm-cache Get. These are diagnostic +experiments, separate from the nine-arm trace matrix; run them on your target +machine to measure overhead. Their raw outputs remain in +[evidence-1.log](../bench/results/current/evidence-1.log), +[evidence-2.log](../bench/results/current/evidence-2.log) and +[evidence-3.log](../bench/results/current/evidence-3.log). + +Shadows omit payload values but retain keys and eviction metadata. FIFO adapters +also maintain a key index; S3-FIFO retains ghost keys. This is not an equal-memory +comparison between algorithms. Sampling reduces fan-out work but does not remove +its dependence on the number of arms. ## How does it compare with other Go cache libraries? -The tables elsewhere in this document compare this repository's policies with -each other, which is the wrong comparison for anyone choosing a package. Here -is the other one: the same workloads replayed through the caches a Go user -would actually reach for, at capacity 500, `make evidence`. - -| Workload | otter v2 | theine | ristretto | sturdyc | as-cache | -| --- | --- | --- | --- | --- | --- | -| zipf | **73.25%** | 72.84% | 69.47% | 62.01% | 67.88% | -| uniform | 10.01% | **10.53%** | 9.94% | 9.50% | 10.00% | -| loop | 86.73% | 88.56% | **88.85%** | 44.94% | 86.61% | -| scan | 39.85% | **39.88%** | 39.20% | 30.01% | 39.44% | -| phase-shift | **78.62%** | 77.67% | 72.27% | 53.18% | 77.70% | - -**Adaptive selection does not win here, but it is now competitive.** It is -within half a point of the best library on `uniform` and `scan`, within 2.3 on -`loop`, and takes **second place on `phase-shift`** — ahead of theine and -ristretto, 0.9 behind otter. It loses `zipf` by 5.4. It is also 4 to 23 times -slower per operation, as the cost table above describes. If you are choosing a -cache library and have no particular reason to expect your traffic to change -shape, otter or theine is still the better answer, and this repository is the -wrong place to pretend otherwise. - -Two of these numbers moved a long way when the shadow-insert defect described -under [real traces](#real-traces) was fixed: `loop` from 64.10% to 86.61% and -phase-shift from 71.51% to 77.70%. Both are workloads where the arms differ -sharply, which is exactly where feeding the shadows from the incumbent's miss -stream did the most damage. - -What the comparison does not show is any workload where a fixed library is -catastrophic, because these five are kind: `loop` is the one designed to defeat -LRU, and W-TinyLFU-derived caches handle it well. The case for measuring your -own traffic rests on real traces, where [the best policy changes by -trace](#real-traces). - -**Two methodology notes**, because both would otherwise flatter someone. - -otter admits on the caller's goroutine and evicts on a maintenance pass, so a -replay writing flat out leaves it far over capacity: 5000 keys written into a -cache built for 500 left 1916 retrievable. Uncorrected, that made otter look -like it served 44% on uniform traffic where every other cache served 10% - a -decisive-looking win that was purely the extra capacity. The harness calls -`CleanUp` so the comparison happens at the stated size, at some cost to otter's -timing column, and a test fails if any cache drifts far over its capacity -again. - -ristretto's `Set` is asynchronous and admission-gated: it can return having -queued nothing, so keys written into an almost-empty cache are not all there -afterwards. Its hit rate is what a caller experiences, which is the honest -thing to measure, but it is not purely an eviction-policy comparison. +`TestAgainstOtherLibraries` compares caller-visible behavior at nominal capacity +500. Its adaptive subject uses 2,000-request epochs, warm migration, all nine +arms and no sampling. Competing implementations have different admission and +maintenance behavior, so equal nominal capacity does not establish equal memory. + +The harness calls otter's `CleanUp` to enforce capacity, and that work contributes +to its timing. Theine and ristretto may retain counts different from the nominal +capacity; ristretto's asynchronous, admission-gated Set need not retain a new +value. Consult all three current logs, not a single table of stable timings or +retained-entry counts. Versions and adapters are pinned in +[bench/go.mod](../bench/go.mod) and [bench/competitors.go](../bench/competitors.go). ## Does adaptive selection beat picking one policy? -On these workloads: **no, and this is the honest result.** - -| Workload | Adaptive | Best fixed | Worst fixed | Adaptive vs best | -| --- | --- | --- | --- | --- | -| zipf | 66.2% | SIEVE 73.6% | 62.6% | -7.4 pts | -| uniform | 10.0% | W-TinyLFU 12.3% | 10.0% | -2.3 pts | -| loop | 87.1% | W-TinyLFU 93.2% | 0.0% | -6.1 pts | -| scan | 35.5% | LFU 40.0% | 30.0% | -4.4 pts | -| phase-shift | 71.8% | W-TinyLFU 82.6% | 34.5% | -10.9 pts | - -Adaptive selection reliably beats the *worst* fixed choice, sometimes hugely -(87.1% against LRU's 0.0% on `loop`). It never meaningfully beats the *best* -one. Even on `phase-shift` -- the workload built specifically to need adaptation --- a fixed W-TinyLFU wins by 10.9 points. - -**Arms are not free**, and that is worth sitting with. Every arm added thins -the evidence each of the others gets per epoch, and the exploration is charged -against the hit rate. The real-trace figures below are far tighter than this -table, because those replays use a tuned 50ms epoch rather than the 2ms one -held fixed across every workload here. - -The timeline says why, and it is not the answer this section used to give. -Replaying `phase-shift` and sampling `ActivePolicy()` throughout: - -```text -share of time active: LRU 6%, LFU 4%, TwoQueue 15%, ARC 14%, TTL 4%, - TinyLFU 27%, S3FIFO 15%, SIEVE 16% -hit rate 63.77% -``` - -**The bandit does not settle.** Eight of the nine arms take a turn, the best of -them holds only 27% of the run, and the cache spends the rest of it changing -its mind. That is not a defect in the bandit; it is what honest evidence looks -like on this workload. `phase-shift` alternates between two regimes every -20,000 requests, several arms sit within a couple of points of each other in -both, and Thompson sampling explores exactly as it should when the posteriors -overlap. The cost of that exploration is the gap between 63.77% here and a -fixed W-TinyLFU's 82.6%. - -Two things are worth saying plainly about this block. Earlier versions of this -document showed W-TinyLFU holding 82-90% of the same run and concluded that the -bandit "identifies W-TinyLFU and holds it"; that was measured while the shadow -mechanism was reporting rivals at rates they could not achieve, and it does not -reproduce. And the run still uses a wall-clock epoch, so the number of epochs -varies with machine load — read the shape (no arm dominates) as the finding and -the individual percentages as one draw. - -So the case for this library is not "it beats the best policy." It is: - -- **You do not know which policy is best for your traffic**, and the cost of - guessing wrong is large (0.0% vs 94.0% on `loop`). Adaptive selection bounds - that downside without requiring you to know. -- **It tells you what to use.** The most valuable output may be the measurement - rather than the switching -- see [advisor mode](advisor-mode.md). - -For a workload that genuinely crosses over, the picture could differ. These are -synthetic, and the section below shows real traces overturning the conclusion. +The [request-counted matrix](../bench/results/current/README.md#trace-matrix) +compares each adaptive setting with the best fixed median on the same trace. +It reports all three epoch settings, not just whichever looks best. Its generated +summary counts how many traces trail the best fixed median at each setting and +across all settings; those counts are observations from the current dataset. +No maximum +future deficit, statistical significance or guaranteed improvement follows +from these observed ranges. + +The suite also prints exploratory wall-clock experiments. Their scheduling and +policy-residency output are raw diagnostics, not the basis of the conclusions +here or a retained historical visualization. ## Real traces -`./scripts/fetch-traces.sh` downloads published traces (nothing is committed), -then `AS_CACHE_TRACES=... make evidence` replays them. Adaptive here runs a 50ms -epoch with warm migration and `ShadowSampleRate: 0.05`: - -| Trace | Requests | Best fixed | Worst fixed | Adaptive | Delta | -| --- | --- | --- | --- | --- | --- | -| Twitter Twemcache cluster052 | 1.0M | SIEVE 59.8% | LFU 41.4% | 58.6% | -1.15 pts | -| Meta kvcache 202206 | 2.0M | S3-FIFO 69.1% | Random 65.2% | 67.7% | -1.35 pts | -| ARC OLTP (FAST '03) | 0.9M | 2Q 68.3% | LFU 45.4% | 67.7% | -0.51 pts | -| ARC P3 (FAST '03) | 2.0M | W-TinyLFU 11.4% | LRU 1.9% | **11.4%** | **+0.05 pts** | -| LIRS 2_pools | 100k | W-TinyLFU 54.8% | Random 50.0% | 54.4% | -0.35 pts | -| LIRS loop | 505k | W-TinyLFU 45.1%* | seven arms at 0.0% | **45.2%** | **+0.12 pts** | - -\* `loop` is the one row measured at a 2ms epoch. It is short and changes -character quickly, so the tuned 50ms setting gives the bandit too few chances -to react and it drops to 38.1%. Read the W-TinyLFU figure on this row with care -besides: it is the one arm here whose result is not reproducible, and on this -trace it has measured anywhere from 43.1% to 46.2%. - -**Adaptive selection beats the best fixed policy on two of the six traces**, -by small margins, and lands within 1.4 points on the other four. - -These numbers replace an earlier set measured with a defect in the shadow -mechanism: a shadow policy could only ever acquire a key the *active* policy -had missed, so behind a strong incumbent the shadows went static and reported -policies that serve nothing as though they served everything. The bandit was -choosing on inverted evidence. See [design](design.md) for the mechanism. - -Be precise about what changed, because it is less dramatic than it sounds. This -document already reported adaptive selection beating the best fixed policy on -P3; that has not been overturned, though the margin shrank from +1.13 to +0.05. -What changed is `loop`, which went from **-7.45 to +0.12** — from the worst -result in the table to the second win. The overall picture is one trace better -than it was, and the *synthetic* conclusion below is unchanged: on those five -workloads adaptive selection still never beats the best fixed policy. - -Note also that the best fixed policy is **not the same policy across traces**: -SIEVE on Twitter, S3-FIFO on Meta, 2Q on OLTP, W-TinyLFU on P3 and the LIRS -traces. Four different winners across six traces. On OLTP, W-TinyLFU -- the -strongest general-purpose baseline -- comes near the bottom. That is the case -for not committing to a policy in advance, and it does not show up on synthetic -workloads, where W-TinyLFU wins nearly everything. - -### One `loop` row, two answers, one run - -The clearest demonstration in this repository of why an arm has to be -reproducible. Replaying LIRS `loop` at capacity 500 against a bare W-TinyLFU -policy, **twice in the same `go test` invocation**, gave 45.24% and 46.16%. -Same trace, same capacity, same process, no bandit involved. otter admits on the calling goroutine and evicts on a maintenance -pass, so what it retains depends on how the run was scheduled, and on a cyclic -workload sitting exactly at the capacity boundary that decides almost every -request. Across runs the spread on this trace is wider still: an earlier run of -the same suite reported 43.13% and 94.94%. - -Every other arm here replays identically. This is why `benchclient.DefaultArms` -excludes W-TinyLFU, why `ArmsWithWindowTinyLFU` makes including it an explicit -choice, and why S3-FIFO -- which is deterministic -- is in the default set. -(`Random` in that set is not deterministic either; see -[benchmarking](benchmarking.md).) - -### The two FIFO policies: near-identical on key-value traffic, far apart elsewhere - -S3-FIFO and SIEVE finish within 0.15 points of each other on four of the six -traces -- and SIEVE does it at roughly **half the per-operation cost**, because -it maintains one queue and a visited bit where S3-FIFO maintains three queues -and a counter: - -| Trace | S3-FIFO | ns/op | SIEVE | ns/op | -| --- | --- | --- | --- | --- | -| Twitter | 59.73% | 500 | **59.78%** | 284 | -| Meta kvcache | **69.05%** | 371 | 68.92% | 204 | -| ARC OLTP | **67.79%** | 414 | 67.72% | 238 | -| LIRS 2_pools | **54.37%** | 371 | 54.36% | 216 | -| ARC P3 | **10.75%** | 770 | 4.82% | 496 | -| LIRS loop | 0.00% | 550 | 0.00% | 340 | - -Then P3 separates them by six points, and the synthetic `loop` separates them -by eighty. Both gaps have the same cause: **S3-FIFO has a ghost queue and SIEVE -does not.** A key SIEVE evicts leaves no trace, so a workload whose reuse -arrives after eviction is invisible to it; S3-FIFO gets one more chance to -notice, within the window its ghost queue spans. - -So they are not redundant, and neither dominates. On production key-value -traffic SIEVE is the better buy -- the same hit rate for half the work. On -block-I/O traces S3-FIFO is worth its extra bookkeeping. That is the argument -for measuring rather than choosing, made between two policies from the same -paper family. - -Then there is `loop`, where it serves **0.00%** -- tied with LRU, LFU, 2Q, TTL, -ARC and SIEVE, and beaten by random eviction. That is the algorithm behaving -exactly as designed. `loop` cycles through 1011 keys with a 500-entry cache, so -every reuse distance is 1011 requests. A key has to be requested again while it -is still resident or still in the ghost queue to be promoted. The library sizes -that ghost queue at the *whole* cache capacity -- 500 here -- so the horizon is -roughly 1000 requests wide, and a reuse distance of 1011 falls just outside it. -Nothing is ever promoted to the main queue, so the small queue holds the whole -cache and every key cycles through it forever. (`size/10` is not a cap on that -queue: upstream uses it only to decide which of the two queues an eviction -comes from.) Only two arms survive the -trace at all: W-TinyLFU's sketch, which ages rather than expiring, and random -eviction, which has no order to defeat. - -The lesson is not that S3-FIFO is fragile. It is that **its ghost window is a -hard horizon**: reuse further away than that window is invisible to it. On the -synthetic `loop`, whose cycle is 550 keys against the same 500-entry cache, it -serves 79.7%. The difference between those two numbers is entirely the reuse -distance. +The [raw JSON](../bench/results/current/traces.json) contains twelve traces, +all nine fixed policies and adaptive runs at 10/20/50 request epochs. +Each nondeterministic subject has fifteen observations from three batches of +five; deterministic fixed arms run once per batch. Adaptive settings use +warm migration, requested sampling 0.05 and a minimum shadow capacity of 64. +The floor is an explicit experimental choice, below the library default 256. +It permits smaller shadows closer to the requested 5% rate on the small LIRS +caches and must not be described as the default production configuration. + +The [context table](../bench/results/current/README.md#workload-context) reports +requests, distinct keys, entry capacity, capacity/keyspace, effective sampling, +compulsory-miss ceilings and fixed-policy margins. Effective sampling is 12.8% +on LIRS loop and 6.4% on 2_pools; it is 5% on the other traces. With the default +floor 256, the two LIRS rates would instead be 51.2% and 25.6%. + +Most MSR prefixes have roughly one cache entry per hundred distinct keys. Their +compulsory misses leave limited headroom: the cold-cache hit ceiling is +`1 - distinct_keys / requests`. MSR prn/web have exact leading LFU/SIEVE ties, +and src1_2/usr have best-versus-runner-up margins below 0.04 points. Such rankings +are not evidence of a practically significant policy advantage. + +### Limits of this comparison + +These are bounded request prefixes with empty initial caches and entry-count +capacities, not whole-file replays or equal-memory measurements. TTL is one hour, +longer than a replay, so its trace result tests LRU-like retention rather than +expiry under production arrival times. Random has an uncontrolled seed; W-TinyLFU +maintains its cache asynchronously and may exceed nominal capacity. + +The [Meta size experiment](../bench/results/current/README.md#meta-object-count-versus-byte-capacity) +replays the same GET prefix through libCacheSim LRU with object sizes ignored +and accounted for. The [CacheLib reader](https://github.com/facebook/CacheLib/blob/main/cachelib/cachebench/workload/KVReplayGenerator.h) +parses payload size and original key size separately. Our experiment records +sizes as `size + key_size` and gives an explicit conversion from object capacity to byte budget. The export preserves each +request's size, but this simulator charges the size at insertion until eviction; +size changes on hits do not resize a resident object. Its deltas are **request miss +ratios**, not byte-weighted miss ratios; metadata overhead remains excluded. +That experiment does not turn the nine-policy table into a byte-budget comparison. + +Reference calibration pins libCacheSim to +`1d7415569978330ea95c9cff06a260630406f7e3`. It compares independent expansions of +the same documented trace interpretation, then independent LRU counting at five +capacities. A shared interpretation error can survive this check. Every trace +read by the suite must have coverage, request counts must match, and the miss +ratio tolerance is 0.0051 percentage points. Reference ratios must be finite, +in [0, 1], with exactly four decimals; coarser input cannot widen the tolerance. + + + +### One `loop` row, different answers + +W-TinyLFU's asynchronous behavior makes short batches sensitive to which mode +is sampled. The full current observations are retained; no range from an older +iteration is mixed into them. In particular, the largest gap in one batch is +not a general maximum deficit for adaptive selection. + + + +### The two FIFO policies + +S3-FIFO and SIEVE remain experimental adapters planned for v0.5, outside the +v0.4 module release. Their current trace results appear alongside every other +arm; their costs and semantics are documented in [policies](policies.md). + +LFU and SIEVE have identical hit/miss decisions on eight selected prefixes. +The [diagnostic table](../bench/results/current/README.md#lfusieve-diagnostic) +checks SIEVE against an independent visited-bit/hand model and also replays a +plain FIFO control. The FIFO totals differ on seven of those eight prefixes, +so the equality cannot be explained by a general reduction of both to FIFO. +Their different eviction mechanisms happen not to change hit/miss decisions +on those streams at those capacities; this does not imply equal eviction state. + +`TestSieveLFUDistinction` separates the mechanisms with worked examples. At +capacity two, `a,a,b,b,c,d,a,b` gives LFU three hits and SIEVE two. On +`a,b,a,c,a`, SIEVE gets two hits and FIFO one. A cold scan gives all three zero. +The trace-by-trace reference check rejects an adapter that stops following +the visited-bit model even if its aggregate hit count happens to match LFU. ### What the library adapter costs -These arms wrap [scalalang2/golang-fifo](https://github.com/scalalang2/golang-fifo) -rather than implementing the algorithms here, and the wrapper is not free. The -adapter has to supply `Keys`, `Values`, `Resize` and `Cap`, none of which exist -upstream, which means a second copy of the key set maintained through the -library's eviction callback and a full rebuild on every resize. The per-operation -columns in the table above are what that costs: 371 to 770 ns/op for S3-FIFO -against 80 to 130 for a bare LRU on the same traces. - -The trade bought is not owning an eviction algorithm, and that is worth -something. An earlier from-scratch S3-FIFO in this repository shipped with a -real bug in its ghost queue -- the paper's virtual-timestamp approximation -leaves a dead slot behind whenever an entry is removed early, so the queue -steadily held fewer keys than its capacity claimed and dropped them just before -they came back. Every property test passed; only a differential run against a -second implementation found it. That implementation is gone, so its numbers are -not quoted here: nothing in `make evidence` reproduces them and no test guards -them. +FIFO adapters maintain an extra key index, and rebuild on resize. Rebuilds lose +learned eviction state; rewriting existing values counts as access in the +upstream library. These are adapter limitations, not properties established +by the original algorithms' papers. ## Does sampling distort the comparison? -Sampled shadows are only sound if a miniature ranks policies the way full-size -shadows would. Measured directly across four sample rates, against full-size -shadows as ground truth: - -```text -zipf full-size ARC=81.6% 2Q=81.3% SIEVE=81.2% LFU=81.2% W-TinyLFU=81.2% S3-FIFO=81.1% TTL=79.2% LRU=79.2% Random=76.6% - rate 0.05 ARC=63.5% W-TinyLFU=63.3% 2Q=63.2% SIEVE=63.0% LFU=63.0% S3-FIFO=62.4% TTL=59.2% LRU=59.2% Random=54.5% - rate 0.10 ARC=67.5% 2Q=67.0% W-TinyLFU=67.0% S3-FIFO=66.9% SIEVE=66.8% LFU=66.8% LRU=63.8% TTL=63.3% Random=58.9% - rate 0.30 ARC=79.0% W-TinyLFU=78.8% 2Q=78.6% LFU=78.4% SIEVE=78.4% S3-FIFO=78.4% LRU=76.2% TTL=76.2% Random=73.2% - rate 0.50 ARC=84.7% 2Q=84.4% LFU=84.3% SIEVE=84.3% W-TinyLFU=84.3% S3-FIFO=84.3% LRU=82.7% TTL=82.7% Random=80.5% - -scan full-size 2Q=28.3% ARC=28.3% S3-FIFO=28.3% LFU=28.3% SIEVE=28.3% W-TinyLFU=28.1% LRU=21.4% TTL=21.4% Random=18.9% - rate 0.05 LFU=28.4% 2Q=28.4% ARC=28.4% S3-FIFO=28.4% SIEVE=28.4% W-TinyLFU=28.3% TTL=21.5% LRU=21.5% Random=19.0% - rate 0.10 S3-FIFO=26.0% LFU=26.0% ARC=26.0% SIEVE=26.0% 2Q=26.0% W-TinyLFU=25.3% LRU=19.6% TTL=19.6% Random=17.7% - rate 0.30 S3-FIFO=28.5% 2Q=28.5% SIEVE=28.5% LFU=28.5% ARC=28.5% W-TinyLFU=28.3% TTL=21.6% LRU=21.6% Random=19.0% - rate 0.50 LFU=28.6% SIEVE=28.6% 2Q=28.6% ARC=28.6% S3-FIFO=28.6% W-TinyLFU=28.4% LRU=21.6% TTL=21.6% Random=19.0% -``` - -**Sampling costs zero regret at every rate**, on both workloads, including at -the aggressive 5%. Note that "picks the same arm" is the wrong way to say this: -on `scan` five arms tie to the hundredth of a point, so which one is nominally -best is decided by map iteration order and moves run to run. What is stable is -that the arm sampling picks is never actually worse — the regret column is 0.00 -throughout. - -The ordering check runs on `loop` and `scan`: 0 inversions out of 8 clearly -separated pairs on each, at all four rates. `zipf` is deliberately not in that -check any more. It used to supply separated pairs, but only because the shadow -defect described above held Random at 32.8% there when it truly serves 76.6% — -a 44-point artifact. With shadows measuring honestly, the nine arms on `zipf` -land within 5.0 points of each other, so the workload separates nothing and can -prove nothing about ordering. Both FIFO policies hold their rank under -sampling like the rest, which was not a foregone conclusion: S3-FIFO's ghost -queue is sized in absolute terms, so a miniature shrinks the window it can see -reuse through, and their shared adapter rebuilds the cache on every resize. - -What sampling does *not* give you is an estimate of the absolute hit rate. Read -the zipf rows down the rate column: ARC measures 63% at rate 0.05 and 85% at -rate 0.50, against 82% full-size. The estimate depends on which slice of the -keyspace the seed happened to select, and a different slice has different -reuse, so a sampled rate can land either side of the true one. Do not read a -shadow's absolute number as a prediction of what that policy would achieve. - -That is fine for the purpose, because the bandit only ever needs to know which -arm is better, never by how much in absolute terms. It is not fine if you were -planning to quote a shadow's hit rate as a forecast -- for that, run the policy -for real, or set `ShadowSampleRate` to 0 and pay for full-size shadows. - -Higher rates cost more and buy no better ranking here, so 0.05 is a reasonable -default. Raise it if your keyspace is small enough that 5% of it is only a -handful of keys -- `MinShadowCapacity` guards the degenerate end by raising the -effective rate rather than letting a miniature shrink into noise. +Yes, it can change both absolute rates and rankings. Sharing a sampled keyspace +and keeping counts unscaled prevents inflated sample counts; it does not make +miniature shadows unbiased models of full caches. The keyspace sampling rate +also differs from the fraction of requests sampled under skewed traffic. + +The [ObserveOnly sweep](../bench/results/current/README.md#observeonly) holds LRU +active on all twelve traces, measures all nine policies and records every final +Advice report. Serving hits must exactly match standalone LRU. Advice measures +sampled shadow behavior, not the hit rate guaranteed after a policy switch. +The generated table also compares final recommendations retrospectively with +the best standalone full-cache medians, retaining ties and every run. Its modal +mismatches include worked median differences; these are not measured serving +losses from following advice. This offline sweep is separate from the still-pending +real-service trial. ## What does a switch cost right after it? -Every figure above is a whole-run average, which hides where a switch's cost -falls: in the requests immediately after it. `TestSwitchWarmupCost` scripts one -switch, from LRU to LFU at request 100,000 of the zipf workload above (200,000 -requests, cache 500), and reports hit rate in windows measured from the switch. -The switch is forced rather than chosen, so every strategy switches at the same -request. The run is deterministic: two runs produce identical tables. - -| Configuration | 0-1000 | 1000-5000 | 5000-20000 | 20000-100000 | -| --- | --- | --- | --- | --- | -| LFU all along (no warm-up) | 77.00% | 74.28% | 74.59% | 73.90% | -| LRU, never switched | 70.50% | 67.90% | 67.58% | 66.82% | -| cold | 59.50% | 69.45% | 72.93% | 73.52% | -| warm | 70.50% | 70.03% | 72.91% | 73.55% | -| gradual | 70.40% | 70.12% | 72.88% | 73.52% | -| gradual, capped at 10 Gets | 59.90% | 69.47% | 72.93% | 73.52% | -| gradual, capped at 100 Gets | 63.90% | 69.58% | 72.99% | 73.53% | -| gradual, capped at 1000 Gets | 70.40% | 70.12% | 72.88% | 73.52% | - -- **Cold pays for the switch up front.** Its first 1,000 requests serve 59.50%, - 11.0 points below not switching at all and 17.5 below an LFU that never had to - warm up. By the next window it is already ahead of not switching. -- **Warm and gradual show no dip.** Both serve the first 1,000 requests within - 0.1 points of LRU's own rate, because the entries LRU held are there to be hit. -- **None of them becomes the LFU that was there all along.** From 20,000 to - 100,000 requests after the switch every strategy sits at 73.52-73.55%, against - 73.90%. Moving the contents does not move the access history an LFU running - from the start would have built, and the gap is what that history was worth - here. -- **The window cap costs only when it bites.** At 10 Gets the gradual window - closes almost immediately and the first 1,000 requests look like cold - (59.90%); at 100 they lose 6.5 points against uncapped gradual. At 1,000 the - row is identical to uncapped: under read-through traffic every miss is an - `Add`, every `Add` drains a pending key, and the window emptied on its own - somewhere between 100 and 1,000 Gets. - -Reproduce with `cd bench && go test -run TestSwitchWarmupCost -v .`, or -`make evidence`. +`TestSwitchWarmupCost` uses a scripted switch and counts hits in successive +request windows. Its output is in the three current logs. Cold migration +requires refill; warm migration transfers values but not all eviction history; +gradual migration keeps a source alive until the window closes. None guarantees +zero extra misses on arbitrary traffic. + +The [P3 tuning table](../bench/results/current/README.md#p3-tuning) compares +cold/warm migration with gates on/off at 10/20/50 request epochs, with fifteen +observations per cell. It is one workload's configuration example, not a +universal production recommendation. See [configuration](configuration.md#tuning-measured). diff --git a/docs/policies.md b/docs/policies.md index 7377492..134e46c 100644 --- a/docs/policies.md +++ b/docs/policies.md @@ -31,7 +31,7 @@ cache, err := ascache.NewAdaptiveCache( | Random | `policies.NewRandomPolicy` | no bookkeeping; the control arm worth beating | | TTL | `policies.NewTTL` | expiry as well as recency; expiry runs on the wall clock, so its hit rate depends on how fast traffic arrives, and a replay is reproducible only while the TTL is far longer than the run | | ARC | `policies/arc.NewPolicy` | separate module — see below | -| W-TinyLFU | `policies/tinylfu.NewPolicy` | separate module; the strongest baseline | +| W-TinyLFU | `policies/tinylfu.NewPolicy` | separate module; asynchronous, workload-dependent baseline | | S3-FIFO | `policies/fifo.NewS3FIFOPolicy` | separate module; three FIFO queues, and deterministic | | SIEVE | `policies/fifo.NewSievePolicy` | same module; one FIFO queue and a sweeping hand | @@ -67,19 +67,14 @@ Note that otter reports an approximate size, so this policy's `Len()` is approximate. Set `EvictPartialCapacityFilling: true` when using it, since the capacity gate compares `Len()` against `Cap()` for exact equality. -**It also runs slightly over the capacity it was given, and that flatters it.** -otter admits on the calling goroutine and evicts on a maintenance pass, so the -cache sits above its limit whenever writes arrive faster than maintenance -drains them. Measured at a nominal 500 entries under read-through replay: 514 -on `zipf` (1.03x), 533 on `loop` (1.06x), 611 on `uniform` (1.22x) — the -overshoot tracks the write rate, and `uniform` misses on almost every request. -On that workload it is the whole story: the arm held 611 of a 5000-key -keyspace and served 12.18%, and 611/5000 is 12.2%, so its edge over the other -policies there is capacity rather than eviction. Under a pure write flood the -gap is far wider — 1916 entries retained against a limit of 500 — which is why -the competitor harness calls `CleanUp`. Read its wins on write-heavy workloads -with that in mind; on read-heavy ones the overshoot is a few percent and the -comparison is sound. +Asynchronous admission and eviction can let a tight write workload outrun +maintenance. Equal nominal capacity therefore does not establish equal resident +entries or memory. The competitor harness calls `CleanUp` to drain pending work; +that changes its timing too. `TestCompetitorCapacityHonesty` records retained +entries after a separate write flood in the [current evidence logs](../bench/results/current/README.md). +Those counts do not measure occupancy during the zipf, loop or uniform replays, +or establish why one policy has a higher hit rate on them. The current trace +matrix retains all W-TinyLFU observations and their range. It is one of two arms that are not deterministic, which matters for [reproducible replays](benchmarking.md). `Random` is the other, and for a @@ -88,6 +83,11 @@ arm is for. ## S3-FIFO and SIEVE +These adapters are experimental source in this repository. The +`policies/fifo` module has not been tagged; inclusion in the evidence suite +does not imply a published package. They are deferred from the v0.4 release +plan while native implementations are planned for v0.5. + Both constructors reject a size of zero or less, as `NewLRU`, `NewLFU` and `NewTwoQueue` do: a cache built at zero would accept nothing and report no hits for as long as it existed, which as a bandit arm is a silent no-op rather than @@ -118,9 +118,7 @@ W-TinyLFU for a different reason. It is hard to reach from ordinary traffic to capacity, read everything several times, then write once) it is real. Set `EvictPartialCapacityFilling: true` if you would rather not think about it. -```bash -go get github.com/sshaplygin/as-cache/policies/fifo -``` +Use a repository checkout for these experiments: ```go s3, err := fifo.NewS3FIFOPolicy[string, int](10000) @@ -155,10 +153,15 @@ miss ratios than the LRU-based state of the art across several thousand traces (Yang, Zhang, Qiu, Yue & Rashmi, *FIFO Queues are All You Need for Cache Eviction*, SOSP '23). -It is in `benchclient.DefaultArms` for that reason. +It participates in the research benchmarks. The unpublished FIFO module is +excluded from `benchclient.DefaultArms` and the v0.4 release. ### SIEVE +The current evidence includes an independent visited-bit model and a FIFO +control. Identical LFU/SIEVE hit counts on some traces do not mean the algorithms +are interchangeable; see the [diagnostic and worked examples](evidence.md#the-two-fifo-policies). + SIEVE is simpler still: **one** FIFO queue and a hand that sweeps it from the oldest end. Each entry carries a single visited bit, set when it is read. The hand walks backwards looking for an entry whose bit is clear, clearing the bit diff --git a/docs/releasing.md b/docs/releasing.md new file mode 100644 index 0000000..e7f3311 --- /dev/null +++ b/docs/releasing.md @@ -0,0 +1,97 @@ +# Development and releasing + +The next release candidate is **v0.4.0**, recorded in `release-version`. +A successful candidate check does not mean that version has been published. + +## Developing the repository + +Use Go 1.25.2 or later and Python 3.11 or later. Python formatting and linting +use Ruff 0.13.2 in a local virtual environment under `.tools/`. The checked-in +`go.work` joins all twelve modules for local builds, examples, and `make all`. The workspace file also ships in the +root module zip; running Go commands *inside that extracted zip* needs +`GOWORK=off`, because sibling modules are not included there. Normal consumers +use their own workspace and are unaffected. Published modules contain no `replace` +directives. The benchmark, examples and experimental FIFO module retain local +replacements; they are not in the release set. + +`go mod tidy` resolves each module separately and needs published sibling +versions. `make tidy` prints a skip reason for a module whose sibling versions are not +yet resolvable; it tidies the other modules. Use the candidate consumer check +below to validate unpublished versions. Do not commit checksum +entries produced from temporary candidate zips as checksums of a public release. + +## Candidate checks + +The release check resolves HEAD once and exports its committed blobs into a +private directory. Module inventory, versions, licenses, metadata and ZIP bytes +all come from that snapshot. Index and working-tree edits, including files marked +assume-unchanged or skip-worktree, cannot enter a candidate. Nested modules stay +outside their parent's ZIP; committed symlinks and submodules are rejected. +The release set is discovered from the snapshot's `go.mod` files, excluding the +benchmark, examples and experimental FIFO module. + +`make all` checks working-tree formatting, lint and tests, then separately checks +the committed HEAD release candidate. It works with uncommitted development +changes, but those changes are validated as a release candidate only after commit. +The checker prints the exact commit it checks. + +```sh +make all +``` + +`make release-check` first tests the checker against miniature broken +repositories. It then packages eight candidate modules in a temporary local Go +proxy and independently installs each into a fresh consumer with `GOWORK=off` +and a fresh module cache. It builds both the consumer and every package in the +module, and checks the resolved version. External dependencies require network +access; candidate zips and caches are removed afterwards. + +The check rejects local replacements, incorrect sibling versions, dependencies +outside the release set, missing licences and compilation failures. It does not +create tags or test the existence of remote versions. CI runs the same check. + +## Publishing + +Review the final changelog, evidence and CI results before merging. Release +from the reviewed commit on `main`, using the same commit for every tag. Publish +these tags in dependency order: + +| Module | Tag | +| --- | --- | +| root | `v0.4.0` | +| lfu | `lfu/v0.4.0` | +| policies | `policies/v0.4.0` | +| policies/arc | `policies/arc/v0.4.0` | +| policies/tinylfu | `policies/tinylfu/v0.4.0` | +| metrics | `metrics/v0.4.0` | +| bandit | `bandit/v0.4.0` | +| benchclient | `benchclient/v0.4.0` | + +Do not tag `policies/fifo`, `bench`, the examples or the removed `bandit/redis` +module. FIFO remains experimental source for the nine-arm research suite; +`benchclient.DefaultArms` contains LRU, LFU, 2Q and Random, as in v0.3.1. + +After all tags are available, run: + +```sh +make release-check-published +``` + +This mode downloads real versions through the configured `GOPROXY` with fresh +consumer caches and without the candidate proxy. It must pass before announcing +the GitHub release. If a published version is broken, prepare a new patch +version rather than moving public tags. Update downstream consumers only after +this check succeeds. + +## Upgrading from v0.3.1 + +Upgrade the used modules together to v0.4.0. `bandit.Thompson` and `bandit.Greedy` +remain available, but the distributed bandit, its coordination types and its +Redis module have been removed. Applications using that API must stay on the +v0.3.1 module family until they have a replacement; this repository does not +provide a released replacement package. + +Bandit callbacks now run outside the cache mutex and their results are checked +against the current epoch before being applied. See the [changelog](../CHANGELOG.md) +for the behavioral changes and migration fixes, and [evidence](evidence.md) for +the measured limitations of adaptive selection. diff --git a/examples/basic/go.mod b/examples/basic/go.mod index c902519..c59c72d 100644 --- a/examples/basic/go.mod +++ b/examples/basic/go.mod @@ -4,11 +4,11 @@ go 1.25.2 require ( github.com/hashicorp/golang-lru/v2 v2.0.6 - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/lfu v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/lfu v0.4.0 ) -require github.com/sshaplygin/as-cache/bandit v0.3.1 +require github.com/sshaplygin/as-cache/bandit v0.4.0 replace github.com/sshaplygin/as-cache => ../.. diff --git a/examples/migration/go.mod b/examples/migration/go.mod index fcc2f08..8fe6943 100644 --- a/examples/migration/go.mod +++ b/examples/migration/go.mod @@ -4,11 +4,11 @@ go 1.25.2 require ( github.com/hashicorp/golang-lru/v2 v2.0.6 - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/lfu v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/lfu v0.4.0 ) -require github.com/sshaplygin/as-cache/bandit v0.3.1 +require github.com/sshaplygin/as-cache/bandit v0.4.0 replace github.com/sshaplygin/as-cache => ../.. diff --git a/go.work b/go.work new file mode 100644 index 0000000..9f63987 --- /dev/null +++ b/go.work @@ -0,0 +1,16 @@ +go 1.25.2 + +use ( + . + bandit + bench + benchclient + examples/basic + examples/migration + lfu + metrics + policies + policies/arc + policies/fifo + policies/tinylfu +) diff --git a/metrics/go.mod b/metrics/go.mod index 9c43fd5..7348624 100644 --- a/metrics/go.mod +++ b/metrics/go.mod @@ -3,8 +3,8 @@ module github.com/sshaplygin/as-cache/metrics go 1.25.2 require ( - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/policies v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/policies v0.4.0 github.com/stretchr/testify v1.11.1 ) @@ -12,12 +12,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/sshaplygin/as-cache/lfu v0.3.1 // indirect + github.com/sshaplygin/as-cache/lfu v0.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => .. - -replace github.com/sshaplygin/as-cache/policies => ../policies - -replace github.com/sshaplygin/as-cache/lfu => ../lfu diff --git a/models.go b/models.go index d299b21..a24ca8d 100644 --- a/models.go +++ b/models.go @@ -25,8 +25,7 @@ const ( TTL // TinyLFU evicts using the W-TinyLFU family, which gates admission on a // frequency sketch so a new key must earn its place against the entry it - // would displace. It is the strongest general-purpose baseline in wide - // use, and the one an adaptive cache has to beat to justify itself. + // would displace. Its relative performance depends on the workload. TinyLFU // S3FIFO evicts using three static FIFO queues: a small queue that holds // newly admitted entries just long enough to see whether they are ever diff --git a/policies/arc/go.mod b/policies/arc/go.mod index b26a6a4..1a89710 100644 --- a/policies/arc/go.mod +++ b/policies/arc/go.mod @@ -2,13 +2,12 @@ module github.com/sshaplygin/as-cache/policies/arc go 1.25.2 -// golang-lru is pinned to v2.0.6 deliberately: see the note in -// ../go.mod. The v2.0.7 release of the base module does not build. +// golang-lru is pinned to v2.0.6; see the compatibility note in ../go.mod. require ( github.com/hashicorp/golang-lru/arc/v2 v2.0.6 - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/lfu v0.3.1 // indirect - github.com/sshaplygin/as-cache/policies v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/lfu v0.4.0 // indirect + github.com/sshaplygin/as-cache/policies v0.4.0 ) require github.com/stretchr/testify v1.11.1 @@ -19,9 +18,3 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => ../.. - -replace github.com/sshaplygin/as-cache/policies => .. - -replace github.com/sshaplygin/as-cache/lfu => ../../lfu diff --git a/policies/fifo/go.mod b/policies/fifo/go.mod index ee54624..4f5c62e 100644 --- a/policies/fifo/go.mod +++ b/policies/fifo/go.mod @@ -4,8 +4,8 @@ go 1.25.2 require ( github.com/scalalang2/golang-fifo v1.2.0 - github.com/sshaplygin/as-cache v0.3.1 - github.com/sshaplygin/as-cache/policies v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 + github.com/sshaplygin/as-cache/policies v0.4.0 github.com/stretchr/testify v1.11.1 ) @@ -13,7 +13,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/hashicorp/golang-lru/v2 v2.0.6 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/sshaplygin/as-cache/lfu v0.3.1 // indirect + github.com/sshaplygin/as-cache/lfu v0.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/policies/go.mod b/policies/go.mod index c109f03..2d30ebc 100644 --- a/policies/go.mod +++ b/policies/go.mod @@ -10,18 +10,14 @@ go 1.25.2 // MVS - maypok86/benchmarks requires it, for instance - is fine. require ( github.com/hashicorp/golang-lru/v2 v2.0.6 - github.com/sshaplygin/as-cache v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 github.com/stretchr/testify v1.11.1 ) -require github.com/sshaplygin/as-cache/lfu v0.3.1 +require github.com/sshaplygin/as-cache/lfu v0.4.0 require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => .. - -replace github.com/sshaplygin/as-cache/lfu => ../lfu diff --git a/policies/tinylfu/go.mod b/policies/tinylfu/go.mod index 66236b4..e8d3d69 100644 --- a/policies/tinylfu/go.mod +++ b/policies/tinylfu/go.mod @@ -4,7 +4,7 @@ go 1.25.2 require ( github.com/maypok86/otter/v2 v2.3.0 - github.com/sshaplygin/as-cache v0.3.1 + github.com/sshaplygin/as-cache v0.4.0 github.com/stretchr/testify v1.11.1 ) @@ -13,5 +13,3 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) - -replace github.com/sshaplygin/as-cache => ../.. diff --git a/release-version b/release-version new file mode 100644 index 0000000..fb7a04c --- /dev/null +++ b/release-version @@ -0,0 +1 @@ +v0.4.0 diff --git a/scripts/committed_source.py b/scripts/committed_source.py new file mode 100644 index 0000000..a2588ae --- /dev/null +++ b/scripts/committed_source.py @@ -0,0 +1,83 @@ +"""Export exactly one Git commit, independent of index and working-tree flags.""" + +import io +import os +from pathlib import Path +import subprocess + + +def git_environment(): + """Keep local Git operations independent of caller repository overrides.""" + env = { + key: value for key, value in os.environ.items() if not key.startswith("GIT_") + } + env.update(GIT_CONFIG_GLOBAL=os.devnull, GIT_CONFIG_NOSYSTEM="1") + return env + + +class CommittedSource: + def __init__(self, repository, revision="HEAD"): + self.repository = Path(repository).resolve() + self.commit = ( + self.git("rev-parse", "--verify", f"{revision}^{{commit}}").decode().strip() + ) + self.entries = [] + for record in self.git("ls-tree", "-rz", "--full-tree", self.commit).split( + b"\0" + ): + if not record: + continue + metadata, name = record.split(b"\t", 1) + mode, kind, oid = metadata.decode().split() + path = Path(name.decode()) + if kind != "blob" or mode not in ("100644", "100755"): + raise ValueError( + f"{path}: unsupported committed file mode {mode} (symlinks/submodules)" + ) + if path.is_absolute() or ".." in path.parts or ".git" in path.parts: + raise ValueError(f"unsafe committed path: {path}") + self.entries.append((path, mode, oid)) + + def git(self, *arguments, data=None): + return subprocess.check_output( + ["git", *arguments], cwd=self.repository, input=data, env=git_environment() + ) + + def export(self, destination): + """Materialize blobs without checkout filters, attributes or disk reads.""" + destination = Path(destination).resolve() + destination.mkdir(parents=True, exist_ok=False) + objects = "".join(f"{oid}\n" for _, _, oid in self.entries).encode() + stream = io.BytesIO(self.git("cat-file", "--batch", data=objects)) + for path, mode, expected in self.entries: + oid, kind, size = stream.readline().decode().split() + if oid != expected or kind != "blob": + raise ValueError(f"unexpected Git object for {path}") + content = stream.read(int(size)) + if len(content) != int(size) or stream.read(1) != b"\n": + raise ValueError(f"truncated Git object for {path}") + target = destination / path + target.parent.mkdir(parents=True, exist_ok=True) + target.write_bytes(content) + target.chmod(0o755 if mode == "100755" else 0o644) + return destination + + def checkout(self, destination): + """Give exported blobs private Git metadata for measurement provenance.""" + destination = self.export(destination) + subprocess.run( + ["git", "init", "--quiet", "--template=", str(destination)], + check=True, + env=git_environment(), + ) + objects = ( + self.git("rev-parse", "--path-format=absolute", "--git-path", "objects") + .decode() + .strip() + ) + (destination / ".git/objects/info/alternates").write_text(objects + "\n") + for args in (("update-ref", "HEAD", self.commit), ("read-tree", self.commit)): + subprocess.run( + ["git", *args], cwd=destination, check=True, env=git_environment() + ) + return destination diff --git a/scripts/evidence_batches.py b/scripts/evidence_batches.py new file mode 100644 index 0000000..23ca0a7 --- /dev/null +++ b/scripts/evidence_batches.py @@ -0,0 +1,111 @@ +"""Validate and pool repeated measurements without discarding observations.""" + +from copy import deepcopy +import json +import math + +ARMS = {"LRU", "LFU", "2Q", "ARC", "TTL", "Random", "W-TinyLFU", "S3-FIFO", "SIEVE"} +EPOCHS = [10, 20, 50] + + +def check_rates(values, count): + if len(values) != count or any( + not isinstance(value, (int, float)) + or not math.isfinite(value) + or not 0 <= value <= 100 + for value in values + ): + raise ValueError("unexpected hit-rate observations or sample count") + + +def metadata(value, excluded): + return {key: item for key, item in value.items() if key not in excluded} + + +def read_batches(directory, commit): + batches = [ + json.loads((directory / f"traces-{i}.json").read_text()) for i in range(1, 4) + ] + first = batches[0] + inventory = [trace["trace"] for trace in first["traces"]] + if not inventory or len(inventory) != len(set(inventory)): + raise ValueError("empty or duplicate trace inventory") + for batch in batches: + if batch["commit"] != commit or batch["tree_modified"]: + raise ValueError("measurement came from another commit or a dirty tree") + if batch["runs"] != 5: + raise ValueError("expected five observations per nondeterministic subject") + if metadata(batch, {"measured_at", "traces"}) != metadata( + first, {"measured_at", "traces"} + ): + raise ValueError("measurement settings changed between runs") + if [trace["trace"] for trace in batch["traces"]] != inventory: + raise ValueError("trace inventory changed between runs") + for trace, original in zip(batch["traces"], first["traces"], strict=True): + excluded = {"fixed_hit_rate_percent", "adaptive", "observe_only"} + if metadata(trace, excluded) != metadata(original, excluded): + raise ValueError( + "trace metadata or deterministic diagnostics changed between runs" + ) + fixed = trace["fixed_hit_rate_percent"] + if set(fixed) != ARMS: + raise ValueError("fixed-policy inventory changed") + for name, spread in fixed.items(): + check_rates(spread["runs"], 5 if name in {"Random", "W-TinyLFU"} else 1) + if [row["epochs_per_trace"] for row in trace["adaptive"]] != EPOCHS: + raise ValueError("unexpected adaptive epoch inventory") + for row, previous in zip( + trace["adaptive"], original["adaptive"], strict=True + ): + if metadata(row, {"hit_rate_percent"}) != metadata( + previous, {"hit_rate_percent"} + ): + raise ValueError("epoch settings changed between runs") + check_rates(row["hit_rate_percent"]["runs"], 5) + check_rates([run["hit_rate_percent"] for run in trace["observe_only"]], 5) + return batches + + +def pooled_results(directory, commit): + batches = read_batches(directory, commit) + combined = deepcopy(batches[0]) + combined["batches"] = 3 + combined["runs_per_batch"] = combined.pop("runs") + for index, trace in enumerate(combined["traces"]): + for batch in batches[1:]: + other = batch["traces"][index] + for name in trace["fixed_hit_rate_percent"]: + trace["fixed_hit_rate_percent"][name]["runs"].extend( + other["fixed_hit_rate_percent"][name]["runs"] + ) + for adaptive, repeated in zip( + trace["adaptive"], other["adaptive"], strict=True + ): + adaptive["hit_rate_percent"]["runs"].extend( + repeated["hit_rate_percent"]["runs"] + ) + trace["observe_only"].extend(other["observe_only"]) + + tuning = None + expected = [ + (epochs, strategy, gates) + for epochs in EPOCHS + for strategy in ("cold", "warm") + for gates in (False, True) + ] + for number in range(1, 4): + rows = json.loads((directory / f"traces-{number}-tuning.json").read_text()) + if [(row["epochs"], row["strategy"], row["gates"]) for row in rows] != expected: + raise ValueError("unexpected tuning inventory") + for row in rows: + check_rates(row["hit_rate_percent"]["runs"], 5) + if tuning is None: + tuning = rows + continue + for row, repeated in zip(tuning, rows, strict=True): + if metadata(row, {"hit_rate_percent"}) != metadata( + repeated, {"hit_rate_percent"} + ): + raise ValueError("tuning settings changed between runs") + row["hit_rate_percent"]["runs"].extend(repeated["hit_rate_percent"]["runs"]) + return combined, {"commit": commit, "records": tuning} diff --git a/scripts/fetch-traces.sh b/scripts/fetch-traces.sh index 83ce534..aa08d00 100755 --- a/scripts/fetch-traces.sh +++ b/scripts/fetch-traces.sh @@ -8,20 +8,39 @@ # Usage: # ./scripts/fetch-traces.sh [target-dir] # default: ./traces (gitignored) # AS_CACHE_TRACES=$(pwd)/traces make evidence -set -euo pipefail +set -Eeuo pipefail +PENDING_PART="" +on_error() { + local result="$1" failure_line="$2" callers="$3" + if [ -n "$PENDING_PART" ]; then + rm -f "$PENDING_PART" + fi + echo "FAIL: ${BASH_SOURCE[0]}:$failure_line exited with status $result (caller lines: $callers)" >&2 + exit "$result" +} +trap 'on_error "$?" "$LINENO" "${BASH_LINENO[*]}"' ERR +ROOT=$(cd "$(dirname "$0")/.." && pwd) +verify() { + python3 "$ROOT/scripts/trace_inputs.py" "$TRACES" "$1" --path "$2" +} TRACES="${1:-$(pwd)/traces}" mkdir -p "$TRACES" fetch() { - local name="$1" url="$2" - if [ -s "$TRACES/$name" ]; then - echo " have $name" - return - fi - echo " get $name" - # --fail so an HTML error page is never mistaken for trace data. - curl -fSL --retry 3 -o "$TRACES/$name" "$url" + local name="$1" url="$2" + if [ -e "$TRACES/$name" ]; then + verify "$name" "$TRACES/$name" + echo " have $name" + return + fi + echo " get $name" + # --fail so an HTML error page is never mistaken for trace data. + PENDING_PART="$TRACES/$name.part" + curl -fSL --retry 3 -o "$PENDING_PART" "$url" + verify "$name" "$TRACES/$name.part" + mv "$TRACES/$name.part" "$TRACES/$name" + PENDING_PART="" } echo "Fetching traces into $TRACES" @@ -32,7 +51,7 @@ echo "Fetching traces into $TRACES" # Cite: Yang, Yue & Rashmi, "A Large Scale Analysis of Hundreds of In-memory # Cache Clusters at Twitter", OSDI '20. fetch twitter_cluster052.csv \ - https://raw.githubusercontent.com/twitter/cache-trace/master/samples/2020Mar/cluster052 + https://raw.githubusercontent.com/twitter/cache-trace/master/samples/2020Mar/cluster052 # --- LIRS research traces --------------------------------------------------- # Tiny and deliberately adversarial. `loop` is a cyclic scan that defeats LRU @@ -41,7 +60,7 @@ fetch twitter_cluster052.csv \ # Cite: Jiang & Zhang, "LIRS", SIGMETRICS '02. LIRS=https://raw.githubusercontent.com/ben-manes/caffeine/master/simulator/src/main/resources/com/github/benmanes/caffeine/cache/simulator/parser/lirs for f in loop 2_pools multi2; do - fetch "lirs_$f.trace.gz" "$LIRS/$f.trace.gz" + fetch "lirs_$f.trace.gz" "$LIRS/$f.trace.gz" done # --- ARC paper traces ------------------------------------------------------- @@ -52,7 +71,7 @@ done # Cite: Megiddo & Modha, "ARC", FAST '03. ARC=https://raw.githubusercontent.com/maypok86/otter/main/benchmarks/simulator/trace/arc for f in p3 oltp; do - fetch "arc_$f.gz" "$ARC/$f.gz" + fetch "arc_$f.gz" "$ARC/$f.gz" done # --- Meta kvcache, from the CacheBench workload bucket ---------------------- @@ -62,43 +81,111 @@ done # # The published file is 4.9 GB, so only its first slice is fetched. The bucket # serves range requests over plain HTTPS, so no AWS credentials or CLI are -# needed. Override the size with AS_CACHE_META_BYTES. +# needed. The pinned size and checksum live in scripts/trace-inputs.json. # # The slice ends mid-line; LoadMetaKVTrace skips the truncated last row. # Note the op_count column: a row stands for that many requests, and the loader # expands it. See docs/benchmarking.md. # Cite: Meta CacheLib, https://cachelib.org/docs/Cache_Library_User_Guides/Cachebench_FB_HW_eval/ META_BYTES="${AS_CACHE_META_BYTES:-134217728}" +[ "$META_BYTES" = 134217728 ] || { echo "FAIL: Meta slice must match scripts/trace-inputs.json (134217728 bytes)" >&2; exit 1; } META=https://cachelib-workload-sharing.s3.amazonaws.com/pub/kvcache/202206/kvcache_traces_1.csv -if [ -s "$TRACES/meta_kvcache_202206_1.csv" ]; then - echo " have meta_kvcache_202206_1.csv" +if [ -e "$TRACES/meta_kvcache_202206_1.csv" ]; then + verify meta_kvcache_202206_1.csv "$TRACES/meta_kvcache_202206_1.csv" + echo " have meta_kvcache_202206_1.csv" else - echo " get meta_kvcache_202206_1.csv (first $META_BYTES bytes of 4.9 GB)" - curl -fSL --retry 3 -H "Range: bytes=0-$((META_BYTES - 1))" \ - -o "$TRACES/meta_kvcache_202206_1.csv" "$META" + echo " get meta_kvcache_202206_1.csv (first $META_BYTES bytes of 4.9 GB)" + PENDING_PART="$TRACES/meta_kvcache_202206_1.csv.part" + curl -fSL --retry 3 -H "Range: bytes=0-$((META_BYTES - 1))" \ + -o "$TRACES/meta_kvcache_202206_1.csv.part" "$META" + verify meta_kvcache_202206_1.csv "$TRACES/meta_kvcache_202206_1.csv.part" + mv "$TRACES/meta_kvcache_202206_1.csv.part" "$TRACES/meta_kvcache_202206_1.csv" + PENDING_PART="" fi -# --- MSR Cambridge block I/O, from the SNIA IOTTA repository ----------------- +# --- MSR Cambridge block I/O, SNIA IOTTA trace 388 --------------------------- # Thirteen enterprise servers traced for a week: the block-cache counterpart to # the key-value traces above, and the trace set the S3-FIFO paper leans on for # its scan and loop patterns. # -# This one cannot be scripted end to end. SNIA serves the files behind a -# click-through licence and a cookie check, so the fetch below usually returns -# an error page rather than data - which is why it is guarded and skipped -# rather than allowed to fail the script. +# The canonical source is https://iotta.snia.org/traces/block-io/388, but it +# serves files only through a browser form (cookies, name, affiliation, email) +# and did not respond at all when this was written. The files come instead from +# the mirror kept by the cacheMon project (https://github.com/cacheMon/cache_dataset), +# which holds SNIA's original archives, msr-cambridge1.tar and +# msr-cambridge2.tar. The SNIA Trace Data Files Download License (v2.0) permits +# use and redistribution without restriction, so the mirror is a lawful copy. # -# To get them by hand: open https://iotta.snia.org/traces/block-io?only=388, -# accept the SNIA Trace Data Files Download License, download one or more -# per-volume CSVs (hm_0, prn_0, proj_0, src1_2, usr_0, web_0 and the rest), -# and drop them into this directory named msr_.csv[.gz]. +# The archives are 3.3 GB and 2.0 GB, uncompressed tars of per-volume .csv.gz +# files, and S3 serves byte ranges, so only the volumes listed below are +# fetched: about 210 MB in all. Each entry pins where the volume sits in its +# archive and the MD5 the archive's own MD5.txt gives for it. A download that +# does not match fails the script rather than replaying different data under a +# familiar name. If the mirror is repacked or gone, the tar-header check or the +# checksum says so; fall back to SNIA by hand and name the files +# msr_.csv.gz. # Cite: Narayanan, Donnelly & Rowstron, "Write Off-Loading", FAST '08. -MSR_LIST=$(find "$TRACES" -name 'msr_*.csv*' 2>/dev/null | head -1) -if [ -n "$MSR_LIST" ]; then - echo " have $(basename "$MSR_LIST") (and any siblings)" -else - echo " skip msr_*.csv - see the note in this script; SNIA needs a browser" -fi +MSR_MIRROR=https://cache-datasets.s3.amazonaws.com/cache_dataset_txt/2008_msr + +# volume, archive, offset of its tar header, size in bytes, MD5 from MD5.txt +MSR_VOLUMES=( + "hm_0 msr-cambridge1.tar 7168 41967571 e8a4059b21e91921256f737df3e0e5c9" + "prn_0 msr-cambridge1.tar 79446528 44469556 d6402a3a42063dabbf940dbf27f14219" + "proj_0 msr-cambridge1.tar 249739264 54999265 523b81261912744d33e70be92ae699e1" + "src1_2 msr-cambridge2.tar 1089042432 21339692 55fb3869c8e9e3ff4a31d88e8aea4e7e" + "usr_0 msr-cambridge2.tar 1213713920 25999401 e5478f9ca3d247b3b995cf3ff029c9d8" + "web_0 msr-cambridge2.tar 1933530624 24066938 b7cbd5bdb352b49eb33a0029111111ae" +) + +md5_of() { + if command -v md5sum >/dev/null 2>&1; then + md5sum "$1" | cut -d' ' -f1 + else + md5 -q "$1" + fi +} + +fetch_msr() { + local volume="$1" archive="$2" header="$3" size="$4" want="$5" + local name="msr_$volume.csv.gz" + local out="$TRACES/$name" url="$MSR_MIRROR/$archive" + if [ -e "$out" ]; then + verify "$name" "$out" + echo " have $name" + return + fi + + # The first 100 bytes of a tar header are the member's name. Checking it + # before downloading turns a repacked archive into a clear error instead of + # tens of megabytes of the wrong volume. + local member + member=$(curl -fsSL --retry 3 -r "$header-$((header + 99))" "$url" | tr -d '\0') + if [ "$member" != "MSR-Cambridge/$volume.csv.gz" ]; then + echo " FAIL $name: $archive holds '$member' at byte $header; the mirror has changed" >&2 + return 1 + fi + + echo " get $name ($((size / 1048576)) MB from $archive)" + local start=$((header + 512)) + PENDING_PART="$out.part" + curl -fSL --retry 3 -r "$start-$((start + size - 1))" -o "$PENDING_PART" "$url" + + local got + got=$(md5_of "$out.part") + if [ "$got" != "$want" ]; then + echo " FAIL $name: MD5 $got, expected $want from the archive's MD5.txt" >&2 + rm -f "$out.part" + return 1 + fi + verify "$name" "$out.part" + mv "$out.part" "$out" + PENDING_PART="" +} + +for entry in "${MSR_VOLUMES[@]}"; do + # shellcheck disable=SC2086 # the entry is split into its fields on purpose + fetch_msr $entry +done echo echo "Done. Run the evidence harness with:" diff --git a/scripts/measure_bytes.py b/scripts/measure_bytes.py new file mode 100644 index 0000000..5763662 --- /dev/null +++ b/scripts/measure_bytes.py @@ -0,0 +1,120 @@ +"""Compare object-count and byte-budget LRU on the same Meta GET prefix.""" + +import argparse +import csv +import json +from pathlib import Path +import re +import shlex +import subprocess +import tempfile + +from oracle_trace import write_oracle +from trace_inputs import CATALOG, verify + +ROOT = Path(__file__).resolve().parent.parent +PIN = "1d7415569978330ea95c9cff06a260630406f7e3" + + +def meta_requests(path, limit=2_000_000): + count = 0 + with path.open() as source: + for row in csv.DictReader(source): + if not row["key"] or not row["op"].upper().startswith("GET"): + continue + repeats = int(row["op_count"]) + if repeats < 1: + continue + size = int(row["size"]) + int(row["key_size"]) + for _ in range(min(repeats, 65536)): + yield row["key"], size + count += 1 + if count >= limit: + return + + +def measure(binary, path, capacity, ignore, work): + command = [ + str(binary), + str(path), + "oracleGeneralBin", + "lru", + str(capacity), + "--ignore-obj-size", + str(ignore).lower(), + "--num-thread", + "1", + ] + print("$ " + shlex.join(command), flush=True) + output = subprocess.check_output( + command, cwd=work, text=True, stderr=subprocess.STDOUT + ) + print(output, end="" if output.endswith("\n") else "\n", flush=True) + matches = re.findall(r"([0-9]+) req.*?miss ratio ([0-9.]+)", output) + match = matches[-1] if matches else None + if not match: + raise ValueError(f"no simulator result: {output}") + return {"requests": int(match[0]), "miss_ratio": float(match[1]), "output": output} + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("traces", type=Path) + parser.add_argument("output", type=Path) + parser.add_argument("--libcachesim", type=Path, default=ROOT / ".tools/libCacheSim") + args = parser.parse_args() + lcs = args.libcachesim.resolve() + commit = subprocess.check_output( + ["git", "-C", str(lcs), "rev-parse", "HEAD"], text=True + ).strip() + if commit != PIN: + parser.error("libCacheSim checkout differs from pinned commit") + entry = next( + item + for item in json.loads(CATALOG.read_text())["files"] + if item["file"] == "meta_kvcache_202206_1.csv" + ) + source = args.traces / entry["file"] + verify(source, entry) + rows = [] + with tempfile.TemporaryDirectory(prefix="as-cache-bytes-") as temporary: + work = Path(temporary) + trace = work / "meta.bin" + metadata = write_oracle(meta_requests(source), trace) + for capacity in (2500, 5000, 10000, 20000, 40000): + budget = int(capacity * metadata["mean_first_object_bytes"]) + objects = measure(lcs / "_build/bin/cachesim", trace, capacity, True, work) + sized = measure(lcs / "_build/bin/cachesim", trace, budget, False, work) + if ( + objects["requests"] != metadata["requests"] + or sized["requests"] != metadata["requests"] + ): + raise ValueError( + f"simulator counts {objects['requests']}/{sized['requests']}, expected {metadata['requests']}: {objects['output']} {sized['output']}" + ) + rows.append( + { + "object_capacity": capacity, + "byte_capacity": budget, + "objects": objects, + "bytes": sized, + "request_miss_delta_pp": 100 + * (sized["miss_ratio"] - objects["miss_ratio"]), + } + ) + result = { + "commit": subprocess.check_output( + ["git", "rev-parse", "HEAD"], cwd=ROOT, text=True + ).strip(), + "libcachesim_commit": PIN, + "input": entry, + **metadata, + "size_semantics": "size + key_size; current request size; no metadata overhead", + "budget_semantics": "object_capacity * mean first-seen size per distinct key, rounded down", + "rows": rows, + } + args.output.write_text(json.dumps(result, indent=2) + "\n") + + +if __name__ == "__main__": + main() diff --git a/scripts/oracle_trace.py b/scripts/oracle_trace.py new file mode 100644 index 0000000..14d49dd --- /dev/null +++ b/scripts/oracle_trace.py @@ -0,0 +1,47 @@ +"""Export keys and sizes as little-endian libCacheSim oracleGeneralBin records.""" + +import argparse +from array import array +from pathlib import Path +import struct + +RECORD = struct.Struct(" {log}", flush=True) + with (directory / log).open("w") as output: + result = subprocess.run( + arguments, cwd=ROOT, env=env, stdout=output, stderr=subprocess.STDOUT + ) + manifest["commands"].append( + { + "args": arguments, + "log": log, + "exit_code": result.returncode, + "duration_seconds": time.monotonic() - started, + } + ) + (directory / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n") + if result.returncode: + raise ValueError( + f"measurement failed; retained {log}, exit {result.returncode}" + ) + + command(["make", "verify-ref"], "reference.log") + manifest["libcachesim_commit"] = subprocess.check_output( + ["git", "-C", str(lcs), "rev-parse", "HEAD"], text=True + ).strip() + manifest["libcachesim_binary_sha256"] = digest(lcs / "_build/bin/cachesim") + command( + [ + "python3", + "scripts/measure_bytes.py", + str(traces), + str(directory / "bytes.json"), + "--libcachesim", + str(lcs), + ], + "bytes.log", + ) + for number in range(1, 4): + env["AS_CACHE_EVIDENCE_OUT"] = str(directory / f"traces-{number}.json") + command(["make", "evidence"], f"evidence-{number}.log") + require_committed_sources() + if git("rev-parse", "HEAD") != manifest["commit"]: + raise ValueError("measurement sources changed during the run") + combine(directory, manifest["commit"]) + render(directory) + manifest["completed_at"] = datetime.now(timezone.utc).isoformat() + manifest["artifacts_sha256"] = { + path.name: digest(path) + for path in sorted(directory.iterdir()) + if path.is_file() and path.name != "manifest.json" + } + (directory / "manifest.json").write_text(json.dumps(manifest, indent=2) + "\n") + verify_manifest(directory) + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + choice = parser.add_mutually_exclusive_group(required=True) + choice.add_argument("--out", type=Path) + choice.add_argument("--verify", type=Path) + choice.add_argument("--render", type=Path) + args = parser.parse_args() + try: + if args.verify: + verify_manifest(args.verify) + elif args.render: + refresh_report(args.render) + else: + record(args.out.resolve()) + except (ValueError, KeyError, OSError, subprocess.CalledProcessError) as error: + parser.exit(1, f"FAIL: {error}\n") + + +if __name__ == "__main__": + main() diff --git a/scripts/record_evidence_test.py b/scripts/record_evidence_test.py new file mode 100644 index 0000000..74aac63 --- /dev/null +++ b/scripts/record_evidence_test.py @@ -0,0 +1,355 @@ +"""Reject incomplete or inconsistent retained evidence, even with valid hashes.""" + +import json +from copy import deepcopy +from pathlib import Path +import tempfile +import shutil +import subprocess +import unittest +from unittest.mock import patch + +from record_evidence import combine, refresh_report_inputs, verify_manifest +from render_evidence import render, report_text +from trace_inputs import CATALOG, digest + + +def batch_fixture(): + trace = { + "trace": "a", + "requests": 100, + "distinct_keys": 20, + "capacity": 10, + "effective_sample_rate": 0.5, + "fixed_hit_rate_percent": { + name: {"runs": [20] * (5 if name in ("Random", "W-TinyLFU") else 1)} + for name in ( + "LRU", + "LFU", + "2Q", + "ARC", + "TTL", + "Random", + "W-TinyLFU", + "S3-FIFO", + "SIEVE", + ) + }, + "adaptive": [ + { + "epochs_per_trace": epochs, + "epoch_requests": 100 // epochs, + "hit_rate_percent": {"runs": [20] * 5}, + } + for epochs in (10, 20, 50) + ], + "policy_names": { + "TinyLFU": "W-TinyLFU", + "TwoQueue": "2Q", + "LRU": "LRU", + "LFU": "LFU", + }, + "observe_only": [{"hit_rate_percent": 20, "best_policy_name": "LRU"}] * 5, + "lfu_sieve_diagnostic": { + name: 0 + for name in ( + "lfu_hits", + "sieve_hits", + "fifo_hits", + "different_lfu_sieve_decisions", + "sieve_reference_disagreements", + ) + }, + } + second = deepcopy(trace) + second["trace"] = "b" + return { + "commit": "a" * 40, + "tree_modified": False, + "runs": 5, + "settings": {"ShadowSampleRate": 0.05}, + "bandit": "seeded", + "traces": [trace, second], + } + + +def write_batches(directory, batches): + tuning = [ + { + "epochs": epochs, + "strategy": strategy, + "gates": gates, + "hit_rate_percent": {"runs": [20] * 5}, + } + for epochs in (10, 20, 50) + for strategy in ("cold", "warm") + for gates in (False, True) + ] + for number, batch in enumerate(batches, 1): + (directory / f"traces-{number}.json").write_text(json.dumps(batch)) + (directory / f"traces-{number}-tuning.json").write_text(json.dumps(tuning)) + + +def complete_manifest(directory): + write_batches(directory, [batch_fixture() for _ in range(3)]) + combine(directory, "a" * 40) + (directory / "bytes.json").write_text( + json.dumps( + { + "commit": "a" * 40, + "libcachesim_commit": "b" * 40, + "requests": 100, + "mean_first_object_bytes": 200, + "rows": [ + { + "object_capacity": 10, + "byte_capacity": 2000, + "objects": {"miss_ratio": 0.5}, + "bytes": {"miss_ratio": 0.6}, + "request_miss_delta_pp": 10, + } + ], + } + ) + ) + for name in ( + "bytes.log", + "reference.log", + "reference.tsv", + "evidence-1.log", + "evidence-2.log", + "evidence-3.log", + ): + (directory / name).write_text("retained output\n") + render(directory) + commands = [ + {"args": ["make", "verify-ref"], "log": "reference.log", "exit_code": 0}, + { + "args": ["python3", "scripts/measure_bytes.py"], + "log": "bytes.log", + "exit_code": 0, + }, + ] + [ + {"args": ["make", "evidence"], "log": f"evidence-{i}.log", "exit_code": 0} + for i in range(1, 4) + ] + manifest = { + "commit": "a" * 40, + "files": json.loads(CATALOG.read_text())["files"], + "commands": commands, + "artifacts_sha256": {p.name: digest(p) for p in directory.iterdir()}, + } + (directory / "manifest.json").write_text(json.dumps(manifest)) + return manifest + + +class EvidenceManifestTest(unittest.TestCase): + def test_complete_dataset_requires_commands_and_matches_raw_batches(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + manifest = complete_manifest(directory) + verify_manifest(directory) + missing = deepcopy(manifest) + missing["commands"] = [] + (directory / "manifest.json").write_text(json.dumps(missing)) + with self.assertRaisesRegex(ValueError, "required measurement commands"): + verify_manifest(directory) + traces = json.loads((directory / "traces.json").read_text()) + traces["traces"][0]["adaptive"][0]["hit_rate_percent"]["runs"][0] = 99 + (directory / "traces.json").write_text(json.dumps(traces)) + manifest["artifacts_sha256"]["traces.json"] = digest( + directory / "traces.json" + ) + (directory / "manifest.json").write_text(json.dumps(manifest)) + with self.assertRaisesRegex(ValueError, "differs from its raw batches"): + verify_manifest(directory) + + def test_report_tamper_fails_even_with_updated_hash(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + manifest = complete_manifest(directory) + readme = directory / "README.md" + readme.write_text(readme.read_text().replace("20.00%", "99.00%", 1)) + manifest["artifacts_sha256"]["README.md"] = digest(readme) + (directory / "manifest.json").write_text(json.dumps(manifest)) + before = {p.name: p.read_bytes() for p in directory.iterdir()} + with self.assertRaisesRegex(ValueError, "README differs from the report"): + verify_manifest(directory) + self.assertEqual( + before, {p.name: p.read_bytes() for p in directory.iterdir()} + ) + + def test_report_line_ending_drift_fails_even_with_updated_hash(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + manifest = complete_manifest(directory) + readme = directory / "README.md" + readme.write_bytes(readme.read_bytes().replace(b"\n", b"\r\n")) + manifest["artifacts_sha256"]["README.md"] = digest(readme) + (directory / "manifest.json").write_text(json.dumps(manifest)) + with self.assertRaisesRegex(ValueError, "README differs from the report"): + verify_manifest(directory) + + def test_refresh_accepts_old_template_without_changing_measurements(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + complete_manifest(directory) + before = { + p.name: p.read_bytes() + for p in directory.iterdir() + if p.name not in ("README.md", "manifest.json") + } + + def next_template(folder): + return report_text(folder) + "New presentation.\n" + + with ( + patch("record_evidence.report_text", side_effect=next_template), + patch("render_evidence.report_text", side_effect=next_template), + ): + with self.assertRaisesRegex( + ValueError, "README differs from the report" + ): + verify_manifest(directory) + refresh_report_inputs(directory, "b" * 40) + verify_manifest(directory) + self.assertEqual( + before, + { + p.name: p.read_bytes() + for p in directory.iterdir() + if p.name in before + }, + ) + manifest = json.loads((directory / "manifest.json").read_text()) + self.assertEqual("a" * 40, manifest["commit"]) + self.assertEqual("b" * 40, manifest["report_generator_commit"]) + + def test_refresh_rejects_modified_measurements_before_writing_report(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + complete_manifest(directory) + (directory / "traces.json").write_text("modified input") + before = (directory / "README.md").read_bytes() + with ( + self.assertRaisesRegex( + ValueError, "artifact hash mismatch: traces.json" + ), + ): + refresh_report_inputs(directory, "b" * 40) + self.assertEqual(before, (directory / "README.md").read_bytes()) + + def test_report_preserves_tied_ranges_and_defines_advice_denominators(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + complete_manifest(directory) + data = json.loads((directory / "traces.json").read_text()) + for trace in data["traces"]: + fixed = trace["fixed_hit_rate_percent"] + fixed["LRU"]["runs"] = [38, 40, 42] + fixed["LFU"]["runs"] = [39, 40, 41] + fixed["2Q"]["runs"] = [30] * 3 + fixed["W-TinyLFU"]["runs"] = [9, 10, 11] * 5 + fixed["Random"]["runs"] = [8, 10, 12] * 5 + for cell in trace["adaptive"]: + cell["hit_rate_percent"]["runs"] = [9] * 15 + first, second = data["traces"] + for trace, choices in ( + (first, ["TinyLFU", "TwoQueue", "TinyLFU", "TwoQueue", "LRU"] * 3), + (second, ["LRU", "LRU", "LRU", "LFU", "LFU"] * 3), + ): + trace["observe_only"] = [ + {"hit_rate_percent": 40, "best_policy_name": choice} + for choice in choices + ] + (directory / "traces.json").write_text(json.dumps(data)) + result = report_text(directory) + self.assertIn( + "LFU 40.00% [39.00–41.00]
LRU 40.00% [38.00–42.00]", result + ) + self.assertIn( + "Random 10.00% [8.00–12.00]
W-TinyLFU 10.00% [9.00–11.00]", result + ) + self.assertIn("versus Random 10.00% [8.00–12.00]
W-TinyLFU", result) + self.assertIn("Retrospective modal agreement: 1/2 traces.", result) + self.assertIn("18/30 (60.00%)", result) + self.assertIn("| a | 2Q 30.00%", result) + self.assertIn("| a | W-TinyLFU 10.00%", result) + self.assertIn("| -30.0000 pp |", result) + self.assertIn("on 2/2 traces at every tested epoch setting", result) + + def test_make_gate_is_read_only_and_rejects_tampering(self): + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + repository = Path(__file__).resolve().parent.parent + shutil.copyfile(repository / "Makefile", root / "Makefile") + shutil.copytree( + repository / "scripts", + root / "scripts", + ignore=shutil.ignore_patterns("__pycache__"), + ) + directory = root / "bench/results/current" + directory.mkdir(parents=True) + manifest = complete_manifest(directory) + before = {p.name: p.read_bytes() for p in directory.iterdir()} + result = subprocess.run( + ["make", "evidence-check"], cwd=root, capture_output=True, text=True + ) + self.assertEqual(0, result.returncode, result.stdout + result.stderr) + self.assertEqual( + before, {p.name: p.read_bytes() for p in directory.iterdir()} + ) + readme = directory / "README.md" + readme.write_text(readme.read_text() + "Unsupported conclusion.\n") + manifest["artifacts_sha256"]["README.md"] = digest(readme) + (directory / "manifest.json").write_text(json.dumps(manifest)) + result = subprocess.run( + ["make", "evidence-check"], cwd=root, capture_output=True, text=True + ) + self.assertNotEqual(0, result.returncode) + self.assertIn("README differs from the report", result.stderr) + + def test_combining_rejects_changed_inventory_settings_and_sample_counts(self): + mutations = { + "missing trace": lambda batches: batches[0]["traces"].pop(), + "changed settings": lambda batches: batches[1]["settings"].update( + ShadowSampleRate=0.5 + ), + "changed capacity": lambda batches: batches[1]["traces"][0].update( + capacity=123 + ), + "missing adaptive runs": lambda batches: batches[1]["traces"][0][ + "adaptive" + ][0]["hit_rate_percent"].update(runs=[20]), + "missing observe runs": lambda batches: batches[1]["traces"][0].update( + observe_only=[] + ), + "extra fixed arm": lambda batches: batches[1]["traces"][0][ + "fixed_hit_rate_percent" + ].update(extra={"runs": [20]}), + } + for description, mutate in mutations.items(): + with self.subTest(description), tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + batches = [batch_fixture() for _ in range(3)] + mutate(batches) + write_batches(directory, batches) + with self.assertRaises(ValueError): + combine(directory, "a" * 40) + + def test_empty_inventory_cannot_certify_unmeasured_data(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + for name in ("traces.json", "tuning.json", "bytes.json"): + (directory / name).write_text(json.dumps({"commit": "unmeasured"})) + (directory / "manifest.json").write_text( + json.dumps( + {"commit": "unmeasured", "artifacts_sha256": {}, "commands": []} + ) + ) + with self.assertRaisesRegex(ValueError, "required artifacts"): + verify_manifest(directory) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/record_isolation_test.py b/scripts/record_isolation_test.py new file mode 100644 index 0000000..af62838 --- /dev/null +++ b/scripts/record_isolation_test.py @@ -0,0 +1,266 @@ +"""Recording must execute committed inputs without touching the developer tree.""" + +import json +from contextlib import nullcontext +import os +from pathlib import Path +import subprocess +import shutil +import sys +import tempfile +import unittest +from unittest.mock import patch + +import record_evidence +from record_evidence_test import complete_manifest + + +class RecordingIsolationTest(unittest.TestCase): + def setUp(self): + self.work = tempfile.TemporaryDirectory() + self.addCleanup(self.work.cleanup) + self.root = Path(self.work.name).resolve() / "repo" + self.root.mkdir() + self.git("init", "-q") + self.git("config", "user.name", "Fixture") + self.git("config", "user.email", "fixture@example.invalid") + (self.root / "scripts").mkdir() + (self.root / "scripts/record_evidence.py").write_text( + "import json, os, subprocess\n" + "from pathlib import Path\n" + "def measure(out):\n" + " out.mkdir(parents=True, exist_ok=True)\n" + ' output = subprocess.check_output(["make", "--silent", "run"], text=True)\n' + ' state = subprocess.check_output(["git", "status", "--porcelain"], text=True)\n' + ' commit = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()\n' + ' (out / "observed.json").write_text(json.dumps(dict(output=output, state=state, commit=commit, probe=Path("injected_test.go").exists(), workspace=os.environ.get("GOWORK"))))\n' + ) + (self.root / "Makefile").write_text("run:\n\tgo run .\n") + (self.root / "go.mod").write_text("module fixture\n\ngo 1.25.2\n") + (self.root / "go.work").write_text("go 1.25.2\nuse .\n") + (self.root / "main.go").write_text( + 'package main\nimport ("embed"; "fmt")\n' + "//go:embed _explicit.txt all:data\nvar files embed.FS\n" + 'func main() { a,_:=files.ReadFile("_explicit.txt"); b,_:=files.ReadFile("data/_hidden.txt"); fmt.Printf("%s/%s",a,b) }\n' + ) + (self.root / "_explicit.txt").write_text("committed") + (self.root / "data").mkdir() + (self.root / "data/_hidden.txt").write_text("hidden committed") + (self.root / ".gitignore").write_text("output/\n*.txt\ninjected_test.go\n") + self.git("add", "-f", ".") + self.git("commit", "-qm", "fixture") + self.commit = self.git("rev-parse", "HEAD").strip() + + def git(self, *args): + return subprocess.check_output(["git", *args], cwd=self.root, text=True) + + def test_actual_snapshot_execution_ignores_preserved_assets_and_disk_script(self): + output = Path(self.work.name) / "results" + for preserved in (False, True): + with self.subTest(preserved=preserved): + if preserved: + self.git("update-index", "--assume-unchanged", "_explicit.txt") + self.git("update-index", "--skip-worktree", "data/_hidden.txt") + (self.root / "_explicit.txt").write_text("uncommitted") + (self.root / "data/_hidden.txt").write_text("uncommitted hidden") + (self.root / "injected_test.go").write_text( + "preserved probe, invalid Go" + ) + (self.root / "scripts/record_evidence.py").write_text( + "raise RuntimeError('disk script ran')\n" + ) + destination = self.root / "output" if preserved else output / "fresh" + with ( + patch.object(record_evidence, "ROOT", self.root), + patch.dict( + os.environ, {"AS_CACHE_TRACES": str(self.root / "traces")} + ), + ): + record_evidence.record(destination) + measured = json.loads((destination / "observed.json").read_text()) + self.assertEqual("committed/hidden committed", measured["output"]) + self.assertEqual(self.commit, measured["commit"]) + self.assertEqual("", measured["state"]) + self.assertFalse(measured["probe"]) + self.assertEqual( + "preserved probe, invalid Go", (self.root / "injected_test.go").read_text() + ) + self.assertEqual("uncommitted", (self.root / "_explicit.txt").read_text()) + + def test_workspace_path_is_canonical_through_symlinked_temporary_parent(self): + work = Path(self.work.name).resolve() + physical = work / "physical" + physical.mkdir() + alias = work / "alias" + alias.symlink_to(physical, target_is_directory=True) + output = work / "results" + with ( + patch.object(record_evidence, "ROOT", self.root), + patch.dict(os.environ, {"AS_CACHE_TRACES": str(self.root / "traces")}), + patch.object( + record_evidence.tempfile, + "TemporaryDirectory", + return_value=nullcontext(str(alias)), + ), + ): + record_evidence.record(output) + measured = json.loads((output / "observed.json").read_text()) + self.assertEqual("committed/hidden committed", measured["output"]) + self.assertEqual(str(physical / "source/go.work"), measured["workspace"]) + + def test_persisted_go_flags_cannot_overlay_committed_source(self): + work = Path(self.work.name) + replacement = work / "replacement.go" + replacement.write_text( + 'package main\nimport "fmt"\nfunc main() { fmt.Print("OUTSIDE COMMITTED INPUTS") }\n' + ) + overlay = work / "overlay.json" + overlay.write_text(json.dumps({"Replace": {"main.go": str(replacement)}})) + goenv = work / "goenv" + goenv.write_text(f"GOFLAGS=-overlay={overlay}\n") + output = work / "results" + with ( + patch.object(record_evidence, "ROOT", self.root), + patch.dict( + os.environ, + {"AS_CACHE_TRACES": str(self.root / "traces"), "GOENV": str(goenv)}, + ), + ): + record_evidence.record(output) + self.assertEqual( + "committed/hidden committed", + json.loads((output / "observed.json").read_text())["output"], + ) + + def test_external_makefile_cannot_reintroduce_go_overlay(self): + work = Path(self.work.name) + replacement = work / "replacement.go" + replacement.write_text( + 'package main\nimport "fmt"\nfunc main() { fmt.Print("OUTSIDE COMMITTED INPUTS") }\n' + ) + overlay = work / "overlay.json" + overlay.write_text(json.dumps({"Replace": {"main.go": str(replacement)}})) + makefile = work / "injected.mk" + makefile.write_text(f"export GOFLAGS = -overlay={overlay}\n") + output = work / "results" + with ( + patch.object(record_evidence, "ROOT", self.root), + patch.dict( + os.environ, + { + "AS_CACHE_TRACES": str(self.root / "traces"), + "MAKEFILES": str(makefile), + }, + ), + ): + record_evidence.record(output) + self.assertEqual( + "committed/hidden committed", + json.loads((output / "observed.json").read_text())["output"], + ) + + def test_inherited_git_index_cannot_modify_developer_staging(self): + (self.root / "main.go").write_text( + (self.root / "main.go").read_text() + "\n// staged developer edit\n" + ) + self.git("add", "main.go") + index = self.root / ".git/index" + before = index.read_bytes() + with ( + patch.object(record_evidence, "ROOT", self.root), + patch.dict( + os.environ, + { + "AS_CACHE_TRACES": str(self.root / "traces"), + "GIT_INDEX_FILE": str(index), + }, + ), + ): + record_evidence.record(Path(self.work.name) / "results") + self.assertEqual(before, index.read_bytes()) + self.assertIn("staged developer edit", self.git("diff", "--cached")) + + def test_report_refresh_executes_committed_generator_despite_git_flags(self): + repository_scripts = Path(__file__).resolve().parent + shutil.copytree( + repository_scripts, + self.root / "scripts", + dirs_exist_ok=True, + ignore=shutil.ignore_patterns("__pycache__"), + ) + self.git("add", "scripts") + self.git("commit", "-qm", "committed report generator") + commit = self.git("rev-parse", "HEAD").strip() + generator = self.root / "scripts/render_evidence.py" + committed = generator.read_bytes() + for flag in ("assume-unchanged", "skip-worktree"): + with self.subTest(flag=flag): + destination = Path(self.work.name) / flag + destination.mkdir() + complete_manifest(destination) + before = { + p.name: p.read_bytes() + for p in destination.iterdir() + if p.name not in ("README.md", "manifest.json") + } + self.git("update-index", "--" + flag, "scripts/render_evidence.py") + generator.write_bytes( + committed.replace( + b"# Current measurement results", b"# UNCOMMITTED GENERATOR" + ) + ) + self.assertEqual( + "", self.git("status", "--porcelain", "--", "scripts").strip() + ) + result = subprocess.run( + [ + sys.executable, + "-B", + str(self.root / "scripts/record_evidence.py"), + "--render", + str(destination), + ], + cwd=self.root, + capture_output=True, + text=True, + ) + self.assertEqual(0, result.returncode, result.stdout + result.stderr) + self.assertNotIn( + b"UNCOMMITTED GENERATOR", (destination / "README.md").read_bytes() + ) + self.assertIn(b"UNCOMMITTED GENERATOR", generator.read_bytes()) + manifest = json.loads((destination / "manifest.json").read_text()) + self.assertEqual(commit, manifest["report_generator_commit"]) + self.assertEqual( + before, + { + p.name: p.read_bytes() + for p in destination.iterdir() + if p.name in before + }, + ) + generator.write_bytes(committed) + self.git("update-index", "--no-" + flag, "scripts/render_evidence.py") + + def test_output_is_validated_before_starting_measurements(self): + with patch.object(record_evidence, "ROOT", self.root): + with patch.object(record_evidence, "CommittedSource") as snapshot: + with self.assertRaisesRegex(ValueError, "must be ignored"): + record_evidence.record(self.root / "results") + snapshot.assert_not_called() + self.assertFalse((self.root / "results").exists()) + self.assertEqual( + self.root / "output", + record_evidence.validate_output(self.root / "output"), + ) + external = Path(self.work.name).resolve() / "external" + self.assertEqual(external, record_evidence.validate_output(external)) + external.mkdir() + (external / "retain").write_text("do not overwrite") + with self.assertRaisesRegex(ValueError, "must be empty"): + record_evidence.validate_output(external) + self.assertEqual("do not overwrite", (external / "retain").read_text()) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/release-check.sh b/scripts/release-check.sh index c4b0f33..4d52585 100755 --- a/scripts/release-check.sh +++ b/scripts/release-check.sh @@ -1,134 +1,6 @@ #!/usr/bin/env bash -# Check that this repository could actually be released today. -# -# Two things block a release and neither shows up in `go build`, `go test` or -# the linter, so they are checked here instead. -# -# 1. A missing licence. Without one the default is all rights reserved: nobody -# may legally use, copy or distribute the code, however good it is. -# -# 2. Sibling modules that cannot be resolved. Every module here depends on its -# siblings through a `replace` directive pointing at a local path, which is -# what makes local development work. But `replace` directives in a -# dependency's go.mod are IGNORED by the module that consumes it. A consumer -# running -# -# go get github.com/sshaplygin/as-cache/policies@v0.1.0 -# -# resolves the `require` line instead, and a require of v0.0.0 fails with -# "unknown revision v0.0.0". The repository builds and tests perfectly while -# being impossible for anyone else to use, and nothing catches it until -# someone tries. +# Rehearse module publication without local replacements or a Go workspace. +# Add --published after pushing the release tags to check real downloads. set -euo pipefail - -MODULE=github.com/sshaplygin/as-cache - -# The version the suggested commands are printed with. Passed as the first -# argument; the placeholder is deliberate, so the instructions cannot go stale -# by naming a version that was released long ago. -# -# ./scripts/release-check.sh v0.2.0 -VERSION="${1:-vX.Y.Z}" - -# Modules intended for publication. bench and examples/* are deliberately -# excluded: they are internal, nothing imports them, and their placeholder -# requires are harmless. -PUBLISHABLE=(. lfu policies policies/arc policies/fifo policies/tinylfu metrics bandit benchclient) - -# Tagging order. A module cannot require a real version of a sibling until that -# sibling is tagged, so releases go bottom-up through the dependency graph. -TAG_ORDER=(. lfu policies policies/arc policies/fifo policies/tinylfu metrics bandit benchclient) - -fail=0 - -echo "Checking every publishable module carries a licence" -# A Go module zip contains only its own directory, so a LICENSE at the repo -# root never reaches someone who fetches a submodule. Each published module -# needs its own copy, which is what upstream hashicorp/golang-lru does for its -# arc submodule. -for m in "${PUBLISHABLE[@]}"; do - if ls "$m"/LICENSE* >/dev/null 2>&1; then - echo " ok $m" - else - echo " FAIL $m has no LICENSE" - echo " Its module zip would ship without one, and the default is" - echo " all rights reserved: nobody may legally use, copy or" - echo " distribute it." - fail=1 - fi -done - -echo -echo "Checking publishable modules for unresolvable requires" - -for m in "${PUBLISHABLE[@]}"; do - # Read the requires through `go mod edit -json` rather than by grepping - # go.mod. A require can be written inside a block or as a standalone - # `require path version` line, and a pattern anchored for one form silently - # passes the other: that is how policies' require of lfu at - # v0.0.0-00010101000000-000000000000 sat here unreported. The JSON is the - # same parse the go command uses, so no layout can hide an entry. - # - # Only the Require array is scanned. Replace directives carry paths and - # versions too, and a local-path replace is exactly what is supposed to be - # there. - bad=$( (cd "$m" && go mod edit -json) | awk -F'"' -v mod="$MODULE" ' - /"Require": \[/ { inreq = 1; next } - inreq && /^\t\],?$/ { inreq = 0 } - !inreq { next } - $2 == "Path" { path = $4 } - # v0.0.0 and the v0.0.0-00010101000000-000000000000 pseudo-version both - # name a revision that does not exist, so both fail for a consumer. - $2 == "Version" && index(path, mod) == 1 && $4 ~ /^v0\.0\.0/ { - printf "%s %s\n", path, $4 - } - ') - if [ -n "$bad" ]; then - echo - echo " FAIL $m/go.mod requires a sibling at a placeholder version:" - echo "$bad" | sed 's/^/ /' - fail=1 - else - echo " ok $m" - fi -done - -if [ "$fail" -eq 0 ]; then - echo - echo "Release checks passed." - exit 0 -fi - -cat </dev/null; then - echo " (cd $m && go mod edit -require=${MODULE}@${VERSION} ...) && go mod tidy" - fi - echo " git tag $m/${VERSION}" -done - -cat < ..\n" + ) + result = self.check_release() + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("published go.mod must not contain replace", result.stdout) + + def test_rejects_sibling_version_outside_candidate(self): + p = self.root / "benchclient/go.mod" + p.write_text(p.read_text() + f"\nrequire {MODULE} v0.9.99\n") + result = self.check_release() + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("must use release version", result.stdout) + + def test_rejects_unpublished_fifo_dependency(self): + p = self.root / "benchclient/go.mod" + p.write_text(p.read_text() + f"\nrequire {MODULE}/policies/fifo v0.4.0\n") + result = self.check_release() + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("outside the release set", result.stdout) + + def test_rejects_code_that_only_builds_with_local_api(self): + p = self.root / "benchclient/go.mod" + p.write_text(p.read_text() + f"\nrequire {MODULE} v0.4.0\n") + (p.parent / "cache.go").write_text( + f'package cache\nimport core "{MODULE}"\nvar Value = core.MissingSymbol\n' + ) + result = self.check_release() + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("undefined: core.MissingSymbol", result.stdout) + + def test_disk_and_index_edits_never_enter_snapshot(self): + from committed_source import CommittedSource + import release_check + + for flag in (None, "--assume-unchanged", "--skip-worktree"): + with self.subTest(flag=flag): + path = self.root / "policies/cache.go" + committed = path.read_bytes() + if flag: + self.git("update-index", flag, "policies/cache.go") + path.write_text("package cache\nvar UncommittedProbe = MissingSymbol\n") + (self.root / "policies/go.mod").write_text("invalid disk metadata\n") + (self.root / "policies/LICENSE").unlink() + (self.root / "release-version").write_text("v0.9.99\n") + extra = self.root / "policies/new" + extra.mkdir(exist_ok=True) + (extra / "go.mod").write_text("module uncommitted\n") + self.git("add", "policies/new") + with tempfile.TemporaryDirectory() as work: + work = Path(work) + snapshot = CommittedSource(self.root) + source = snapshot.export(work / "source") + release_check.preflight("v0.4.0", source) + release_check.candidate_proxy(work / "proxy", "v0.4.0", source) + target = work / "proxy" / MODULE / "policies/@v" + with zipfile.ZipFile(target / "v0.4.0.zip") as archive: + self.assertEqual( + committed, + archive.read(MODULE + "/policies@v0.4.0/cache.go"), + ) + self.assertNotIn("new/go.mod", " ".join(archive.namelist())) + self.assertEqual( + (source / "policies/go.mod").read_bytes(), + (target / "v0.4.0.mod").read_bytes(), + ) + self.assertEqual( + "v0.4.0", (source / "release-version").read_text().strip() + ) + if flag: + self.git( + "update-index", + "--no-assume-unchanged" + if flag == "--assume-unchanged" + else "--no-skip-worktree", + "policies/cache.go", + ) + self.git("reset", "--hard", "HEAD") + + def test_cli_accepts_uncommitted_build_breakage_but_checks_head(self): + (self.root / "policies/cache.go").write_text( + "package cache\nvar Probe = MissingSymbol\n" + ) + self.git("add", "policies/cache.go") + result = self.check_release(stage=False) + self.assertEqual(0, result.returncode, result.stdout) + self.assertIn("working-tree edits are excluded", result.stdout) + + def test_default_version_ignores_uncommitted_release_version(self): + (self.root / "release-version").write_text("v0.9.99\n") + result = self.check_release(stage=False, version=None) + self.assertEqual(0, result.returncode, result.stdout) + self.assertIn("Rehearsing candidate v0.4.0", result.stdout) + self.assertNotIn("v0.9.99", result.stdout) + + def test_rejects_committed_symlink_even_when_disk_is_regular(self): + target = self.root / "policies/link.go" + target.symlink_to("cache.go") + self.commit() + target.unlink() + target.write_text("package cache\n") + result = self.check_release(stage=False) + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("symlinks", result.stdout) + + def test_discovers_new_module_without_allowlist_edit(self): + path = self.root / "policies/new" + path.mkdir() + (path / "go.mod").write_text(f"module {MODULE}/policies/new\n\ngo 1.25.2\n") + result = self.check_release() + self.assertNotEqual(0, result.returncode, result.stdout) + self.assertIn("policies/new: missing tracked nonempty LICENSE", result.stdout) + + def test_nested_modules_are_excluded_from_parent_zip(self): + spec = importlib.util.spec_from_file_location( + "checker", self.root / "scripts/release_check.py" + ) + checker = importlib.util.module_from_spec(spec) + spec.loader.exec_module(checker) + proxy = self.root / "proxy" + from committed_source import CommittedSource + + source = CommittedSource(self.root).export(self.root / "snapshot") + checker.candidate_proxy(proxy, "v0.4.0", source) + for module in (MODULE, MODULE + "/policies"): + with zipfile.ZipFile(proxy / module / "@v/v0.4.0.zip") as archive: + names = [ + name.removeprefix(module + "@v0.4.0/") + for name in archive.namelist() + ] + self.assertIn("go.mod", names) + self.assertNotIn("fifo/go.mod", names) + self.assertNotIn("policies/fifo/go.mod", names) + self.assertEqual(["go.mod"], [n for n in names if n.endswith("go.mod")]) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/render_evidence.py b/scripts/render_evidence.py new file mode 100644 index 0000000..ffe82ab --- /dev/null +++ b/scripts/render_evidence.py @@ -0,0 +1,281 @@ +"""Render current trace tables directly from retained measurements.""" + +from collections import Counter +import json +from pathlib import Path +from statistics import median +import sys + + +def spread(values): + return f"{median(values):.2f}% [{min(values):.2f}–{max(values):.2f}]" + + +def fixed_rates(trace): + return { + name: median(value["runs"]) + for name, value in trace["fixed_hit_rate_percent"].items() + } + + +def baseline(trace, value): + fixed = trace["fixed_hit_rate_percent"] + return "
".join( + f"{name} {spread(fixed[name]['runs'])}" + for name, rate in sorted(fixed_rates(trace).items()) + if rate == value + ) + + +def report_text(directory): + data = json.loads((directory / "traces.json").read_text()) + traces = data["traces"] + lines = [ + "# Current measurement results", + "", + f"Measured source: `{data['commit']}`; clean committed trees; three consecutive full evidence runs.", + "Nondeterministic subjects have 15 observations (three batches of five). Deterministic fixed arms run once per batch.", + "Median [min–max] describes these observations, not a confidence interval or a bound on future runs.", + "All trace-matrix outcomes are retained; relative hit rates do not decide whether this matrix passes.", + "", + "## Trace matrix", + "", + "All nine arms; request-counted epochs. Actual constructor settings are retained for every adaptive and ObserveOnly cell.", + "Effective sample rates come from the measured caches' Advice and are shown in the context table.", + "", + "| Trace | Best fixed median [min–max] (ties retained) | Worst fixed median [min–max] (ties retained) | 10 epochs | 20 epochs | 50 epochs |", + "| --- | --- | --- | --- | --- | --- |", + ] + below = [] + deficits = Counter() + below_every_epoch = 0 + above_every_epoch = [] + for trace in traces: + rates = fixed_rates(trace) + best, worst = max(rates.values()), min(rates.values()) + cells = [] + gaps = [] + for adaptive in trace["adaptive"]: + values = adaptive["hit_rate_percent"]["runs"] + gap = median(values) - best + gaps.append(gap) + deficits[adaptive["epochs_per_trace"]] += gap < 0 + if median(values) < worst: + below.append( + ( + trace["trace"], + adaptive["epochs_per_trace"], + median(values) - worst, + baseline(trace, worst), + ) + ) + cells.append(f"{spread(values)} ({gap:+.2f} pp)") + lines.append( + f"| {trace['trace']} | {baseline(trace, best)} | {baseline(trace, worst)} | " + + " | ".join(cells) + + " |" + ) + below_every_epoch += all(gap < 0 for gap in gaps) + if all(gap > 0 for gap in gaps): + above_every_epoch.append(trace["trace"]) + lines += [ + "", + f"Adaptive medians trail the best fixed median on {below_every_epoch}/{len(traces)} traces at every tested epoch setting.", + "Counts below the best fixed median by setting: " + + "; ".join( + f"{epochs} epochs: {deficits[epochs]}/{len(traces)}" + for epochs in (10, 20, 50) + ) + + ".", + "Traces above the best fixed median at every setting: " + + (", ".join(above_every_epoch) or "none") + + ".", + "The table compares medians with the best fixed median in this dataset. It makes no claim of a universal maximum deficit.", + "W-TinyLFU is asynchronous: a short batch may miss another performance mode, especially on LIRS loop.", + "A winning policy name is not evidence of a material or statistically established advantage.", + "", + "Adaptive medians below the worst fixed median in this dataset:", + "", + ] + if below: + lines += [ + f"- {name}, {epochs} epochs: {gap:+.4f} percentage points versus {worst}." + for name, epochs, gap, worst in below + ] + else: + lines += [ + "None observed. This comparison is reported, not asserted; future runs can fall below it." + ] + lines += [ + "", + "## Workload context", + "", + "Compulsory-miss ceiling assumes an empty cache: 100 × (requests − distinct keys) / requests.", + "The best/runner-up gap includes ties; tiny gaps cannot support a strong policy ranking.", + "", + "| Trace | Requests | Distinct keys | Capacity | Capacity/keyspace | Effective sample | Hit ceiling | Best–runner-up | Best–worst |", + "| --- | --- | --- | --- | --- | --- | --- | --- | --- |", + ] + for trace in traces: + rates = sorted( + ( + median(value["runs"]) + for value in trace["fixed_hit_rate_percent"].values() + ), + reverse=True, + ) + lines.append( + f"| {trace['trace']} | {trace['requests']} | {trace['distinct_keys']} | {trace['capacity']} | " + f"{100 * trace['capacity'] / trace['distinct_keys']:.3f}% | {100 * trace['effective_sample_rate']:.2f}% | " + f"{100 * (1 - trace['distinct_keys'] / trace['requests']):.2f}% | {rates[0] - rates[1]:.4f} pp | {rates[0] - rates[-1]:.4f} pp |" + ) + lines += [ + "", + "Use the margins and ties above when interpreting policy names; small differences do not establish a useful ranking.", + "The cache is roughly 1% of the distinct keyspace on most MSR prefixes; the ceilings above limit the available hit-rate signal.", + "", + "## Every fixed arm", + "", + "| Trace | Policy | Hit rate |", + "| --- | --- | --- |", + ] + for trace in traces: + for name, value in sorted(trace["fixed_hit_rate_percent"].items()): + lines.append(f"| {trace['trace']} | {name} | {spread(value['runs'])} |") + lines += [ + "", + "## ObserveOnly", + "", + "LRU remains active, all nine arms are measured, 20 request epochs per replay, the same sample/floor settings.", + "Every run asserts serving hits equal standalone LRU. Advice rankings measure sampled shadows; they are not full-cache forecasts.", + "The table counts the final Advice.Best choices across 15 runs; all per-arm hit/miss reports are in traces.json.", + "", + "| Trace | Serving hit rate | Recommended policies (count) |", + "| --- | --- | --- |", + ] + modal_agreement = individual_agreement = total_runs = 0 + mismatches = [] + for trace in traces: + counts = Counter( + trace["policy_names"][run["best_policy_name"]] + for run in trace["observe_only"] + ) + rates = fixed_rates(trace) + best = max(rates.values()) + winners = {name for name, rate in rates.items() if rate == best} + modes = sorted( + name for name, count in counts.items() if count == max(counts.values()) + ) + modal_agreement += all(name in winners for name in modes) + individual_agreement += sum( + count for name, count in counts.items() if name in winners + ) + total_runs += sum(counts.values()) + lines.append( + f"| {trace['trace']} | {spread([r['hit_rate_percent'] for r in trace['observe_only']])} | " + + ", ".join(f"{name}: {count}" for name, count in sorted(counts.items())) + + " |" + ) + for name in modes: + if name not in winners: + mismatches.append((trace, name, rates[name] - best)) + lines += [ + "", + f"Retrospective modal agreement: {modal_agreement}/{len(traces)} traces. Each trace counts once, and all tied modal choices must belong to the tied best-fixed set to count as agreement.", + f"Individual final recommendations in the best-fixed set: {individual_agreement}/{total_runs} ({100 * individual_agreement / total_runs:.2f}%). Every run counts once; any tied best-fixed arm counts as agreement.", + "These compare final sampled Advice choices with standalone full-cache medians in this dataset, not forecast accuracy or a causal cost of following Advice. Serving remained LRU.", + ] + if mismatches: + lines += [ + "", + "Modal mismatches (each tied nonwinning mode has its own row):", + "", + "| Trace | Modal recommendation: standalone median [min–max] | Best fixed median [min–max] | Standalone median difference |", + "| --- | --- | --- | --- |", + ] + for trace, name, gap in mismatches: + lines.append( + f"| {trace['trace']} | {name} {spread(trace['fixed_hit_rate_percent'][name]['runs'])} | " + f"{baseline(trace, max(fixed_rates(trace).values()))} | {gap:+.4f} pp |" + ) + trace, name, gap = mismatches[0] + lines += [ + "", + f"For example, on {trace['trace']} the modal {name} recommendation has a standalone median {gap:+.4f} points relative to the best fixed median. This subtraction compares separate full-cache replays; the sampled ObserveOnly cache did not switch to {name} or measure that difference as a serving loss.", + ] + lines += [ + "", + "This is an offline sweep, not a service trial or proof that following Advice will improve production traffic.", + "", + "## LFU/SIEVE diagnostic", + "", + "Each request is checked against an independent visited-bit/hand model. A FIFO control and LFU run on the identical stream.", + "", + "| Trace | LFU hits | SIEVE hits | FIFO hits | LFU/SIEVE decisions differ | SIEVE/model disagreements |", + "| --- | --- | --- | --- | --- | --- |", + ] + for trace in traces: + d = trace["lfu_sieve_diagnostic"] + lines.append( + f"| {trace['trace']} | {d['lfu_hits']} | {d['sieve_hits']} | {d['fifo_hits']} | {d['different_lfu_sieve_decisions']} | {d['sieve_reference_disagreements']} |" + ) + lines += [ + "", + "Equal hit/miss streams do not imply equal eviction state. The nonzero FIFO differences rule out a general reduction to FIFO.", + "A capacity-2 counterexample separates the mechanisms: a,a,b,b,c,d,a,b gives LFU 3 hits and SIEVE 2; a,b,a,c,a gives SIEVE 2 and FIFO 1.", + "TestSieveLFUDistinction pins both examples. The real-trace model check tests the adapter without assuming these policies must have different totals.", + "", + "## P3 tuning", + "", + "This configuration example is restricted to P3; it does not identify a universal production setting.", + "Every cell retains its actual migration, sampling and stability settings in tuning.json; nine arms are measured.", + "", + "| Epochs | Migration | Gates | Hit rate |", + "| --- | --- | --- | --- |", + ] + for row in json.loads((directory / "tuning.json").read_text())["records"]: + lines.append( + f"| {row['epochs']} | {row['strategy']} | {row['gates']} | {spread(row['hit_rate_percent']['runs'])} |" + ) + byte_data = json.loads((directory / "bytes.json").read_text()) + lines += [ + "", + "## Meta object-count versus byte capacity", + "", + f"Pinned libCacheSim `{byte_data['libcachesim_commit']}`, LRU, the same {byte_data['requests']} GET requests in both modes.", + "The export retains request-time size + key_size. The pinned simulator charges insertion-time size until eviction; size changes on hits do not resize resident objects. Metadata overhead is excluded.", + f"Byte budget = object capacity × mean first-seen size per distinct key ({byte_data['mean_first_object_bytes']:.3f} bytes), rounded down.", + "This is a stated budget convention, not proof of equal resident memory. Deltas are request miss ratios, not byte-weighted miss ratios.", + "", + "| Objects | Bytes | Ignore sizes: miss | Account sizes: miss | Difference |", + "| --- | --- | --- | --- | --- |", + ] + for row in byte_data["rows"]: + lines.append( + f"| {row['object_capacity']} | {row['byte_capacity']} | {100 * row['objects']['miss_ratio']:.2f}% | {100 * row['bytes']['miss_ratio']:.2f}% | {row['request_miss_delta_pp']:+.2f} pp |" + ) + lines += [ + "", + "## Provenance and limits", + "", + "manifest.json is generated by scripts/record_evidence.py and hashes every retained input/output.", + "The pinned input catalog has 13 files. lirs_multi2.trace.gz is inventoried but not replayed in the 12-trace matrix or reference gate.", + "Verify with `python3 scripts/record_evidence.py --verify bench/results/current`.", + "Reference calibration compares independent expansions of the same interpretation and LRU counting; it cannot detect a shared interpretation error.", + "The reference accepts finite ratios in [0, 1] with exactly four decimals. Tolerance is half that rounding quantum plus numerical slack: 0.0051 percentage points. All loaded traces must have reference coverage.", + "The byte experiment uses the Meta prefix only. Other traces remain entry-capacity, not equal-memory comparisons.", + "Per-operation timings and wall-clock experiments remain raw diagnostics in the logs, not stable product claims.", + "", + "Reproduce: `AS_CACHE_TRACES=$PWD/traces python3 scripts/record_evidence.py --out `.", + "A complete run requires the pinned libCacheSim build and three sequential evidence runs. Replace current results after validation; do not create a historical archive.", + "", + ] + return "\n".join(lines) + + +def render(directory): + (directory / "README.md").write_bytes(report_text(directory).encode("utf-8")) + + +if __name__ == "__main__": + render(Path(sys.argv[1])) diff --git a/scripts/tidy.py b/scripts/tidy.py new file mode 100644 index 0000000..826c0b4 --- /dev/null +++ b/scripts/tidy.py @@ -0,0 +1,58 @@ +"""Tidy modules whose sibling versions can resolve without the workspace.""" + +import json +import os +from pathlib import Path +import subprocess + +from release_check import MODULE, ROOT, run + + +def tracked_module_directories(): + paths = run("git", "ls-files", "-z", cwd=ROOT).split("\0") + return sorted( + { + str(Path(path).parent) + for path in paths + if path and Path(path).name == "go.mod" + } + ) + + +def main(): + env = dict(os.environ, GOWORK="off") + resolved = {} + for directory in tracked_module_directories(): + path = ROOT / directory + metadata = json.loads(run("go", "mod", "edit", "-json", cwd=path, env=env)) + replaced = {entry["Old"]["Path"] for entry in metadata.get("Replace") or []} + missing = [] + for dependency in metadata.get("Require") or []: + name = dependency["Path"] + if ( + name != MODULE and not name.startswith(MODULE + "/") + ) or name in replaced: + continue + version = name + "@" + dependency["Version"] + if version not in resolved: + result = subprocess.run( + ["go", "list", "-m", version], + cwd=path, + env=env, + capture_output=True, + text=True, + ) + resolved[version] = result.returncode == 0 + if not resolved[version]: + missing.append(version) + if missing: + print( + f"SKIP tidy {directory}: unresolved sibling versions: {', '.join(missing)}" + ) + continue + print(f"tidy {directory}", flush=True) + subprocess.run(["go", "mod", "tidy"], cwd=path, env=env, check=True) + + +if __name__ == "__main__": + main() diff --git a/scripts/tidy_test.py b/scripts/tidy_test.py new file mode 100644 index 0000000..29ce757 --- /dev/null +++ b/scripts/tidy_test.py @@ -0,0 +1,73 @@ +"""Routine tidy uses tracked modules and tolerates unpublished sibling versions.""" + +import os +from pathlib import Path +import shutil +import subprocess +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parent.parent + + +class TidyTests(unittest.TestCase): + def test_tracked_modules_exclude_ignored_clones_and_skip_unpublished(self): + with tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + scripts = root / "scripts" + scripts.mkdir() + for name in ("tidy.py", "release_check.py", "committed_source.py"): + shutil.copyfile(ROOT / "scripts" / name, scripts / name) + subprocess.run(["git", "init", "-q", str(root)], check=True) + modules = (".", "leaf", "unpublished") + for module in (*modules, ".reports/clone"): + directory = root / module + directory.mkdir(parents=True, exist_ok=True) + (directory / "go.mod").write_text("module fixture\n") + (root / ".gitignore").write_text(".reports/\n") + subprocess.run( + ["git", "add", ".gitignore", *[f"{m}/go.mod" for m in modules]], + cwd=root, + check=True, + ) + binary = root / "bin" + binary.mkdir() + fake_go = binary / "go" + fake_go.write_text( + "#!/usr/bin/env python3\n" + "import json, os, pathlib, sys\n" + "assert os.environ['GOWORK'] == 'off'\n" + "args = sys.argv[1:]\n" + "if args == ['mod', 'edit', '-json']:\n" + " deps = [{'Path': 'github.com/sshaplygin/as-cache', " + "'Version': 'v9.9.9'}] if pathlib.Path.cwd().name == 'unpublished' else []\n" + " print(json.dumps({'Require': deps}))\n" + "elif args[:2] == ['list', '-m']:\n" + " sys.exit(1)\n" + "elif args == ['mod', 'tidy']:\n" + " pathlib.Path('.tidied').write_text('yes')\n" + "else:\n" + " sys.exit('unexpected arguments: ' + repr(args))\n" + ) + fake_go.chmod(0o755) + result = subprocess.run( + [os.sys.executable, str(scripts / "tidy.py")], + cwd=root, + env=dict( + os.environ, PATH=str(binary) + os.pathsep + os.environ["PATH"] + ), + capture_output=True, + text=True, + ) + self.assertEqual(result.returncode, 0, result.stdout + result.stderr) + self.assertTrue((root / ".tidied").is_file()) + self.assertTrue((root / "leaf/.tidied").is_file()) + self.assertFalse((root / "unpublished/.tidied").exists()) + self.assertFalse((root / ".reports/clone/.tidied").exists()) + self.assertIn( + "SKIP tidy unpublished: unresolved sibling versions:", result.stdout + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/trace-inputs.json b/scripts/trace-inputs.json new file mode 100644 index 0000000..824157a --- /dev/null +++ b/scripts/trace-inputs.json @@ -0,0 +1,69 @@ +{ + "files": [ + { + "file": "arc_oltp.gz", + "bytes": 2246479, + "sha256": "9599b313a5662e72734fb499b3513759144d7f80847134f29638567b6a5ab151" + }, + { + "file": "arc_p3.gz", + "bytes": 1441128, + "sha256": "71be839be560a64cc260c6a93fe002b6de5b4d24bdbc885f4a81a65ff84e4cbf" + }, + { + "file": "lirs_2_pools.trace.gz", + "bytes": 171161, + "sha256": "12370af6d9e1b5a4d16642c6a5d0322565f20aed54bed8176901e74f70a4c3ee" + }, + { + "file": "lirs_loop.trace.gz", + "bytes": 17848, + "sha256": "465c1cc6bb08993034fd3597106cb0edc55b25a5984a17a12018f30a06ba60e9" + }, + { + "file": "lirs_multi2.trace.gz", + "bytes": 43980, + "sha256": "3576bc20286f4d204a3c2b6647bb691ed9dde9a923a32624e145873ed830dad5" + }, + { + "file": "meta_kvcache_202206_1.csv", + "bytes": 134217728, + "sha256": "faaf993d0267a3b68430ec079de6074060cb3593ddff4a9e987c25a5d68cd277" + }, + { + "file": "msr_hm_0.csv.gz", + "bytes": 41967571, + "sha256": "06d414bd428b9b77e7ff803c7cc9ec14351283fd9eb45a5d00fdca3aaeeba468" + }, + { + "file": "msr_prn_0.csv.gz", + "bytes": 44469556, + "sha256": "cc98e9e6f0d1d41ae050a78a6bebf1f6031e9c824d84685c7b3d6be73080c1ba" + }, + { + "file": "msr_proj_0.csv.gz", + "bytes": 54999265, + "sha256": "b972f0e6d396a9db13653d7f51a04554dd1f83ea9e91458536bd5e0e9eb24fc2" + }, + { + "file": "msr_src1_2.csv.gz", + "bytes": 21339692, + "sha256": "34539f303ee98222237852610756dc77cac59739e909557fa40baf92c980e12c" + }, + { + "file": "msr_usr_0.csv.gz", + "bytes": 25999401, + "sha256": "094eb4e7c871e4e339682d149ed90fbb8a034968f51ab71da85853f7a2ad8d9c" + }, + { + "file": "msr_web_0.csv.gz", + "bytes": 24066938, + "sha256": "80d026313b52c8288ef2878173b344895637a26a960b1bccde91da9abf34deaa" + }, + { + "file": "twitter_cluster052.csv", + "bytes": 44110178, + "sha256": "f3f47903f0aad7a83260f5df63910c694da94ec7eee91bbde98cc34d46dabfe6" + } + ] +} diff --git a/scripts/trace_inputs.py b/scripts/trace_inputs.py new file mode 100644 index 0000000..142f504 --- /dev/null +++ b/scripts/trace_inputs.py @@ -0,0 +1,44 @@ +"""Verify trace files against the repository's pinned sizes and SHA-256 hashes.""" + +import argparse +import hashlib +import json +from pathlib import Path + +CATALOG = Path(__file__).with_name("trace-inputs.json") + + +def digest(path): + with path.open("rb") as source: + return hashlib.file_digest(source, "sha256").hexdigest() + + +def verify(path, entry): + if not path.is_file() or path.stat().st_size != entry["bytes"]: + raise ValueError( + f"{entry['file']}: missing file or size mismatch (expected {entry['bytes']})" + ) + if digest(path) != entry["sha256"]: + raise ValueError(f"{entry['file']}: SHA-256 mismatch") + + +def main(): + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("directory", type=Path) + parser.add_argument("name", nargs="?") + parser.add_argument("--path", type=Path, help="staged download to verify as name") + args = parser.parse_args() + entries = json.loads(CATALOG.read_text())["files"] + if args.name: + entries = [entry for entry in entries if entry["file"] == args.name] + if not entries: + parser.error(f"unpinned input: {args.name}") + try: + for entry in entries: + verify(args.path or args.directory / entry["file"], entry) + except ValueError as error: + parser.exit(1, f"FAIL: {error}\n") + + +if __name__ == "__main__": + main() diff --git a/scripts/trace_inputs_test.py b/scripts/trace_inputs_test.py new file mode 100644 index 0000000..5d5975e --- /dev/null +++ b/scripts/trace_inputs_test.py @@ -0,0 +1,167 @@ +"""Fetch regressions: cached garbage and interrupted downloads must fail closed.""" + +import gzip +import json +import os +from pathlib import Path +import subprocess +import shutil +import tempfile +import unittest + +ROOT = Path(__file__).resolve().parent.parent + + +class TraceInputsTest(unittest.TestCase): + def test_cached_garbage_is_rejected_without_network(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + manifest = ROOT / "scripts/trace-inputs.json" + for item in json.loads(manifest.read_text())["files"]: + (directory / item["file"]).write_text("garbage") + result = subprocess.run( + ["bash", str(ROOT / "scripts/fetch-traces.sh"), temporary], + capture_output=True, + text=True, + timeout=20, + ) + self.assertNotEqual(0, result.returncode) + self.assertIn("twitter_cluster052.csv", result.stdout + result.stderr) + self.assertIn("FAIL", result.stdout + result.stderr) + + def test_interrupted_download_does_not_create_final_file(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + curl = directory / "curl" + curl.write_text( + '#!/bin/bash\nwhile [ "$#" -gt 0 ]; do\n' + 'if [ "$1" = -o ]; then shift; printf partial > "$1"; fi\n' + "shift\ndone\nexit 42\n" + ) + curl.chmod(0o755) + traces = directory / "traces" + result = subprocess.run( + ["bash", str(ROOT / "scripts/fetch-traces.sh"), str(traces)], + env=dict(os.environ, PATH=temporary + ":" + os.environ["PATH"]), + capture_output=True, + text=True, + timeout=20, + ) + self.assertNotEqual(0, result.returncode) + self.assertFalse((traces / "twitter_cluster052.csv").exists()) + self.assertFalse((traces / "twitter_cluster052.csv.part").exists()) + self.assertIn("exited with status", result.stderr) + self.assertRegex(result.stderr, r"caller lines: [1-9][0-9]*") + + def test_failed_checksum_removes_generic_and_meta_staging_files(self): + for kind in ("generic", "meta"): + with self.subTest(kind=kind), tempfile.TemporaryDirectory() as temporary: + root = Path(temporary) + scripts = root / "scripts" + scripts.mkdir() + shutil.copyfile( + ROOT / "scripts/fetch-traces.sh", scripts / "fetch-traces.sh" + ) + # Isolate the download cleanup contract: cached files pass, + # verification of the newly downloaded staged bytes fails. + (scripts / "trace_inputs.py").write_text( + 'import sys\nif sys.argv[-1].endswith(".part"):\n' + ' print("checksum mismatch", file=sys.stderr)\n sys.exit(1)\n' + ) + curl = root / "curl" + curl.write_text( + '#!/bin/bash\nwhile [ "$#" -gt 0 ]; do\nif [ "$1" = -o ]; then shift; printf corrupt > "$1"; fi\nshift\ndone\n' + ) + curl.chmod(0o755) + traces = root / "traces" + traces.mkdir() + if kind == "meta": + for name in ( + "twitter_cluster052.csv", + "lirs_loop.trace.gz", + "lirs_2_pools.trace.gz", + "lirs_multi2.trace.gz", + "arc_p3.gz", + "arc_oltp.gz", + ): + (traces / name).touch() + name = ( + "twitter_cluster052.csv" + if kind == "generic" + else "meta_kvcache_202206_1.csv" + ) + result = subprocess.run( + ["bash", str(scripts / "fetch-traces.sh"), str(traces)], + env=dict(os.environ, PATH=temporary + ":" + os.environ["PATH"]), + capture_output=True, + text=True, + timeout=20, + ) + self.assertNotEqual(0, result.returncode) + self.assertIn("checksum mismatch", result.stderr) + self.assertFalse((traces / name).exists()) + self.assertFalse((traces / (name + ".part")).exists()) + call = ( + 'verify "$name" "$TRACES/$name.part"' + if kind == "generic" + else 'verify meta_kvcache_202206_1.csv "$TRACES/meta_kvcache_202206_1.csv.part"' + ) + callsite = next( + number + for number, line in enumerate( + (scripts / "fetch-traces.sh").read_text().splitlines(), 1 + ) + if line.strip() == call + ) + self.assertRegex(result.stderr, rf"caller lines: {callsite}(?:\s|\))") + + def test_reference_rejects_extra_msr_volume(self): + with tempfile.TemporaryDirectory() as temporary: + directory = Path(temporary) + specs = [ + ("twitter_cluster052.csv", "0,key,0\n", 10000), + ("lirs_loop.trace.gz", "1\n", 500), + ("lirs_2_pools.trace.gz", "1\n", 1000), + ("arc_p3.gz", "1 1 0 0\n", 20000), + ("arc_oltp.gz", "1 1 0 0\n", 20000), + ( + "meta_kvcache_202206_1.csv", + "key,op,size,op_count,key_size\n1,GET,1,1,1\n", + 10000, + ), + ] + for volume in ("hm_0", "prn_0", "proj_0", "src1_2", "usr_0", "web_0"): + specs.append((f"msr_{volume}.csv.gz", "0,host,0,Read,0,512,0\n", 20000)) + for name, contents, _ in specs: + path = directory / name + if name.endswith(".gz"): + path.write_bytes(gzip.compress(contents.encode())) + else: + path.write_text(contents) + (directory / "msr_zzz_9.csv.gz").write_bytes( + gzip.compress(b"0,host,0,Read,0,512,0\n") + ) + reference = directory / "reference.tsv" + reference.write_text( + "".join( + f"{name}\t{capacity}\t1\t1.0000\n" for name, _, capacity in specs + ) + ) + result = subprocess.run( + ["go", "test", "-count=1", "-run", "^TestLRUMatchesReference$", "."], + cwd=ROOT / "bench", + text=True, + capture_output=True, + env=dict( + os.environ, + AS_CACHE_TRACES=temporary, + AS_CACHE_LRU_REFERENCE=str(reference), + ), + timeout=60, + ) + self.assertNotEqual(0, result.returncode, result.stdout + result.stderr) + self.assertIn("msr_zzz_9.csv.gz", result.stdout + result.stderr) + + +if __name__ == "__main__": + unittest.main() diff --git a/scripts/verify-ref.sh b/scripts/verify-ref.sh new file mode 100755 index 0000000..37381ac --- /dev/null +++ b/scripts/verify-ref.sh @@ -0,0 +1,167 @@ +#!/usr/bin/env bash +# Calibrate this repository's trace loaders and LRU against libCacheSim. +# +# Every published number from a real trace rests on two things that no unit +# test can vouch for: that a loader turned the file into the right request +# sequence, and that a replay counts hits the way everyone else does. This +# compares two expansions of the documented interpretation and LRU counts, on every trace the +# evidence suite reads: +# +# 1. Each trace is expanded into one key per request here, with awk, from the +# raw file - not through the Go loaders, so a loader bug cannot cancel out. +# 2. libCacheSim's cachesim replays it through LRU at five capacities around +# the one the suite uses, ignoring object sizes. +# 3. TestLRUMatchesReference loads the same files through the Go loaders, +# replays this repository's LRU at the same capacities, and requires the +# same request count and a miss ratio within 0.0051 percentage points. +# +# The gate fails when it cannot run - libCacheSim missing and not buildable, a +# trace absent, the test skipped - rather than reporting success over nothing. +# +# Usage: +# AS_CACHE_TRACES=$(pwd)/traces ./scripts/verify-ref.sh +# AS_CACHE_LIBCACHESIM=/path/to/libCacheSim # reuse an existing checkout +set -Eeuo pipefail + +# Under set -e a failing command ends the script with no word of why. A gate +# that stops silently reads like one that finished, so say where it stopped. +trap 'echo "FAIL: ${BASH_SOURCE[0]}:$LINENO exited with status $?" >&2' ERR + +# Pinned: a reference that moves is not a reference. Record this commit next to +# any result that cites the gate. +LIBCACHESIM_REPO=https://github.com/1a1a11a/libCacheSim.git +LIBCACHESIM_COMMIT=1d7415569978330ea95c9cff06a260630406f7e3 + +ROOT=$(cd "$(dirname "$0")/.." && pwd) +TRACES="${AS_CACHE_TRACES:?set AS_CACHE_TRACES to the directory ./scripts/fetch-traces.sh filled}" +LCS="${AS_CACHE_LIBCACHESIM:-$ROOT/.tools/libCacheSim}" +CACHESIM="$LCS/_build/bin/cachesim" + +# Capacity multipliers around each trace's evidence capacity. +GRID=(0.25 0.5 1 2 4) + +# file, expander, capacity the evidence suite uses (bench/trace_test.go) +TRACE_LIST=( + "twitter_cluster052.csv twitter 10000" + "lirs_loop.trace.gz lirs 500" + "lirs_2_pools.trace.gz lirs 1000" + "arc_p3.gz arc 20000" + "arc_oltp.gz arc 20000" + "meta_kvcache_202206_1.csv meta 10000" + "msr_hm_0.csv.gz msr 20000" + "msr_prn_0.csv.gz msr 20000" + "msr_proj_0.csv.gz msr 20000" + "msr_src1_2.csv.gz msr 20000" + "msr_usr_0.csv.gz msr 20000" + "msr_web_0.csv.gz msr 20000" +) + +# The loaders cap how many requests a trace yields; the expansions must too. +LIMIT=2000000 + +fail() { + echo "FAIL: $*" >&2 + exit 1 +} + +build_libcachesim() { + if [ -x "$CACHESIM" ]; then + return + fi + echo "Building libCacheSim $LIBCACHESIM_COMMIT into $LCS" + for tool in git cmake pkg-config cc; do + command -v "$tool" >/dev/null 2>&1 || fail "$tool is required to build libCacheSim" + done + if [ ! -d "$LCS/.git" ]; then + git clone --quiet "$LIBCACHESIM_REPO" "$LCS" + fi + git -C "$LCS" checkout --quiet "$LIBCACHESIM_COMMIT" + # glib, argp and zstd are libCacheSim's own requirements; on macOS: + # brew install glib argp-standalone zstd cmake pkg-config + cmake -S "$LCS" -B "$LCS/_build" -DCMAKE_BUILD_TYPE=Release >/dev/null || + fail "cmake could not configure libCacheSim; see its scripts/install_dependency.sh" + cmake --build "$LCS/_build" --target cachesim -j >/dev/null || + fail "libCacheSim did not build" +} + +# decompress streams a .gz file to a reader that may stop early. The expansions +# exit once they reach LIMIT, which kills gzip with SIGPIPE (status 141); under +# pipefail that would end the script midway through a trace. Any other failure +# still fails. +decompress() { + gzip -dc "$1" || [ "$?" -eq 141 ] +} + +# expand : one key per line on stdout, matching what the +# corresponding Go loader yields for the evidence suite. +expand() { + case "$1" in + twitter) # LoadTrace(TwitterFormat): comma-separated, key in column 1 + awk -F, -v lim="$LIMIT" 'NF >= 2 { k = $2; gsub(/^[ \t]+|[ \t]+$/, "", k); if (k == "") next; print k; if (++n >= lim) exit }' "$2" ;; + lirs) # LoadTrace(LIRSFormat): first whitespace field; lines starting with * are markers + decompress "$2" | awk -v lim="$LIMIT" 'index($0, "*") == 1 || NF == 0 { next } { print $1; if (++n >= lim) exit }' ;; + arc) # LoadARCTrace: "start count ..." stands for count consecutive blocks + decompress "$2" | awk -v lim="$LIMIT" 'NF >= 2 && $1 ~ /^[0-9]+$/ && $2 ~ /^[0-9]+$/ { for (i = 0; i < $2; i++) { print $1 + i; if (++n >= lim) exit } }' ;; + meta) # LoadMetaKVTrace: GET* rows only, columns by header name, op_count repeats, capped at 65536 + awk -F, -v lim="$LIMIT" 'NR == 1 { for (i = 1; i <= NF; i++) col[$i] = i; next } + { k = $col["key"]; c = $col["op_count"]; if (k == "" || c !~ /^[0-9]+$/ || toupper(substr($col["op"], 1, 3)) != "GET") next + if (c > 65536) c = 65536 + for (i = 0; i < c; i++) { print k; if (++n >= lim) exit } }' "$2" ;; + msr) # LoadMSRTrace: reads only, host:disk:block over every 512-byte block the range touches, capped at 65536 + decompress "$2" | awk -F, -v lim="$LIMIT" -v bs=512 'NF == 7 && $5 ~ /^ *[0-9]+ *$/ && $6 ~ /^ *[0-9]+ *$/ { + t = tolower($4); gsub(/ /, "", t); if (t != "read") next + off = $5 + 0; sz = $6 + 0; if (sz == 0) next + s = int(off / bs); last = s + int((sz - 1 + off % bs) / bs); c = last - s + 1; if (c > 65536) c = 65536 + h = $2; d = $3; gsub(/ /, "", h); gsub(/ /, "", d) + for (i = 0; i < c; i++) { print h ":" d ":" (s + i); if (++n >= lim) exit } }' ;; + *) fail "unknown expander $1" ;; + esac +} + +python3 "$ROOT/scripts/trace_inputs.py" "$TRACES" +build_libcachesim +[ "$(git -C "$LCS" rev-parse HEAD)" = "$LIBCACHESIM_COMMIT" ] || + fail "$LCS is not at the pinned commit $LIBCACHESIM_COMMIT" + +WORK=$(mktemp -d) +trap 'rm -rf "$WORK"' EXIT +REFERENCE="$WORK/reference.tsv" +: >"$REFERENCE" + +echo "libCacheSim $LIBCACHESIM_COMMIT, LRU, object sizes ignored" +for entry in "${TRACE_LIST[@]}"; do + read -r file kind capacity <<<"$entry" + [ -s "$TRACES/$file" ] || fail "$file is absent from $TRACES; run ./scripts/fetch-traces.sh" + + expand "$kind" "$TRACES/$file" >"$WORK/keys.txt" + python3 "$ROOT/scripts/oracle_trace.py" "$WORK/keys.txt" "$WORK/keys.bin" + for m in "${GRID[@]}"; do + size=$(awk -v c="$capacity" -v m="$m" 'BEGIN { printf "%d", c * m }') + # cachesim writes a result directory into its working directory. + line=$(cd "$WORK" && "$CACHESIM" "$WORK/keys.bin" oracleGeneralBin lru "$size" \ + --ignore-obj-size true --num-thread 1 2>/dev/null | grep "miss ratio") || + fail "cachesim produced no result for $file at $size" + requests=$(sed -E 's/.*, +([0-9]+) req.*/\1/' <<<"$line") + miss=$(sed -E 's/.*miss ratio ([0-9.]+).*/\1/' <<<"$line") + printf "%s\t%s\t%s\t%s\n" "$file" "$size" "$requests" "$miss" >>"$REFERENCE" + printf " %-26s %6s %8s requests miss %s\n" "$file" "$size" "$requests" "$miss" + done +done + +echo +echo "Replaying the same traces through the Go loaders and LRU" +out=$(cd "$ROOT/bench" && AS_CACHE_TRACES="$TRACES" AS_CACHE_LRU_REFERENCE="$REFERENCE" \ + go test -count=1 -run '^TestLRUMatchesReference$' -v . 2>&1) || { + echo "$out" + fail "the Go replay does not match libCacheSim" +} +echo "$out" | grep -E '^\s+reference_test.go' || true +grep -q -- '--- PASS: TestLRUMatchesReference' <<<"$out" || { + echo "$out" + fail "TestLRUMatchesReference did not run to a pass" +} + +echo +echo "Reference gate passed: $(wc -l <"$REFERENCE" | tr -d ' ') points, libCacheSim $LIBCACHESIM_COMMIT." + +if [ -n "${AS_CACHE_REFERENCE_OUT:-}" ]; then cp "$REFERENCE" "$AS_CACHE_REFERENCE_OUT"; fi diff --git a/site/active-policy-timeline.svg b/site/active-policy-timeline.svg deleted file mode 100644 index 4ab06b3..0000000 --- a/site/active-policy-timeline.svg +++ /dev/null @@ -1,89 +0,0 @@ - - - - - -The cache picks its own policy: ActivePolicy() over time -phase-shift, 240,000 requests, 12 phases; Z — zipf, L — loop -Z - -L -Z - -L -Z - -L -Z - -L -Z - -L -Z - -L - -LRU - - -3% -LFU - - - - - -9% -TwoQueue - - - - - - -12% -ARC - - - - - - - -12% -TinyLFU - - - - - - - - - - - - -63% -share -The bandit tries the arms (TwoQueue, ARC, LFU, LRU), finds TinyLFU and holds it 63% of the time: -on this workload it is the best in both regimes, and there is nothing to switch to. - \ No newline at end of file diff --git a/site/bandit-explorer.html b/site/bandit-explorer.html deleted file mode 100644 index 0798692..0000000 --- a/site/bandit-explorer.html +++ /dev/null @@ -1,576 +0,0 @@ - - - - - -as-cache — how the bandit picks an eviction policy - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

as-cache · phase-shift

-

How a multi-armed bandit picks the eviction policy

-

- The cache holds seven policies at once: one serves the traffic, the rest - run as shadows and measure what would have happened had they been serving. - Every epoch the bandit looks at their hit rates and decides which one to - make active. Scrub along the timeline — below it you can see what the - bandit knew at that moment and why it chose what it chose. -

- -
- 240,000 requests - cache 500 entries - 12 phases, zipf ⇄ loop - final hit rate 73.5% -
- -
-
-

Active policy over time

-
- - -
-
-
- - -
-
-
- -
-
-

What the bandit knew at this moment

- -
-
- -
-

-
- -
- Show as a table - - - - - -
PolicyHit rateHitsMissesRole
-
- -
- Apple M1 Max · macOS 26.2 (arm64) · Go 1.25.5 · make evidence -
-
- - - - - diff --git a/site/index.html b/site/index.html index 64f08ee..e9fcb11 100644 --- a/site/index.html +++ b/site/index.html @@ -4,7 +4,7 @@ as-cache — Adaptive Selection Cache for Go - + @@ -13,23 +13,18 @@ - + - - - - - + - - +