dgraph-io / ristretto

A high performance memory-bound Go cache
https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/
Apache License 2.0
5.64k stars 374 forks source link

[QUESTION]: Ristretto hit ratio benchmark result #336

Closed Yiling-J closed 3 months ago

Yiling-J commented 1 year ago

Question.

Run arc-s3 benchmark in https://github.com/dgraph-io/benchmarks, set MaxCost to 500000 and I got the following result:

name       , label         , go,  mop/s,  ns/op, ac, byt, hits    , misses  ,   ratio
ristretto  , hits-arc-s3   ,  0, ------, ------, --, ---, 00172676, 16235026,   1.05%

My question is about this 1.05% ratio, is this the real hit ratio? From the Ristretto README Benchmarks, the s3 hit ratio with 500000 capacity should be around 50%.

I ask this because I'm developing a similar cache package using W-TinyLFU, I also write some benchmarks and Ristretto hit ratio in my benchmarks are all extreamly low, I think maybe my benchmarks are wrong, so I tried the official dgraph-io/benchmarks and ask here.

Yiling-J commented 1 year ago

hit ratio benchmark results of my package and ristretto: https://github.com/Yiling-J/go-cache-benchmark-plus

phuslu commented 9 months ago

Similar result in my linux server (oracle arm machine)

image

cc @Yiling-J @maypok86

github-actions[bot] commented 3 months ago

This issue has been stale for 60 days and will be closed automatically in 7 days. Comment to keep it open.