Skip to content

Commit

Permalink
chunks: update klauspost/compress package to v1.15.11 (#7263)
Browse files Browse the repository at this point in the history
**What this PR does / why we need it**:

Bring in various improvements from upstream, particularly
klauspost/compress#668

**Checklist**
- [x] Reviewed the `CONTRIBUTING.md` guide
- NA Documentation added
- NA Tests updated
- [x] `CHANGELOG.md` updated
- NA Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`

**Benchmarks**

(using changes from #7246, ignoring lines that didn't change much)

```
name                           old time/op      new time/op      delta
Write/ordered-flate-4              81.5ms ± 5%      78.7ms ± 2%    -3.39%  (p=0.016 n=5+5)
Read/none_66_kB-4                  4.16ms ± 6%      3.93ms ± 4%    -5.51%  (p=0.032 n=5+5)
Read/flate_66_kB-4                  168ms ± 4%       179ms ±11%    +6.50%  (p=0.032 n=5+5)
Read/zstd_66_kB-4                   334ms ±16%       152ms ± 3%   -54.57%  (p=0.008 n=5+5)
Read/none_262_kB-4                 3.93ms ± 1%      3.81ms ± 2%    -2.91%  (p=0.008 n=5+5)
Read/zstd_262_kB-4                  369ms ± 8%       131ms ± 1%   -64.62%  (p=0.008 n=5+5)
Read/zstd_524_kB-4                  466ms ±17%       146ms ± 2%   -68.68%  (p=0.008 n=5+5)
Read/sample_zstd_66_kB-4            420ms ±18%       224ms ± 1%   -46.69%  (p=0.016 n=5+4)
Read/sample_gzip_262_kB-4           214ms ± 1%       218ms ± 1%    +1.90%  (p=0.016 n=5+5)
Read/sample_zstd_262_kB-4           418ms ±21%       200ms ± 2%   -52.15%  (p=0.016 n=5+4)
Read/sample_zstd_524_kB-4           576ms ±35%       234ms ± 1%   -59.42%  (p=0.008 n=5+5)

name                           old speed        new speed        delta
Write/ordered-gzip-4              267MB/s ±10%     284MB/s ± 2%    +6.51%  (p=0.008 n=5+5)
Write/ordered-flate-4             274MB/s ± 4%     291MB/s ± 2%    +6.49%  (p=0.008 n=5+5)
Read/none_66_kB-4                1.82GB/s ± 6%    1.92GB/s ± 4%    +5.78%  (p=0.032 n=5+5)
Read/gzip_66_kB-4                 669MB/s ± 4%     698MB/s ± 1%    +4.30%  (p=0.008 n=5+5)
Read/zstd_66_kB-4                 425MB/s ±14%     930MB/s ± 3%  +119.12%  (p=0.008 n=5+5)
Read/none_262_kB-4               1.93GB/s ± 1%    1.99GB/s ± 2%    +3.00%  (p=0.008 n=5+5)
Read/gzip_262_kB-4                701MB/s ± 5%     721MB/s ± 2%    +2.96%  (p=0.032 n=5+5)
Read/zstd_262_kB-4                357MB/s ± 8%    1009MB/s ± 1%  +182.89%  (p=0.008 n=5+5)
Read/flate_524_kB-4               750MB/s ± 1%     763MB/s ± 1%    +1.74%  (p=0.008 n=5+5)
Read/zstd_524_kB-4                365MB/s ±18%    1149MB/s ± 2%  +215.34%  (p=0.008 n=5+5)
Read/sample_zstd_66_kB-4          341MB/s ±17%     616MB/s ± 9%   +80.67%  (p=0.008 n=5+5)
Read/sample_zstd_262_kB-4         318MB/s ±18%     658MB/s ± 2%  +107.08%  (p=0.016 n=5+4)
Read/sample_gzip_524_kB-4         521MB/s ± 1%     530MB/s ± 1%    +1.72%  (p=0.032 n=5+5)
Read/sample_zstd_524_kB-4         299MB/s ±28%     718MB/s ± 1%  +140.23%  (p=0.008 n=5+5)

name                           old %compressed  new %compressed  delta
Write/ordered-gzip-4                 6.89 ± 0%        6.73 ± 0%    -2.32%  (p=0.000 n=5+4)
Write/ordered-flate-4                6.89 ± 0%        6.69 ± 0%    -2.84%  (p=0.008 n=5+5)
Write/ordered-zstd-4                 6.17 ± 0%        6.16 ± 0%    -0.02%  (p=0.008 n=5+5)
Write/unordered-gzip-4               6.89 ± 0%        6.73 ± 0%    -2.32%  (p=0.008 n=5+5)
Write/unordered-flate-4              6.89 ± 0%        6.70 ± 0%    -2.81%  (p=0.000 n=4+5)
Write/unordered-zstd-4               6.17 ± 0%        6.16 ± 0%    -0.02%  (p=0.008 n=5+5)

name                           old alloc/op     new alloc/op     delta
Write/unordered-lz4-4              18.8MB ± 4%      17.8MB ± 1%    -5.28%  (p=0.008 n=5+5)
Read/gzip_66_kB-4                   713kB ± 0%       735kB ± 1%    +2.99%  (p=0.008 n=5+5)
Read/flate_66_kB-4                  715kB ± 0%       733kB ± 0%    +2.57%  (p=0.008 n=5+5)
Read/zstd_66_kB-4                   423MB ± 0%         1MB ± 0%   -99.65%  (p=0.016 n=5+4)
Read/gzip_262_kB-4                  198kB ± 0%       204kB ± 0%    +3.07%  (p=0.016 n=4+5)
Read/lz4-64k_262_kB-4               169kB ± 0%       169kB ± 0%    -0.07%  (p=0.000 n=5+4)
Read/flate_262_kB-4                 197kB ± 0%       205kB ± 0%    +3.77%  (p=0.008 n=5+5)
Read/zstd_262_kB-4                  553MB ± 0%         0MB ± 0%   -99.92%  (p=0.016 n=5+4)
Read/gzip_524_kB-4                 96.2kB ± 0%      98.8kB ± 0%    +2.71%  (p=0.016 n=4+5)
Read/flate_524_kB-4                95.4kB ± 0%      98.7kB ± 0%    +3.46%  (p=0.008 n=5+5)
Read/zstd_524_kB-4                  786MB ± 0%         1MB ± 6%   -99.93%  (p=0.008 n=5+5)
Read/sample_gzip_66_kB-4            686kB ± 0%       703kB ± 0%    +2.48%  (p=0.029 n=4+4)
Read/sample_flate_66_kB-4           688kB ± 0%       710kB ± 1%    +3.08%  (p=0.016 n=4+5)
Read/sample_zstd_66_kB-4            423MB ± 0%         2MB ± 0%   -99.59%  (p=0.016 n=5+4)
Read/sample_gzip_262_kB-4           194kB ± 0%       200kB ± 0%    +3.10%  (p=0.016 n=4+5)
Read/sample_flate_262_kB-4          194kB ± 0%       201kB ± 0%    +3.77%  (p=0.016 n=4+5)
Read/sample_zstd_262_kB-4           553MB ± 0%         0MB ± 0%   -99.91%  (p=0.016 n=5+4)
Read/sample_gzip_524_kB-4          95.4kB ± 0%      97.9kB ± 0%    +2.65%  (p=0.008 n=5+5)
Read/sample_flate_524_kB-4         95.2kB ± 0%      98.8kB ± 0%    +3.71%  (p=0.016 n=5+4)
Read/sample_zstd_524_kB-4           786MB ± 0%         1MB ± 0%   -99.90%  (p=0.008 n=5+5)

name                           old allocs/op    new allocs/op    delta
Write/ordered-gzip-4                  701 ± 0%         718 ± 1%    +2.40%  (p=0.008 n=5+5)
Write/ordered-lz4-256k-4              656 ± 0%         657 ± 0%    +0.21%  (p=0.048 n=5+5)
Write/ordered-flate-4                 626 ± 0%         634 ± 1%    +1.37%  (p=0.008 n=5+5)
Write/ordered-zstd-4                2.07k ± 0%       1.44k ± 0%   -30.49%  (p=0.008 n=5+5)
Write/unordered-gzip-4               418k ± 0%        428k ± 0%    +2.39%  (p=0.008 n=5+5)
Write/unordered-flate-4              418k ± 0%        430k ± 0%    +2.89%  (p=0.008 n=5+5)
Write/unordered-zstd-4               469k ± 0%        468k ± 0%    -0.12%  (p=0.008 n=5+5)
Read/gzip_66_kB-4                   13.2k ± 0%       13.5k ± 0%    +2.54%  (p=0.016 n=5+4)
Read/lz4-256k_66_kB-4               13.7k ± 0%       13.7k ± 0%    -0.01%  (p=0.029 n=4+4)
Read/flate_66_kB-4                  13.2k ± 0%       13.6k ± 0%    +2.72%  (p=0.008 n=5+5)
Read/zstd_66_kB-4                   18.0k ± 1%       10.8k ± 0%   -40.19%  (p=0.008 n=5+5)
Read/gzip_262_kB-4                  4.61k ± 0%       4.76k ± 0%    +3.17%  (p=0.016 n=4+5)
Read/flate_262_kB-4                 4.61k ± 0%       4.78k ± 0%    +3.62%  (p=0.008 n=5+5)
Read/zstd_262_kB-4                  7.10k ± 2%       2.54k ± 0%   -64.22%  (p=0.016 n=5+4)
Read/gzip_524_kB-4                  2.62k ± 0%       2.69k ± 0%    +2.36%  (p=0.016 n=4+5)
Read/flate_524_kB-4                 2.62k ± 0%       2.70k ± 0%    +3.09%  (p=0.008 n=5+5)
Read/zstd_524_kB-4                  6.13k ± 2%       1.63k ± 0%   -73.40%  (p=0.008 n=5+5)
Read/sample_gzip_66_kB-4            13.2k ± 0%       13.5k ± 0%    +2.54%  (p=0.029 n=4+4)
Read/sample_flate_66_kB-4           13.2k ± 0%       13.6k ± 0%    +2.88%  (p=0.016 n=4+5)
Read/sample_zstd_66_kB-4            18.0k ± 1%       10.8k ± 0%   -40.00%  (p=0.008 n=5+5)
Read/sample_gzip_262_kB-4           4.63k ± 0%       4.77k ± 0%    +3.16%  (p=0.016 n=4+5)
Read/sample_flate_262_kB-4          4.62k ± 0%       4.79k ± 0%    +3.61%  (p=0.016 n=4+5)
Read/sample_zstd_262_kB-4           7.12k ± 1%       2.54k ± 0%   -64.28%  (p=0.008 n=5+5)
Read/sample_gzip_524_kB-4           2.63k ± 0%       2.69k ± 0%    +2.36%  (p=0.008 n=5+5)
Read/sample_flate_524_kB-4          2.63k ± 0%       2.72k ± 0%    +3.31%  (p=0.016 n=5+4)
Read/sample_zstd_524_kB-4           6.11k ± 2%       1.64k ± 0%   -73.23%  (p=0.008 n=5+5)
```
  • Loading branch information
bboreham committed Sep 27, 2022
1 parent 391b9ce commit 5ee0d09
Show file tree
Hide file tree
Showing 80 changed files with 13,344 additions and 3,933 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -19,6 +19,7 @@
* [6179](https://github.com/grafana/loki/pull/6179) **chaudum**: Add new HTTP endpoint to delete ingester ring token file and shutdown process gracefully
* [5997](https://github.com/grafana/loki/pull/5997) **simonswine**: Querier: parallize label queries to both stores.
* [5406](https://github.com/grafana/loki/pull/5406) **ctovena**: Revise the configuration parameters that configure the usage report to grafana.com.
* [7263](https://github.com/grafana/loki/pull/7263) **bboreham**: Dependencies: klauspost/compress package to v1.15.11; improves performance.

##### Fixes
* [7040](https://github.com/grafana/loki/pull/7040) **bakunowski**: Remove duplicated `loki_boltdb_shipper` prefix from `tables_upload_operation_total` metric.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Expand Up @@ -63,7 +63,7 @@ require (
github.com/jmespath/go-jmespath v0.4.0
github.com/joncrlsn/dque v2.2.1-0.20200515025108-956d14155fa2+incompatible
github.com/json-iterator/go v1.1.12
github.com/klauspost/compress v1.14.1
github.com/klauspost/compress v1.15.11
github.com/klauspost/pgzip v1.2.5
github.com/mattn/go-ieproxy v0.0.1
github.com/minio/minio-go/v7 v7.0.24
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Expand Up @@ -1082,8 +1082,8 @@ github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0
github.com/klauspost/compress v1.11.0/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/klauspost/compress v1.13.4/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.14.1 h1:hLQYb23E8/fO+1u53d02A97a8UnsddcvYzq4ERRU4ds=
github.com/klauspost/compress v1.14.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
github.com/klauspost/compress v1.15.11 h1:Lcadnb3RKGin4FYM/orgq0qde+nc15E5Cbqg4B9Sx9c=
github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s=
github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4=
Expand Down
7 changes: 7 additions & 0 deletions vendor/github.com/klauspost/compress/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

140 changes: 133 additions & 7 deletions vendor/github.com/klauspost/compress/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5ee0d09

Please sign in to comment.