Code Monkey home page Code Monkey logo

Comments (3)

pelzerim avatar pelzerim commented on July 21, 2024 1

Is it possible to implement some kind of sharding in your cluster? Thanos supports sharding using re-labelling: https://thanos.io/tip/thanos/sharding.md/#relabelling With sharding, compactors can create sharded smaller blocks and you'll likely not run into this hard limit.

@harry671003 Thanks for the prompt response. I have checked this out but it is super unclear to me how i would apply this.

The metrics come from 26 clusters and are all tagged with a globally unique label per cluster. We have 3 large receivers and all clusters write to a single remote write endpoint.

So for example is it possible to run 2 compactor instances each responsible for half the clusters? Would they not drop all blocks as we have a single remote write for all clusters?

See: https://github.com/prometheus/prometheus/blob/main/tsdb/docs/format/index.md#symbol-table.

Do i understand this correctly that dropping labels (for example uid) will reduce the size of this table?

from thanos.

harry671003 avatar harry671003 commented on July 21, 2024

This is a hard limit in the symbol table size in Prometheus TSDB of 4GB.
See: https://github.com/prometheus/prometheus/blob/main/tsdb/docs/format/index.md#symbol-table. The length field in the symbol table cannot exceed 4 bytes which limits the size to 2^32 bytes.

Is it possible to implement some kind of sharding in your cluster? Thanos supports sharding using re-labelling: https://thanos.io/tip/thanos/sharding.md/#relabelling
With sharding, compactors can create sharded smaller blocks and you'll likely not run into this hard limit.

from thanos.

harry671003 avatar harry671003 commented on July 21, 2024

I have checked this out but it is super unclear to me how i would apply this.

I'll admit that I haven't used this myself. Full disclaimer, I work on Cortex, another project that shares some code with Thanos. Maybe you can reach out on the Thanos slack channel asking for help.

Do i understand this correctly that dropping labels (for example uid) will reduce the size of this table?

Yes. The symbol table contains all the unique label strings. Dropping high cardinality labels will reduce the size of the symbol table.

from thanos.

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.