-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added multithreading support to thanos compact #265
Conversation
82bca48
to
aa26f02
Compare
if tc.config.compactConcurrency != 1 then [ '--compact.concurrency=' + tc.config.compactConcurrency] else [] | ||
) + ( | ||
if tc.config.downsampleConcurrency != 1 then ['--downsample.concurrency=' + tc.config.downsampleConcurrency] else [] | ||
) + ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about skipping the equals 1 check and always explicitly setting the two flags?
This way users can always know the concurrency without knowing the default value is 1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will get that done for you.
9ae5bd8
to
456f133
Compare
…to thanos compact Signed-off-by: Andreas Dreyer Hysing <andreashysing@gmail.com>
456f133
to
809da52
Compare
Thank you! One small nit, can you please fix the lint issue? |
Signed-off-by: Andreas Dreyer Hysing <andreashysing@gmail.com>
I have a hard time figuring out what that latest crash is all about... Job "build" crashed with exit code 1. |
@ahysing I guess you need to run generate to regenerate yamls. |
Signed-off-by: Andreas Dreyer Hysing <andreashysing@gmail.com>
Thank you for the contribution! @ahysing |
THIS IS WORK IN PROGRESS
Changes
--compact.concurrency
to thanos compact statefulset--downsample.concurrency
to thanos compact statefulsetThis change adds the flag
--compact.concurrency
to the thanos compact StatefulSet. This sets the number of goroutines used during compaction. Set this number to any valueX
greater than one, and thanos compact will be fixed to the given number of threads. this feature requiresX
times more CPU and memory to thanos compact as stated on Resources > Cpu. The default is one goroutine.This change also adds the flag
--downsample.concurrency
to the thanos compact StatefulSet. This sets the number of goroutines used during downsampling. Resources > Flags this flag. The default is to run on one goroutine.Verification
Then built with the regular routines
Added two new flags to example.json downsampleConcurrency: 2, and compactConcurrency: 2 right in line 58:
At the end of the file add a thanos compactor by adding one line
Performed a build with
bash build.sh example.jsonnet
. Inspect the output and verify that the file in /manifests looks OK.Output from tests