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

Change all the lazyfree configurations to yes by default #913

Merged

Conversation

enjoy-binbin
Copy link
Member

@enjoy-binbin enjoy-binbin commented Aug 14, 2024

Set replica-lazy-flush and lazyfree-lazy-user-flush to yes by default.

There are many problems with running flush synchronously. Even in
single CPU environments, the thread managers should balance between
the freeing and serving incoming requests.

Set lazy eviction, expire, server-del, user-del to yes by default

We now have a del and a lazyfree del, we also have these configuration
items to control: lazyfree-lazy-eviction, lazyfree-lazy-expire,
lazyfree-lazy-server-del, lazyfree-lazy-user-del. In most cases lazyfree
is better since it reduces the risk of blocking the main thread, and
because we have lazyfreeGetFreeEffort, on those with high effor (currently
64) will use lazyfree.

Part of #653.

There are many problems with running flush synchronously. Even in
single CPU environments, the thread managers should balance between
the freeing and serving incoming requests.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin
Copy link
Member Author

Copy link

codecov bot commented Aug 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.16%. Comparing base (131857e) to head (02121d9).
Report is 55 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable     #913      +/-   ##
============================================
- Coverage     70.37%   70.16%   -0.21%     
============================================
  Files           112      112              
  Lines         61492    61490       -2     
============================================
- Hits          43273    43146     -127     
- Misses        18219    18344     +125     
Files with missing lines Coverage Δ
src/config.c 78.69% <ø> (ø)

... and 24 files with indirect coverage changes

@madolson madolson added major-decision-pending Major decision pending by TSC team release-notes This issue should get a line item in the release notes labels Aug 14, 2024
@madolson
Copy link
Member

@valkey-io/core-team I guess let's vote on all of these. This sounds like a good change to me.

@enjoy-binbin enjoy-binbin changed the title Set replica-lazy-flush and lazyfree-lazy-user-flush to yes by default Change all the lazyfree configurations to yes by default Aug 15, 2024
Signed-off-by: Binbin <[email protected]>
Signed-off-by: Binbin <[email protected]>
Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, just some comment about the documentation.

At some point, we should copy (or move) this documentation to a proper doc page.

Signed-off-by: Binbin <[email protected]>
Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin added the run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP) label Aug 15, 2024
@madolson madolson added major-decision-approved Major decision approved by TSC team and removed major-decision-pending Major decision pending by TSC team labels Aug 19, 2024
@madolson madolson requested a review from zuiderkwast August 26, 2024 15:12
@madolson madolson merged commit 70624ea into valkey-io:unstable Sep 2, 2024
56 checks passed
enjoy-binbin added a commit that referenced this pull request Sep 2, 2024
Test failed because these two PRs #865 and #913.

Signed-off-by: Binbin <[email protected]>
@enjoy-binbin enjoy-binbin deleted the update_flush_configurations branch September 3, 2024 00:19
zuiderkwast added a commit that referenced this pull request Sep 3, 2024
…ult (#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to #913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
madolson pushed a commit that referenced this pull request Sep 3, 2024
## Set replica-lazy-flush and lazyfree-lazy-user-flush to yes by
default.
There are many problems with running flush synchronously. Even in
single CPU environments, the thread managers should balance between
the freeing and serving incoming requests.

## Set lazy eviction, expire, server-del, user-del to yes by default
We now have a del and a lazyfree del, we also have these configuration
items to control: lazyfree-lazy-eviction, lazyfree-lazy-expire,
lazyfree-lazy-server-del, lazyfree-lazy-user-del. In most cases lazyfree
is better since it reduces the risk of blocking the main thread, and
because we have lazyfreeGetFreeEffort, on those with high effor
(currently
64) will use lazyfree.

Part of #653.

---------

Signed-off-by: Binbin <[email protected]>
madolson pushed a commit that referenced this pull request Sep 3, 2024
Test failed because these two PRs #865 and #913.

Signed-off-by: Binbin <[email protected]>
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
enjoy-binbin pushed a commit to enjoy-binbin/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
PingXie pushed a commit to PingXie/valkey that referenced this pull request Sep 14, 2024
…ult (valkey-io#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to valkey-io#913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
PingXie pushed a commit that referenced this pull request Sep 15, 2024
…ult (#983)

Before this doc update, the comments in valkey.conf said that DEL is a
blocking command, and even refered to other synchronous freeing as "in a
blocking way, like if DEL was called". This has now become confusing and
incorrect, since DEL is now non-blocking by default.

The comments also mentioned too much about the "old default" and only
later explain that the "new default" is non-blocking.

This doc update focuses on the current default and expresses it like
"Starting from Valkey 8.0, lazy freeing is enabled by default", rather
than using words like old and new.

This is a follow-up to #913.

---------

Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Ping Xie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
major-decision-approved Major decision approved by TSC team release-notes This issue should get a line item in the release notes run-extra-tests Run extra tests on this PR (Runs all tests from daily except valgrind and RESP)
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants