Comments (3)
@Ryanfsdf this is the issue I mentioned yesterday while we were chatting.
from pebble.
RocksDB provides this functionality via WriteBufferManager
. The way it works is that WriteBufferManager
pins a series of "virtual" entries in the cache. These entries actually contain no data, but the are marked as being 256KB in size. I believe 256KB entries are used, rather than the actual memtable size, so that space can be reserved by each shard in the cache.
Pebble currently has no support for entries like this in its cache. An alternative approach is to directly model reserved space in the cache, which can then distributed that reservation to each of the shards.
from pebble.
Reserving space in the cache is easy, but we don't currently have a signal as to when a memtable is unused. Instead we rely on GC to reclaim the memtable memory. I suppose we could use a finalizer, but those are generally frowned upon and touch rarely used code paths in the GC. It might be better to explicit track memtable references. There are not too many of them: DB.mu.mem.queue
and readState.flushables
. I can't think of any others right now.
Explicit tracking would also open up the possibility of recycling the memtable memory, rather than waiting for the GC to reclaim it.
from pebble.
Related Issues (20)
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 6
- TestDBCompactionCrash hangs on Windows
- : failed HOT 2
- metrics: m.Compact.Duration decreases and causes panic HOT 1
- [ignore] Test Exalate sync
- db: improve context propagation for tracing of slow block loads
- [ignore] Test Exalate syncing
- [ignore] Testing sync
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 3
- prototype modular bloom filters HOT 1
- db: offload downloads to objprovider to reduce cache and db.mu churn
- github.com/cockroachdb/pebble/internal/metamorphic: TestMeta failed HOT 4
- : failed HOT 7
- db: Download should use block cache for metadata/index block lookups
- github.com/cockroachdb/pebble/internal/metamorphic: TestMetaTwoInstance failed
- don't use filter blocks for large flushable ingests HOT 1
- smart filter block loading
- improve performance of aggregations over a key range using range annotations
- db: strictly enforce prefix in internalIterator.SeekPrefixGE
- sstable: show filenum when sstable metadata is corrupted
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 pebble.