-
Notifications
You must be signed in to change notification settings - Fork 24k
Add configuration options for variables in activeExpireCycle #5843
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
Conversation
- Add option for number keys looked at on each iteration and option to configure if the loop should keep trying - Update example configuration
Hello @tejom, thanks for the PR! I think I'll end merging this in Redis 5 & unstable even if unstable is going to get a completely different implementation of expire soon, because Redis 5 will likely be used as the main Redis system for another 1/2 years in many shops. Before merging, given that this will hit a production release, I want to check why there was this obscure slowdown reported in the blog during the development. I'll ping you shortly. |
Hey @antirez sounds good. I didn't miss anything from you did I? |
@tejom Hi again! In the blog post you say that commenting the conditional made no difference because you use only one database. However I want to understand if you have Redis explicitly configured to have just one database, that is, what is the value of |
@antirez Oh I see. Yeah it had the default configured of 16. I wish I wrote that section better now, and there wasn't such a long time between working on this, writing and finally getting to publish it. I guess still this ends up not doing anything in this test? The variable never changes. It would be one db used and 16 configured by default.
would just be this and skip over it every time
|
@antirez Any update on when this might get accepted? |
Hello @madolson, I'm waiting to have a bit of time to check this PR because while I think it is a great addition, I'm not sure it should be exposed to the user in such terms of iterations / divisor, that are implementation details. |
Hi @antirez. Checking in to see if you had considered this PR any further? My team is facing an issue almost exactly like what the Twitter team detailed in their blog. I'm very hopeful that either this or the radix tree based implementation you made reference to for Redis 6 could make a big improvement for us. My own two cents - Exposing this seems very similar to maxmemory-samples. I could see a concern in exposing direct division as an implementation detail. Perhaps instead of making the divisor itself configurable, it could instead be like a "target %" config? For example, instead of using a config value of 4 to represent that it should continue if more than 25%, 25 itself could be the config value? The divisor would then be something like |
This seems to be a slightly different approach than what was finally merged here: 84b01f6 (I couldn't find a relevant issue/pr). Lines 1118 to 1133 in c7dc17f
I guess this should be closed. |
Right, IIRC this, and other discussions with Twitter is what lead Salvatore to implement the changes in 84b01f6. For the record, the big difference between the two approaches, is that this PR exposes tunables of the internal implementation in redis to the config, something that creates coupling with the internals, and means it'll be harder to later change. Closing this one, feel free to post more details or open another PR if the latest code in |
Add option for number keys looked at on each iteration and option to configure if the loop should keep trying
Update example configuration