Skip to content
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

"Aggressive" optimizations mode #66

Open
GiedriusS opened this issue Oct 5, 2022 · 4 comments
Open

"Aggressive" optimizations mode #66

GiedriusS opened this issue Oct 5, 2022 · 4 comments

Comments

@GiedriusS
Copy link
Member

There are some optimizations that are not done in Prometheus PromQL engine due to backward compatibility. However, those use cases that they are trying not to break only really matter to a few percent of the users. Thus, I suggest adding some kind of new parameter to the engine which would add an optimization pass to the given PromQL expression. The results/behavior wouldn't be strictly compatible with the original PromQL but I think that doesn't matter to Thanos/Cortex/... users anyway.

Some candidates:

@fpetkovski
Copy link
Collaborator

This makes sense. I did not understand why propagating labels across bin-ops is a breaking change though. We might want to document this well once we implement it.

@GiedriusS
Copy link
Member Author

Because apparently there are "storages" which return data that does not strictly match the given matchers 😄 however, I think it's probably such a rare use-case that we could enable such optimizations by default.

@fpetkovski
Copy link
Collaborator

fpetkovski commented Oct 17, 2022

Makes sense to have this enabled by default in Thanos at least. It shouldn't be too hard to implement, we just need to handle the vector matching in cases like:
metric_1 / on(label_1) group_left metric_2{label_2="value_2"}

@bwplotka
Copy link
Member

bwplotka commented Oct 31, 2022

Happy to configure different optimizers in future. But it should case driven. I can't see anything "too aggressive" so far 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants