Comments (3)
Hi, this is a small feature of the strategy that otter uses to reduce contention (also used by ristretto, theine, ccache, caffeine, moka...). Write operations are performed asynchronously in the background. As Ben has already pointed out in this issue, in languages with GC, it doesn't make much sense to be too strict in this case.
from otter.
Oh, I guess you only process read events when that buffer is full. That takes a while since the selection is random, so on this test eviction was fifo (insertion order) because it evicted before enough reads accumulated.
Would it make sense to drain the read buffers during the write processing before triggering an eviction? That’s what I did, but could easily argue it’s an unnecessary change as unit tests don’t often reflect real world behavior.
from otter.
Oh, I guess you only process read events when that buffer is full.
I did this simply because historically all caches in Go that use BP-Wrapper process read events only when the buffer is full. (ristretto, theine).
Would it make sense to drain the read buffers during the write processing before triggering an eviction?
Maybe yes, but I haven't heard about problems because of this in otter and other caches. I also didn't see anything suspicious in the tests close to reality (zipf distributions and some real-world traces). So far, removing prefetching seems to be a higher priority, as well as recalculating the test results for ristretto. As it turned out, there is nothing wrong with its core. Dgraph just broke the default behavior of ristretto and almost nowhere wrote about it. As a result, a huge number of current clients have an extremely low hit ratio.
Adding this parameter broke the behavior of clients who use cost = 1. It is absolutely not obvious that the size of metadata will be taken into account when setting capacity. There is also nothing about this parameter in the README (there are other parameters) :(.
from otter.
Related Issues (20)
- v2 contracts HOT 29
- List of keys in the cache HOT 1
- About use module "github.com/dolthub/maphash" HOT 5
- [BUG] About S3-FIFO evict HOT 2
- Add the copied map version HOT 4
- Question about the hashtable.Map growThreshold HOT 2
- [BUG] Capacity overflowing uint32 HOT 9
- is there a function to return the number of hits for an "object"? HOT 3
- Question about add node to Variable HOT 1
- How the cost works? HOT 4
- concurrent access slice HOT 2
- Set to invalid hashmap in concurrent situation HOT 7
- [BUG] The capacity of cache not work HOT 3
- About expiration performance HOT 3
- [BUG] The checkedAdd method will not return maxInt64 in case of overflow HOT 1
- is there any example of "DeletionListener" func?when i use "DeletionListener", it didn't worked HOT 2
- [BUG] DeletionListener not triggering consistently HOT 1
- Add a constructor which accepts some number of option functions
- Implement the fmt.Stringer interface for the DeletionReason type
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from otter.