The State of Caching in Go - Dgraph Blog

(Aman Mangal) #22

yes, that’s correct.

(Ernesto Melgin) #23

What about this one?

(Aman Mangal) #24

@karl This looks interesting too, may want to check this out.

(Karl McGuire) #25

My preliminary benchmarks show that performance is particularly bad (the worst out of all of them, actually). I suspect that this is due to the heavy use of mutexes, channels, and interfaces. This violates requirements 1, 3, and 4.

The testing library is interesting though. I think I can draw some inspiration from that, at least.


Great post! I am currently looking for P-local storage in go to relieve the contention of lru list, but it turns out go never provides such features. It seems in your post that LRU sharding does not out-compete other strategies either. I guess I’ll look into TinyLFU for inspirations. LRU is just not working well at least in go.

(Manish R Jain) #27

We’re pretty close to releasing the cache we wrote which uses TinyLFU.