Giter VIP home page Giter VIP logo

Comments (3)

petermattis avatar petermattis commented on August 20, 2024

@Ryanfsdf this is the issue I mentioned yesterday while we were chatting.

from pebble.

petermattis avatar petermattis commented on August 20, 2024

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.

petermattis avatar petermattis commented on August 20, 2024

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)

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.