Skip to content

Question - Help with setting the correct options for dgraph-io/badger #196

@jarifibrahim

Description

@jarifibrahim

Hey @klauspost, thank you for writing this amazing library in Go. I work on https://github.com/dgraph-io/badger and we'd like to use this library instead of the CGO based ZSTD implementation.
We had a small chat about this a while ago https://discuss.dgraph.io/t/badger-compression-feedback/5478

Here's what we're compressing in badger
Badger stores key-values in a table called SST. Each SST is divided into blocks of 4KB by default. We'd like to compress these blocks.

Compression of the blocks is a one-time thing but decompression happens every time a new block is accessed (this is a frequent operation).

I understand that https://github.com/klauspost/compress/tree/master/zstd#blocks can be used to compress small blocks but is 4KB considered as a small block?

We'd like to have a fair tradeoff between the decompression speed and compression ratio.

I see that there are a bunch of options for encoding and decoding but because of my limited knowledge about how ZSTD works, I can't seem to figure out which ones should be tweaked.
I'd really appreciate it if you can help me pick the appropriate options for encoding/decoding :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions