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

admission: integrate TTL scans with AC read bandwidth limiter #121782

Open
Tracked by #121779
aadityasondhi opened this issue Apr 4, 2024 · 2 comments
Open
Tracked by #121779

admission: integrate TTL scans with AC read bandwidth limiter #121782

aadityasondhi opened this issue Apr 4, 2024 · 2 comments
Labels
A-admission-control C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-admission-control Admission Control

Comments

@aadityasondhi
Copy link
Collaborator

aadityasondhi commented Apr 4, 2024

We have seen full table scans that occur as part of row-level TTL cause overload by saturating the read bandwidth on a node.

Note: as of #124184, the default ttl_delete_rate_limit is being set to 100 (used to be unlimited). For resolving this issue, we may want to set that cluster setting back to unlimited in the tests that cover this issue.

Jira issue: CRDB-37530

Epic CRDB-37479

@aadityasondhi aadityasondhi added C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) A-admission-control T-admission-control Admission Control labels Apr 4, 2024
@rafiss
Copy link
Collaborator

rafiss commented Apr 19, 2024

Just to clarify, TTL does not do a full table scan, per se. Each leaseholder node of the table scans only the ranges it holds the lease for. There are two levels of concurrency:

  • Work is spread across leaseholders, which all do their scans at the same time.
  • Within each leaseholder, there are GOMAXPROCS goroutines working concurrently.

This parallelism is probably one of the reasons why read bandwidth can get saturated.

@rafiss
Copy link
Collaborator

rafiss commented Apr 19, 2024

Also, each of the goroutines mentioned above will delete the keys from the range immediately after it scans the range. Does the TTL code also need to integrate with the disk write traffic limiter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-admission-control C-enhancement Solution expected to add code/behavior + preserve backward-compat (pg compat issues are exception) T-admission-control Admission Control
Projects
None yet
Development

No branches or pull requests

2 participants