Skip to content

Commit 076cf34

Browse files
committed
go.mod: bump Pebble to afb4d6001bab and update compression metrics
We change the compression metrics from showing sstable counts to showing compressed bytes and compression ratios. Changes: * [`afb4d600`](cockroachdb/pebble@afb4d600) block: minor change to CompressionRatio() * [`d57c0ace`](cockroachdb/pebble@d57c0ace) metrics: move Compression to Table * [`750fe8c3`](cockroachdb/pebble@750fe8c3) compression: improve compression stats string * [`335af5d4`](cockroachdb/pebble@335af5d4) sstable: free physical buffers on write * [`1520f913`](cockroachdb/pebble@1520f913) db: track duration, bytes read for block reads in TableIngestInfo * [`503a214b`](cockroachdb/pebble@503a214b) db: track memtable flush, manifest update durations in TableIngestInfo * [`c1d36869`](cockroachdb/pebble@c1d36869) metrics: expose new compression stats Release note: none. Epic: none.
1 parent 1e2f0e2 commit 076cf34

File tree

8 files changed

+200
-99
lines changed

8 files changed

+200
-99
lines changed

DEPS.bzl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,10 +1835,10 @@ def go_deps():
18351835
patches = [
18361836
"@com_github_cockroachdb_cockroach//build/patches:com_github_cockroachdb_pebble.patch",
18371837
],
1838-
sha256 = "b192a1d1000426cf0fe9ceae5909ef19960d2bb14694459286565acdd8d6be89",
1839-
strip_prefix = "github.com/cockroachdb/[email protected]20250730225220-70fa14f4ca3d",
1838+
sha256 = "e6a74cd60e0d641da8d9a9091efc369f0895b1d18e4dc67cc2a5ee06cde6999b",
1839+
strip_prefix = "github.com/cockroachdb/[email protected]20250804212405-afb4d6001bab",
18401840
urls = [
1841-
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250730225220-70fa14f4ca3d.zip",
1841+
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250804212405-afb4d6001bab.zip",
18421842
],
18431843
)
18441844
go_repository(

build/bazelutil/distdir_files.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ DISTDIR_FILES = {
358358
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/gostdlib/com_github_cockroachdb_gostdlib-v1.19.0.zip": "c4d516bcfe8c07b6fc09b8a9a07a95065b36c2855627cb3514e40c98f872b69e",
359359
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/logtags/com_github_cockroachdb_logtags-v0.0.0-20241215232642-bb51bb14a506.zip": "920068af09e3846d9ebb4e4a7787ff1dd10f3989c5f940ad861b0f6a9f824f6e",
360360
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/metamorphic/com_github_cockroachdb_metamorphic-v0.0.0-20231108215700-4ba948b56895.zip": "28c8cf42192951b69378cf537be5a9a43f2aeb35542908cc4fe5f689505853ea",
361-
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250730225220-70fa14f4ca3d.zip": "b192a1d1000426cf0fe9ceae5909ef19960d2bb14694459286565acdd8d6be89",
361+
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/pebble/com_github_cockroachdb_pebble-v0.0.0-20250804212405-afb4d6001bab.zip": "e6a74cd60e0d641da8d9a9091efc369f0895b1d18e4dc67cc2a5ee06cde6999b",
362362
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/redact/com_github_cockroachdb_redact-v1.1.6.zip": "018eccb5fb9ca52d43ec9eaf213539d01c1f2b94e0e822406ebfb2e9321ef6cf",
363363
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/returncheck/com_github_cockroachdb_returncheck-v0.0.0-20200612231554-92cdbca611dd.zip": "ce92ba4352deec995b1f2eecf16eba7f5d51f5aa245a1c362dfe24c83d31f82b",
364364
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/cockroachdb/stress/com_github_cockroachdb_stress-v0.0.0-20220803192808-1806698b1b7b.zip": "3fda531795c600daf25532a4f98be2a1335cd1e5e182c72789bca79f5f69fcc1",

docs/generated/metrics/metrics.yaml

Lines changed: 80 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -15654,7 +15654,7 @@ layers:
1565415654
description: Number of disk reads per query
1565515655
y_axis_label: Disk Reads per Query
1565615656
type: GAUGE
15657-
unit: COUNT
15657+
unit: CONST
1565815658
aggregation: AVG
1565915659
derivative: NONE
1566015660
- name: rocksdb.table-readers-mem-estimate
@@ -16274,6 +16274,78 @@ layers:
1627416274
unit: COUNT
1627516275
aggregation: AVG
1627616276
derivative: NON_NEGATIVE_DERIVATIVE
16277+
- name: storage.compression.cr
16278+
exported_name: storage_compression_cr
16279+
description: Average compression ratio of sstable and blob value data.
16280+
y_axis_label: Ratio
16281+
type: GAUGE
16282+
unit: CONST
16283+
aggregation: AVG
16284+
derivative: NONE
16285+
- name: storage.compression.minlz.bytes
16286+
exported_name: storage_compression_minlz_bytes
16287+
description: Total on disk size of sstable and blob value data that is compressed with the MinLZ algorithm.
16288+
y_axis_label: Bytes
16289+
type: GAUGE
16290+
unit: CONST
16291+
aggregation: AVG
16292+
derivative: NONE
16293+
- name: storage.compression.minlz.cr
16294+
exported_name: storage_compression_minlz_cr
16295+
description: Average compression ratio of sstable and blob value data that is compressed with the MinLZ algorithm.
16296+
y_axis_label: Ratio
16297+
type: GAUGE
16298+
unit: CONST
16299+
aggregation: AVG
16300+
derivative: NONE
16301+
- name: storage.compression.none.bytes
16302+
exported_name: storage_compression_none_bytes
16303+
description: Total on disk size of sstable and blob value data that is not compressed.
16304+
y_axis_label: Bytes
16305+
type: GAUGE
16306+
unit: BYTES
16307+
aggregation: AVG
16308+
derivative: NONE
16309+
- name: storage.compression.snappy.bytes
16310+
exported_name: storage_compression_snappy_bytes
16311+
description: Total on disk size of sstable and blob value data that is compressed with the Snappy algorithm.
16312+
y_axis_label: Bytes
16313+
type: GAUGE
16314+
unit: BYTES
16315+
aggregation: AVG
16316+
derivative: NONE
16317+
- name: storage.compression.snappy.cr
16318+
exported_name: storage_compression_snappy_cr
16319+
description: Average compression ratio of sstable and blob value data that is compressed with the snappy algorithm.
16320+
y_axis_label: Ratio
16321+
type: GAUGE
16322+
unit: CONST
16323+
aggregation: AVG
16324+
derivative: NONE
16325+
- name: storage.compression.unknown.bytes
16326+
exported_name: storage_compression_unknown_bytes
16327+
description: Total on disk size of sstable and blob value data that is compressed but for which we have no compression statistics.
16328+
y_axis_label: Bytes
16329+
type: GAUGE
16330+
unit: BYTES
16331+
aggregation: AVG
16332+
derivative: NONE
16333+
- name: storage.compression.zstd.bytes
16334+
exported_name: storage_compression_zstd_bytes
16335+
description: Total on disk size of sstable and blob value data that is compressed with the Zstd algorithm.
16336+
y_axis_label: Bytes
16337+
type: GAUGE
16338+
unit: BYTES
16339+
aggregation: AVG
16340+
derivative: NONE
16341+
- name: storage.compression.zstd.cr
16342+
exported_name: storage_compression_zstd_cr
16343+
description: Average compression ratio of sstable and blob value data that is compressed with the Zstd algorithm.
16344+
y_axis_label: Ratio
16345+
type: GAUGE
16346+
unit: CONST
16347+
aggregation: AVG
16348+
derivative: NONE
1627716349
- name: storage.disk-slow
1627816350
exported_name: storage_disk_slow
1627916351
description: Number of instances of disk operations taking longer than 10s
@@ -16885,7 +16957,7 @@ layers:
1688516957
description: Compaction score of level 0
1688616958
y_axis_label: Score
1688716959
type: GAUGE
16888-
unit: COUNT
16960+
unit: CONST
1688916961
aggregation: AVG
1689016962
derivative: NONE
1689116963
- name: storage.l0-level-size
@@ -16925,7 +16997,7 @@ layers:
1692516997
description: Compaction score of level 1
1692616998
y_axis_label: Score
1692716999
type: GAUGE
16928-
unit: COUNT
17000+
unit: CONST
1692917001
aggregation: AVG
1693017002
derivative: NONE
1693117003
- name: storage.l1-level-size
@@ -16949,7 +17021,7 @@ layers:
1694917021
description: Compaction score of level 2
1695017022
y_axis_label: Score
1695117023
type: GAUGE
16952-
unit: COUNT
17024+
unit: CONST
1695317025
aggregation: AVG
1695417026
derivative: NONE
1695517027
- name: storage.l2-level-size
@@ -16973,7 +17045,7 @@ layers:
1697317045
description: Compaction score of level 3
1697417046
y_axis_label: Score
1697517047
type: GAUGE
16976-
unit: COUNT
17048+
unit: CONST
1697717049
aggregation: AVG
1697817050
derivative: NONE
1697917051
- name: storage.l3-level-size
@@ -16997,7 +17069,7 @@ layers:
1699717069
description: Compaction score of level 4
1699817070
y_axis_label: Score
1699917071
type: GAUGE
17000-
unit: COUNT
17072+
unit: CONST
1700117073
aggregation: AVG
1700217074
derivative: NONE
1700317075
- name: storage.l4-level-size
@@ -17021,7 +17093,7 @@ layers:
1702117093
description: Compaction score of level 5
1702217094
y_axis_label: Score
1702317095
type: GAUGE
17024-
unit: COUNT
17096+
unit: CONST
1702517097
aggregation: AVG
1702617098
derivative: NONE
1702717099
- name: storage.l5-level-size
@@ -17045,7 +17117,7 @@ layers:
1704517117
description: Compaction score of level 6
1704617118
y_axis_label: Score
1704717119
type: GAUGE
17048-
unit: COUNT
17120+
unit: CONST
1704917121
aggregation: AVG
1705017122
derivative: NONE
1705117123
- name: storage.l6-level-size
@@ -17200,38 +17272,6 @@ layers:
1720017272
unit: COUNT
1720117273
aggregation: AVG
1720217274
derivative: NON_NEGATIVE_DERIVATIVE
17203-
- name: storage.sstable.compression.none.count
17204-
exported_name: storage_sstable_compression_none_count
17205-
description: Count of SSTables that are uncompressed.
17206-
y_axis_label: SSTables
17207-
type: GAUGE
17208-
unit: COUNT
17209-
aggregation: AVG
17210-
derivative: NONE
17211-
- name: storage.sstable.compression.snappy.count
17212-
exported_name: storage_sstable_compression_snappy_count
17213-
description: Count of SSTables that have been compressed with the snappy compression algorithm.
17214-
y_axis_label: SSTables
17215-
type: GAUGE
17216-
unit: COUNT
17217-
aggregation: AVG
17218-
derivative: NONE
17219-
- name: storage.sstable.compression.unknown.count
17220-
exported_name: storage_sstable_compression_unknown_count
17221-
description: Count of SSTables that have an unknown compression algorithm.
17222-
y_axis_label: SSTables
17223-
type: GAUGE
17224-
unit: COUNT
17225-
aggregation: AVG
17226-
derivative: NONE
17227-
- name: storage.sstable.compression.zstd.count
17228-
exported_name: storage_sstable_compression_zstd_count
17229-
description: Count of SSTables that have been compressed with the zstd compression algorithm.
17230-
y_axis_label: SSTables
17231-
type: GAUGE
17232-
unit: COUNT
17233-
aggregation: AVG
17234-
derivative: NONE
1723517275
- name: storage.sstable.remote.bytes
1723617276
exported_name: storage_sstable_remote_bytes
1723717277
description: Bytes in SSTables that are stored off-disk (remotely) in object storage.

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ require (
135135
github.com/cockroachdb/errors v1.12.0
136136
github.com/cockroachdb/gostdlib v1.19.0
137137
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506
138-
github.com/cockroachdb/pebble v0.0.0-20250730225220-70fa14f4ca3d
138+
github.com/cockroachdb/pebble v0.0.0-20250804212405-afb4d6001bab
139139
github.com/cockroachdb/redact v1.1.6
140140
github.com/cockroachdb/returncheck v0.0.0-20200612231554-92cdbca611dd
141141
github.com/cockroachdb/tokenbucket v0.0.0-20250429170803-42689b6311bb

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506 h1:ASDL+UJcILM
581581
github.com/cockroachdb/logtags v0.0.0-20241215232642-bb51bb14a506/go.mod h1:Mw7HqKr2kdtu6aYGn3tPmAftiP3QPX63LdK/zcariIo=
582582
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895 h1:XANOgPYtvELQ/h4IrmPAohXqe2pWA8Bwhejr3VQoZsA=
583583
github.com/cockroachdb/metamorphic v0.0.0-20231108215700-4ba948b56895/go.mod h1:aPd7gM9ov9M8v32Yy5NJrDyOcD8z642dqs+F0CeNXfA=
584-
github.com/cockroachdb/pebble v0.0.0-20250730225220-70fa14f4ca3d h1:Bl4ThksXKTkwTF/30czJt6uVDl95qMgZDqrO2Cz887c=
585-
github.com/cockroachdb/pebble v0.0.0-20250730225220-70fa14f4ca3d/go.mod h1:m1E2qCthmjzpvzktMEjYXj0eykYI325brUhFJU6VRis=
584+
github.com/cockroachdb/pebble v0.0.0-20250804212405-afb4d6001bab h1:XGO/UWIv5lB3r5kUv1MoF49Nofz0Ro74Vtt+p2whIX0=
585+
github.com/cockroachdb/pebble v0.0.0-20250804212405-afb4d6001bab/go.mod h1:m1E2qCthmjzpvzktMEjYXj0eykYI325brUhFJU6VRis=
586586
github.com/cockroachdb/redact v1.1.3/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=
587587
github.com/cockroachdb/redact v1.1.6 h1:zXJBwDZ84xJNlHl1rMyCojqyIxv+7YUpQiJLQ7n4314=
588588
github.com/cockroachdb/redact v1.1.6/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg=

pkg/kv/kvserver/kvstorage/snaprecv/testdata/echotest/TestMultiSSTWriterInitSST_interesting=false

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
echo
44
----
55
>> finishing msstw
6-
>> sstSize=4816 estDataSize=126
6+
>> sstSize=4752 estDataSize=126
77
>> sst0:
88
rangedel: /Local/RangeID/100/{r""-s""}
99
rangekeydel: /Local/RangeID/100/{r""-s""}

pkg/kv/kvserver/kvstorage/snaprecv/testdata/echotest/TestMultiSSTWriterInitSST_interesting=true

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ echo
55
>> rangekeyset [/Local/RangeID/100/r/AbortSpan/"00000000-0000-0000-0000-000000000000"-/Local/RangeID/100/r/AbortSpan/"6ba7b810-9dad-11d1-80b4-00c04fd430c8")
66
>> sstSize=0 estDataSize=94
77
>> rangekeyset [/Local/Range"d"/RangeDescriptor-/Local/Range"f"/RangeDescriptor)
8-
>> sstSize=1167 estDataSize=403
8+
>> sstSize=1154 estDataSize=403
99
>> rangekeyset ["e"-"f")
10-
>> sstSize=4296 estDataSize=581
10+
>> sstSize=4244 estDataSize=581
1111
>> finishing msstw
12-
>> sstSize=5287 estDataSize=585
12+
>> sstSize=5222 estDataSize=585
1313
>> sst0:
1414
rangedel: /Local/RangeID/100/r{""-/AbortSpan/"00000000-0000-0000-0000-000000000000"}
1515
rangedel: /Local/RangeID/100/r/AbortSpan/"{00000000-0000-0000-0000-000000000000"-6ba7b810-9dad-11d1-80b4-00c04fd430c8"}

0 commit comments

Comments
 (0)