-
Notifications
You must be signed in to change notification settings - Fork 592
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
CORE-4600 - Quotas: disable produce quota by default #20142
CORE-4600 - Quotas: disable produce quota by default #20142
Conversation
/dt |
a22894d
to
cd79309
Compare
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.
Does what it says on the tin.
Can you add the benchmark?
I added it soon after raising the PR. I think if you refresh you should see it. |
I only see changes to |
If you mean that I should add new benchmarks, I haven't added any because the existing ones cover the change. Specifically these lines from the PR cover letter:
|
src/v/config/configuration.cc
Outdated
@@ -496,12 +496,13 @@ configuration::configuration() | |||
, target_quota_byte_rate( | |||
*this, | |||
"target_quota_byte_rate", | |||
"Target request size quota byte rate (bytes per second) - 2GB default", | |||
"Target request size quota byte rate (bytes per second) - disabled " |
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 does "disabled" mean in this description? It's disabled by default? Or 0
= disabled
?
Also, no need to explicitly mention the default number in the description, even if it's referenced in another object
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.
It's disabled by default? Or 0 = disabled?
Both yes.
Also, no need to explicitly mention the default number in the description, even if it's referenced in another object
I am happy to remove it, but I'm wondering what's the best way to describe that 0 is a sentinel value for disabled since unfortunately target_quota_byte_rate
is an integer and not an optional integer. I'm wondering if rewriting the end to - 0 means disabled
would make the most sense. What do you think @Deflaimun?
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 would simply remove the default value from the description. In docs website we can add this extra info.
If you really want to have it in the description maybe something like
"Target request size quota byte rate (bytes per second) - (default: "0" - disabled)
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.
Thank you! Sounds good, I've removed the ending now.
src/v/config/configuration.cc
Outdated
@@ -496,12 +496,13 @@ configuration::configuration() | |||
, target_quota_byte_rate( | |||
*this, | |||
"target_quota_byte_rate", | |||
"Target request size quota byte rate (bytes per second) - 2GB default", | |||
"Target request size quota byte rate (bytes per second) - disabled " |
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.
"Target request size quota byte rate (bytes per second) - disabled " | |
"Target request size quota byte rate (bytes per second)", |
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.
Done
src/v/config/configuration.cc
Outdated
@@ -496,12 +496,13 @@ configuration::configuration() | |||
, target_quota_byte_rate( | |||
*this, | |||
"target_quota_byte_rate", | |||
"Target request size quota byte rate (bytes per second) - 2GB default", | |||
"Target request size quota byte rate (bytes per second) - disabled " | |||
"default (= 0)", |
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.
"default (= 0)", |
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.
Done
* Reinterpret the 0 value of `target_quota_byte_rate` as disable (this is safe as previously the minimum value was 1MB, so noone has this set to 0) * Change the default value to be disabled
Minimize the impact of client quota management in the default (and expectly most common case) of having no quotas configured.
cd79309
to
19e138d
Compare
Force-pushed to improve the config description as per feedback. |
During performance testing it became apparent that the overhead of quota management, while small, is non-negligible (~400ns/request). It is believed that some of our latency sensitive customers would prefer to avoid having this overhead on the request path. Therefore, this PR adds the ability to disable the produce quota config and sets it to disabled by default.
This is implemented without changing the configuration type (from
bounded_property<uint32_t>
toproperty<std::optional<uint32_t>>
), instead I opted to use 0 as a sentinel value for disabled. Locally, I tested the change toproperty<std::optional<uint32_t>>
as well, and it seems to work since the values are serialized toss::sstring
into the controller log and the serialized values ofuint32
seem to be a subset of those ofoptional<uint32>
. However, it still seems lower risk to just use a sentinel value here because it's hard to pin down and test all the places where the config values are serialized into a yaml/json and how those serializations will change if we change the config value into astd::optional<uint32_t>
. Since these configs are deprecated and going to be removed in 2 major versions, I believe this is a reasonable trade off.Fixes https://redpandadata.atlassian.net/browse/CORE-4600
Benchmark results
As expected, all the benchmarks that have the quotas off improve - which now also includes the default case for produce.
Backports Required
Release Notes
Improvements
target_quota_byte_rate
) is now disabled by default. Previously this was enabled at 2GB/shard/client.id.