-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
gc: benchmark effects of clear range on write heavy workloads #98157
Comments
cc @cockroachdb/replication |
Do you have a sense of why? Is it because the cycle length means that writes stall on clear range latches? Is it because the range tombstones affect write performance? And why do we see these spikes with clearrange disabled, considering we're using latchless GC? In any case, I'm not sure this workload is very representative, i.e. a cycle whose keys are continually rewritten but only after the GC TTL has passed. Maybe if one considered a periodic ingest/truncate of a table, but in that case one would likely use
Do you have a sense of the threshold at which clear ranges become beneficial? Is 2000 a good default value? |
It looks like 2000 is reasonable as it doesn't increase number or requests. It feels like when clear range is used we don't get dramatic performance increase, but we can have severe degradation if it is set low. It will mostly help if you have 1000s of versions or delete chunks of keys.
I don't think there's any latch contention going on. The test where there's an interference between writes and clear range request very quickly breaks key sequences so that GC stops issuing them. I think system gets less responsive because of additional CPU usage because collections are happening faster. It is hard to come up with some workload that would verify if we have key interference as if we write infrequently we won't hit same ranges as GC at the same time, and if we write frequently we break up ranges fast. And fixtures doesn't allow you to import history, they will choke on overlapping keys. |
Makes sense. I think we can close this out, thanks! |
In #90830 GC got the ability to use clear range requests when removing multiple subsequent keys.
Those range requests required locks which is a step back from latchless GC that was introduced in 22.1. While underlying assumptions is that we won't have conflicts because we won't be using range removes when data is heavily updated we need to ensure that is the case.
To verify run kv0 workload with row-level TTL or similar with and without clear range feature enabled and check the performance.
Jira issue: CRDB-25108
The text was updated successfully, but these errors were encountered: