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

store-gateway: remove obsolete comments for fine-grained chunks caching #6892

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/storegateway/bucket_chunk_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ func (r *bucketChunkReader) loadChunks(ctx context.Context, res []seriesChunks,
return errors.Wrap(err, "populate chunk")
}
localStats.chunksTouched++
// Also account for the crc32 at the end. We ignore the bytes, but the counter for "returned" chunks with fine-grained caching
// also includes the size of crc32 and the length varint size encoding. By including it we can have a more accurate ratio of touched/returned for small chunks,
// Also account for the crc32 at the end. We ignore the bytes, but include the size of crc32 and the length varint size encoding.
// By including them we can have a more accurate ratio of touched/returned for small chunks,
// where the crc32 + length varint size are a substantial part of the chunk.
localStats.chunksTouchedSizeSum += varint.UvarintSize(chunkDataLen) + chunkEncDataLen + crc32.Size
}
Expand Down
5 changes: 2 additions & 3 deletions pkg/storegateway/series_chunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ const (
// number of chunks (across series).
seriesChunksSlabSize = 1000

// Selected so that many chunks fit within the slab size with low fragmentation, either when
// fine-grained chunks cache is enabled (byte slices have variable size and contain many chunks) or disabled (byte slices
// are at most 16KB each).
// Selected so that many chunks fit within the slab size with low fragmentation, because
// byte slices are at most 16KB each as received by the caching bucket.
chunkBytesSlabSize = 160 * 1024

// Selected so that most series fit it and at the same time it's not too large for requests with few series.
Expand Down