GithubHelp home page GithubHelp logo

Comments (6)

ajkr avatar ajkr commented on April 28, 2024

If mmap() and storing the data uncompressed are both OK then plain table may be of use - https://github.com/facebook/rocksdb/wiki/PlainTable-Format, https://github.com/facebook/rocksdb/wiki/RocksDB-In-Memory-Workload-Performance-Benchmarks

Otherwise you'd use block-based table and configure a large enough block cache to hold everything in memory.

Beyond that, what features to use depends on your workload/requirements

from rocksdb.

ChangqingChen avatar ChangqingChen commented on April 28, 2024

If mmap() and storing the data uncompressed are both OK then plain table may be of use - https://github.com/facebook/rocksdb/wiki/PlainTable-Format, https://github.com/facebook/rocksdb/wiki/RocksDB-In-Memory-Workload-Performance-Benchmarks

Otherwise you'd use block-based table and configure a large enough block cache to hold everything in memory.

Beyond that, what features to use depends on your workload/requirements

plaintable is an SST file that supports pure memory. What do I do if I want to use pure memory functionality?

from rocksdb.

ChangqingChen avatar ChangqingChen commented on April 28, 2024

If mmap() and storing the data uncompressed are both OK then plain table may be of use - https://github.com/facebook/rocksdb/wiki/PlainTable-Format, https://github.com/facebook/rocksdb/wiki/RocksDB-In-Memory-Workload-Performance-Benchmarks

Otherwise you'd use block-based table and configure a large enough block cache to hold everything in memory.

Beyond that, what features to use depends on your workload/requirements

rocksdb::Options options;
options.table_factory.reset(NewPlainTableFactory());
options.prefix_extractor.reset(NewFixedPrefixTransform(8));
options.allow_mmap_reads = true;

Is that the way?

from rocksdb.

ajkr avatar ajkr commented on April 28, 2024

Yes. Just make sure the prefix_extractor you are setting reflects what kind of range scans you will be doing (with plain table, range scan needs to be within a key prefix). If you aren't doing range scans you could try using NewNoopTransform().

from rocksdb.

ChangqingChen avatar ChangqingChen commented on April 28, 2024

allow_mmap_reads

If I use PlainTable, do I need to set BlockCache?

from rocksdb.

ajkr avatar ajkr commented on April 28, 2024

There is no way to set block cache for plain table users. That is usually OK since block cache's usual purpose is caching block-based table blocks. There won't be any such blocks for plain table users.

from rocksdb.

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.