Git Product home page Git Product logo

Comments (3)

yeya24 avatar yeya24 commented on June 15, 2024

Your usecase is for the Compactor to compact blocks created after 72h, correct? Based on your expectation, I think you should set max-time rather than min-time.

min-time is to compact blocks created within than a time window.

from thanos.

paibok avatar paibok commented on June 15, 2024

Hi @yeya24 ,

Thanks for your answer.

Actually, I'm currently working on a setup where I intend to retain only raw data for the first 30 days and then use the compactor to downgrade the data. I envisioned the following configuration for this purpose:

    thanos-compactor:
        image: quay.io/thanos/thanos:v0.30.2
        depends_on:
            - minio
        volumes:
            - ./bucket/:/etc/thanos/
        command:
            - 'compact'
            - '--log.level=debug'
            - '--data-dir=/data'
            - '--objstore.config-file=/etc/thanos/bucket.yaml'
            - '--wait'
            - '--compact.progress-interval=5m'
            - '--retention.resolution-1h=365d'
            - '--retention.resolution-5m=90d'
            - '--retention.resolution-raw=30d'
            - '--min-time=29d' 

For now, I'm just testing if the --min-time parameter works as expected.

According to the thanos documentation :

      --min-time=0000-01-01T00:00:00Z
                                Start of time range limit to compact.
                                Thanos Compactor will compact only blocks, which
                                happened later than this value. Option can be a
                                constant time in RFC3339 format or time duration
                                relative to current time, such as -1d or 2h45m.
                                Valid duration units are ms, s, m, h, d, w, y.

It appears I may have misunderstood the purpose of this parameter. To clarify, does "later" in this context imply a range from the current time up to 72 hours ago? If this interpretation is correct, why aren't my newer blocks (those younger than 72 hours) being compacted from 2-hour blocks to 4-hour/8-hour blocks, etc.?

Here a screenshot of my bucket blocks :

image

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.