Repository navigation
gocache/awscache/blobserver: queue fills past the concurrency limit - #25
Merged
Merged
Conversation
winckler
approved these changes
Nov 24, 2026
winckler
left a comment
There was a problem hiding this comment.
If I understand correctly, this PR is making two main changes: creates the queue and increase the maxFills at the same time.
My suggestion is to implement the queue first, keeping the maxFills, and than looking at the data, to see if the maxFills need to be increased. My worry is that too much concurrency might decrease the performance, and will be hard to observe if we make both changes at once.
Raise the limit of fills from S3 in progress from 64 to 128. The comment on maxFills gives the estimates of peak S3 GETs/s and throughput for 64, 128, and 256 fills, from the blob sizes in production and the S3 Standard latencies of a first read after a write. Before, a GET miss or a POST past the limit dropped the fill, so whether a hot blob got onto disk depended on how many other fills were in progress at that moment. Now the server still sends 404 at once on a GET miss, but it puts the blob in a FIFO queue of fills. When a fill ends, its goroutine starts the next fill in the queue, skipping blobs that are now on disk. A blob is in the queue at most once. The queue holds at most 1,000,000 blobs, so that its memory is bounded; only past that does the server drop a fill. Add the gocache_blobserver_fills_queued gauge and the "queued" result of gocache_blobserver_warms_total. The "busy" result now means that the queue is full. Updates tailscale/corp#51930 Signed-off-by: Tom Proctor <tomhjp@users.noreply.github.com>
tomhjp
force-pushed
the
tomhjp/bump-concurrency
branch
from
November 24, 2026 17:23
6319c39 to
2f523da
Compare
Member
Author
|
I bumped the concurrency down to 128 with some justification based on our current production load and some measurements I took while benchmarking S3. I think this is pretty conservative now, and has better reasoning - 64 was just plucked out of thin air before 😄 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Raise the limit of fills from S3 in progress from 64 to 1024.
Before, a GET miss or a POST past the limit dropped the fill, so whether a hot blob got onto disk depended on how many other fills were in progress at that moment. Now the server still sends 404 at once on a GET miss, but it puts the blob in a FIFO queue of fills. When a fill ends, its goroutine starts the next fill in the queue, skipping blobs that are now on disk. A blob is in the queue at most once. The queue holds at most 1,000,000 blobs, so that its memory is bounded; only past that does the server drop a fill.
Add the gocache_blobserver_fills_queued gauge and the "queued" result of gocache_blobserver_warms_total. The "busy" result now means that the queue is full.
Updates tailscale/corp#51930