GithubHelp home page GithubHelp logo

Comments (7)

kk3399 avatar kk3399 commented on April 27, 2024 2

i am thinking to get the batching part work on top of this one https://github.com/golang/groupcache/tree/master/lru and compare before, after hit ratio and ops/sec

@mangalaman93 i see that this one has hit ratio https://github.com/dgryski/trifles/tree/master/cachetest
does this provide ops/sec https://github.com/dgraph-io/benchmarks/blob/master/cachebench/cache_bench_test.go ?

here is what the plan looks like -

from ristretto.

kk3399 avatar kk3399 commented on April 27, 2024 1

@mangalaman93 true 😞

looks like the golang CI is running on top of master branch, should it be running on the PR branch instead? #11

also i signed CLA after creating the PR, should i abandon the PR and create it again?

from ristretto.

ben-manes avatar ben-manes commented on April 27, 2024

Read buffer
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedBuffer.java

Striping:
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/StripedBuffer.java

Write Buffer
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/MpscGrowableArrayQueue.java

Schedule after read
https://github.com/ben-manes/caffeine/blob/91eec88be93f16549ce82dd2f17959fd8eba75dd/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java#L1106

Schedule after write
https://github.com/ben-manes/caffeine/blob/91eec88be93f16549ce82dd2f17959fd8eba75dd/caffeine/src/main/java/com/github/benmanes/caffeine/cache/BoundedLocalCache.java#L1310

from ristretto.

ben-manes avatar ben-manes commented on April 27, 2024

buffered non lossy channel for writes initially one per client, but may add more upto max if the channel is full

I used a single write buffer because the throughput is limited by the hash table operation, since its synchronized per entry. I didn't observe the write buffer as a contention point.

when finally applying changes, write channel gets priority over reads or the perceived order needs to be preserved?

I processed reads before writes to update the policy prior to removal. The replay order probably doesn't matter, especially when later moving off LRU so it is less predictable in tests.

from ristretto.

mangalaman93 avatar mangalaman93 commented on April 27, 2024

@kk3399 when you add the base LRU to repo, I will move the benchmarks, both performance and hit ratio benchmarks, to this repo too.

from ristretto.

kk3399 avatar kk3399 commented on April 27, 2024

@mangalaman93 looks like neither branch creation not commits on master are allowed?

from ristretto.

mangalaman93 avatar mangalaman93 commented on April 27, 2024

I think you can just fork the repo and work in your own fork and then, create PRs. That'd be the simplest approach.

from ristretto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.