Merge pull request #112299 from shyamjvs/gzip-level-change

Reduce default gzip compression level from 4 to 1 in apiserver
This commit is contained in:
Kubernetes Prow Robot 2022-09-07 15:28:38 -07:00 committed by GitHub
commit 8287e21228
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -144,8 +144,10 @@ var gzipPool = &sync.Pool{
}
const (
// defaultGzipContentEncodingLevel is set to 4 which uses less CPU than the default level
defaultGzipContentEncodingLevel = 4
// defaultGzipContentEncodingLevel is set to 1 which uses least CPU compared to higher levels, yet offers
// similar compression ratios (off by at most 1.5x, but typically within 1.1x-1.3x). For further details see -
// https://github.com/kubernetes/kubernetes/issues/112296
defaultGzipContentEncodingLevel = 1
// defaultGzipThresholdBytes is compared to the size of the first write from the stream
// (usually the entire object), and if the size is smaller no gzipping will be performed
// if the client requests it.