Code Monkey home page Code Monkey logo

Comments (7)

PrayagS avatar PrayagS commented on May 26, 2024

Also noticing that most of my compactors are spending time in cleaning of aborted partial uploads, and cleaning of blocks marked for deletion. The latter makes sense but not sure of the former.

They keep on switching between this deletion process and compaction.

from thanos.

yeya24 avatar yeya24 commented on May 26, 2024

I had the impression that if I set a concurrency value equal to the no. of cores assigned, I should see a very high % of CPU used but instead, even with ~16 cores assigned and --compact.concurrency=16, % CPU used was still hovering around 10%.

Compaction might not be always happening. It wait for you have enough data to be compacted. Even if you specify 16 concurrency to compact blocks, it doesn't mean you always have 16 compaction jobs to run. You probably only have 1 then only 1 core is used. We don't support using more than 1 core within a single compaction job because it is now single-threaded.
The CPU usage pattern is like mostly idle -> CPU high during compaction time -> idle.

Before it actually compacts blocks, compactor might spend quite long time downloading required blocks and analyzing the index file so you might see CPU usage still low here as it is IO intensive.

from thanos.

PrayagS avatar PrayagS commented on May 26, 2024

You probably only have 1 then only 1 core is used. We don't support using more than 1 core within a single compaction job because it is now single-threaded.

Got it, that clears my confusion.

What's the definition of compaction job here? And in what scenario does more concurrency come into effect?

from thanos.

yeya24 avatar yeya24 commented on May 26, 2024

What's the definition of compaction job here?

A single compaction which produces 1 output block.

And in what scenario does more concurrency come into effect?

I can image if you have multiple clusters with different cluster labels, then multiple compaction jobs will be available since each cluster (they should have their own ext labels) will have its own compaction job at the same time.

Within a single compaction group, there might be multiple compaction jobs available (imaging you have a huge compaction backlog), but we only support 1 concurrency per group. This is a limitation in Thanos right now.

from thanos.

PrayagS avatar PrayagS commented on May 26, 2024

I can image if you have multiple clusters with different cluster labels, then multiple compaction jobs will be available since each cluster (they should have their own ext labels) will have its own compaction job at the same time.

I see. Is this configurable or does it only recognize the cluster label? Can it be configured to run different jobs for set of blocks differentiated via the prometheus label (cluster value is the same)?

Within a single compaction group, there might be multiple compaction jobs available (imaging you have a huge compaction backlog), but we only support 1 concurrency per group. This is a limitation in Thanos right now.

Ah that makes sense. Thanks for clarifying.

from thanos.

yeya24 avatar yeya24 commented on May 26, 2024

I see. Is this configurable or does it only recognize the cluster label? Can it be configured to run different jobs for set of blocks differentiated via the prometheus label (cluster value is the same)?

It is just different ext labels you configured. Doesn't have to be cluster label.

from thanos.

yeya24 avatar yeya24 commented on May 26, 2024

I will convert this into a discussion.

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.