dgraph-io / ristretto

A high performance memory-bound Go cache

Home Page:https://dgraph.io/blog/post/introducing-ristretto-high-perf-go-cache/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[QUESTION]: Ristretto hit ratio benchmark result

Yiling-J opened this issue · comments

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.

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

Similar result in my linux server (oracle arm machine)

image

cc @Yiling-J @maypok86

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