From 8989e4e6c1764aea63ef66a37cfcb87f11f6b658 Mon Sep 17 00:00:00 2001 From: Radu Berinde Date: Tue, 15 Oct 2024 12:44:48 -0700 Subject: [PATCH] colblk: don't use InitWithDefault for block lengths Having a default value for lengths is unnecessary and can lead to worse encodings. --- sstable/colblk/index_block.go | 2 +- testdata/checkpoint | 20 +++---- testdata/compaction_delete_only_hints | 6 +- testdata/compaction_picker_pick_file | 6 +- testdata/compaction_tombstones | 10 ++-- testdata/event_listener | 56 +++++++++---------- testdata/flushable_ingest | 4 +- testdata/ingest | 2 +- testdata/ingest_external | 8 +-- testdata/iterator_stats | 8 +-- ...l_compaction_set_with_del_sstable_Pebblev5 | 4 +- testdata/marked_for_compaction | 6 +- testdata/metrics | 32 +++++------ 13 files changed, 82 insertions(+), 82 deletions(-) diff --git a/sstable/colblk/index_block.go b/sstable/colblk/index_block.go index 973cefbbb8..e7e35aeed0 100644 --- a/sstable/colblk/index_block.go +++ b/sstable/colblk/index_block.go @@ -57,7 +57,7 @@ const ( func (w *IndexBlockWriter) Init() { w.separators.Init() w.offsets.Init() - w.lengths.InitWithDefault() + w.lengths.Init() w.blockProperties.Init() w.rows = 0 } diff --git a/testdata/checkpoint b/testdata/checkpoint index c7cd55636c..66a896cb16 100644 --- a/testdata/checkpoint +++ b/testdata/checkpoint @@ -321,11 +321,11 @@ g 10 scan db ---- open: db/000010.sst (options: *vfs.randomReadsOption) -read-at(622, 53): db/000010.sst -read-at(584, 38): db/000010.sst -read-at(137, 447): db/000010.sst -read-at(96, 41): db/000010.sst -read-at(0, 96): db/000010.sst +read-at(626, 53): db/000010.sst +read-at(588, 38): db/000010.sst +read-at(141, 447): db/000010.sst +read-at(100, 41): db/000010.sst +read-at(0, 100): db/000010.sst a 1 b 5 c 3 @@ -546,11 +546,11 @@ close: checkpoints/checkpoint4/000008.log scan checkpoints/checkpoint4 ---- open: checkpoints/checkpoint4/000010.sst (options: *vfs.randomReadsOption) -read-at(622, 53): checkpoints/checkpoint4/000010.sst -read-at(584, 38): checkpoints/checkpoint4/000010.sst -read-at(137, 447): checkpoints/checkpoint4/000010.sst -read-at(96, 41): checkpoints/checkpoint4/000010.sst -read-at(0, 96): checkpoints/checkpoint4/000010.sst +read-at(626, 53): checkpoints/checkpoint4/000010.sst +read-at(588, 38): checkpoints/checkpoint4/000010.sst +read-at(141, 447): checkpoints/checkpoint4/000010.sst +read-at(100, 41): checkpoints/checkpoint4/000010.sst +read-at(0, 100): checkpoints/checkpoint4/000010.sst a 1 b 5 d 7 diff --git a/testdata/compaction_delete_only_hints b/testdata/compaction_delete_only_hints index 809f22bc3a..6bae97a99c 100644 --- a/testdata/compaction_delete_only_hints +++ b/testdata/compaction_delete_only_hints @@ -255,7 +255,7 @@ L0.000001 a-z seqnums(tombstone=5-27, file-smallest=0, type=point-key-only) close-snapshot 10 ---- -[JOB 100] compacted(elision-only) L6 [000004] (749B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (656B), in 1.0s (2.0s total), output rate 656B/s +[JOB 100] compacted(elision-only) L6 [000004] (743B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (662B), in 1.0s (2.0s total), output rate 662B/s # In previous versions of the code, the deletion hint was removed by the # elision-only compaction because it zeroed sequence numbers of keys with @@ -542,7 +542,7 @@ maybe-compact Deletion hints: (none) Compactions: - [JOB 100] compacted(delete-only) L6 [000005] (657B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s + [JOB 100] compacted(delete-only) L6 [000005] (660B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s describe-lsm ---- @@ -608,7 +608,7 @@ maybe-compact Deletion hints: (none) Compactions: - [JOB 100] compacted(delete-only) L6 [000004] (851B) Score=0.00 -> L6 [000007 000008] (176B), in 1.0s (2.0s total), output rate 176B/s + [JOB 100] compacted(delete-only) L6 [000004] (849B) Score=0.00 -> L6 [000007 000008] (186B), in 1.0s (2.0s total), output rate 186B/s describe-lsm ---- diff --git a/testdata/compaction_picker_pick_file b/testdata/compaction_picker_pick_file index 03abdcde15..17bc14bc79 100644 --- a/testdata/compaction_picker_pick_file +++ b/testdata/compaction_picker_pick_file @@ -171,7 +171,7 @@ L5: 000005:[f#11,SET-f#11,SET]: 57942 bytes (57KB) L6: 000006:[c#0,SET-c#0,SET]: 66134 bytes (65KB) - 000009:[d#13,SET-d#13,SET]: 654 bytes (654B) + 000009:[d#13,SET-d#13,SET]: 660 bytes (660B) 000007:[e#0,SET-e#0,SET]: 66134 bytes (65KB) 000008:[f#0,SET-f#0,SET]: 66134 bytes (65KB) @@ -209,8 +209,8 @@ L5: 000011:[e#11,SET-e#11,SET]: 126 bytes (126B) 000005:[f#11,SET-f#11,SET]: 57942 bytes (57KB) L6: - 000012:[c#15,SET-c#15,SET]: 654 bytes (654B) - 000009:[d#13,SET-d#13,SET]: 654 bytes (654B) + 000012:[c#15,SET-c#15,SET]: 660 bytes (660B) + 000009:[d#13,SET-d#13,SET]: 660 bytes (660B) 000007:[e#0,SET-e#0,SET]: 66134 bytes (65KB) 000008:[f#0,SET-f#0,SET]: 66134 bytes (65KB) diff --git a/testdata/compaction_tombstones b/testdata/compaction_tombstones index a0b07e4c46..82904edad0 100644 --- a/testdata/compaction_tombstones +++ b/testdata/compaction_tombstones @@ -85,7 +85,7 @@ range-deletions-bytes-estimate: 0 maybe-compact ---- -[JOB 100] compacted(elision-only) L6 [000004] (711B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (656B), in 1.0s (2.0s total), output rate 656B/s +[JOB 100] compacted(elision-only) L6 [000004] (711B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (662B), in 1.0s (2.0s total), output rate 662B/s version ---- @@ -119,7 +119,7 @@ wait-pending-table-stats num-entries: 6 num-deletions: 2 num-range-key-sets: 0 -point-deletions-bytes-estimate: 46 +point-deletions-bytes-estimate: 45 range-deletions-bytes-estimate: 101 maybe-compact @@ -134,7 +134,7 @@ close-snapshot close-snapshot 103 ---- -[JOB 100] compacted(elision-only) L6 [000004] (881B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s +[JOB 100] compacted(elision-only) L6 [000004] (875B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [] (0B), in 1.0s (2.0s total), output rate 0B/s # Test a table that contains both deletions and non-deletions, but whose # non-deletions well outnumber its deletions. The table should not be @@ -208,7 +208,7 @@ range-deletions-bytes-estimate: 16824 maybe-compact ---- -[JOB 100] compacted(default) L5 [000004 000005] (26KB) Score=88.36 + L6 [000007] (17KB) Score=0.73 -> L6 [000009] (25KB), in 1.0s (2.0s total), output rate 25KB/s +[JOB 100] compacted(default) L5 [000004 000005] (26KB) Score=88.38 + L6 [000007] (17KB) Score=0.73 -> L6 [000009] (25KB), in 1.0s (2.0s total), output rate 25KB/s define level-max-bytes=(L5 : 1000) auto-compactions=off L5 @@ -323,7 +323,7 @@ range-deletions-bytes-estimate: 94 maybe-compact ---- -[JOB 100] compacted(elision-only) L6 [000004] (938B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (657B), in 1.0s (2.0s total), output rate 657B/s +[JOB 100] compacted(elision-only) L6 [000004] (926B) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000005] (660B), in 1.0s (2.0s total), output rate 660B/s # Close the DB, asserting that the reference counts balance. close diff --git a/testdata/event_listener b/testdata/event_listener index 529fd577c2..31963e91e2 100644 --- a/testdata/event_listener +++ b/testdata/event_listener @@ -141,7 +141,7 @@ close: db/marker.manifest.000004.MANIFEST-000011 remove: db/marker.manifest.000003.MANIFEST-000009 sync: db [JOB 6] MANIFEST created 000011 -[JOB 6] compacted(default) L0 [000005 000008] (1.3KB) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000010] (653B), in 1.0s (3.0s total), output rate 653B/s +[JOB 6] compacted(default) L0 [000005 000008] (1.3KB) Score=0.00 + L6 [] (0B) Score=0.00 -> L6 [000010] (659B), in 1.0s (3.0s total), output rate 659B/s close: db/000005.sst close: db/000008.sst remove: db/000005.sst @@ -186,11 +186,11 @@ remove: db/MANIFEST-000009 ingest ---- open: ext/0 -read-at(600, 53): ext/0 -read-at(563, 37): ext/0 -read-at(116, 447): ext/0 -read-at(75, 41): ext/0 -read-at(0, 75): ext/0 +read-at(606, 53): ext/0 +read-at(569, 37): ext/0 +read-at(122, 447): ext/0 +read-at(81, 41): ext/0 +read-at(0, 81): ext/0 close: ext/0 link: ext/0 -> db/000015.sst [JOB 10] ingesting: sstable created 000015 @@ -206,21 +206,21 @@ sync: db remove: db/MANIFEST-000011 [JOB 10] MANIFEST deleted 000011 remove: ext/0 -[JOB 10] ingested L0:000015 (653B) +[JOB 10] ingested L0:000015 (659B) metrics ---- | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 2 1.3KB 0B 0 | 0.40 | 81B | 1 653B | 0 0B | 3 1.9KB | 0B | 2 24.3 + 0 | 2 1.3KB 0B 0 | 0.40 | 81B | 1 659B | 0 0B | 3 1.9KB | 0B | 2 24.3 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 1 653B 0B 0 | - | 1.3KB | 0 0B | 0 0B | 1 653B | 1.3KB | 1 0.5 -total | 3 1.9KB 0B 0 | - | 734B | 1 653B | 0 0B | 4 3.3KB | 1.3KB | 3 4.6 + 6 | 1 659B 0B 0 | - | 1.3KB | 0 0B | 0 0B | 1 659B | 1.3KB | 1 0.5 +total | 3 1.9KB 0B 0 | - | 740B | 1 659B | 0 0B | 4 3.3KB | 1.3KB | 3 4.5 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 48B written: 81B (69% overhead) Flushes: 3 @@ -232,7 +232,7 @@ Backing tables: 0 (0B) Virtual tables: 0 (0B) Local tables size: 1.9KB Compression types: snappy: 3 -Block cache: 2 entries (120B) hit rate: 0.0% +Block cache: 2 entries (112B) hit rate: 0.0% Table cache: 0 entries (0B) hit rate: 50.0% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 @@ -249,18 +249,18 @@ ingest-flushable ---- sync-data: wal/000012.log open: ext/a -read-at(600, 53): ext/a -read-at(563, 37): ext/a -read-at(116, 447): ext/a -read-at(75, 41): ext/a -read-at(0, 75): ext/a +read-at(606, 53): ext/a +read-at(569, 37): ext/a +read-at(122, 447): ext/a +read-at(81, 41): ext/a +read-at(0, 81): ext/a close: ext/a open: ext/b -read-at(600, 53): ext/b -read-at(563, 37): ext/b -read-at(116, 447): ext/b -read-at(75, 41): ext/b -read-at(0, 75): ext/b +read-at(606, 53): ext/b +read-at(569, 37): ext/b +read-at(122, 447): ext/b +read-at(81, 41): ext/b +read-at(0, 81): ext/b close: ext/b link: ext/a -> db/000017.sst [JOB 11] ingesting: sstable created 000017 @@ -280,7 +280,7 @@ sync: wal [JOB 13] WAL created 000020 remove: ext/a remove: ext/b -[JOB 11] ingested as flushable 000017 (653B), 000018 (653B) +[JOB 11] ingested as flushable 000017 (659B), 000018 (659B) sync-data: wal/000020.log close: wal/000020.log create: wal/000021.log @@ -303,7 +303,7 @@ close: db/marker.manifest.000007.MANIFEST-000023 remove: db/marker.manifest.000006.MANIFEST-000016 sync: db [JOB 16] MANIFEST created 000023 -[JOB 16] flushed 2 ingested flushables L0:000017 (653B) + L6:000018 (653B) in 1.0s (2.0s total), output rate 1.3KB/s +[JOB 16] flushed 2 ingested flushables L0:000017 (659B) + L6:000018 (659B) in 1.0s (2.0s total), output rate 1.3KB/s remove: db/MANIFEST-000014 [JOB 16] MANIFEST deleted 000014 [JOB 17] flushing 1 memtable (100B) to L0 @@ -321,20 +321,20 @@ level | tables size val-bl vtables | score | in | tables size | tables siz 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 2 1.3KB 0B 0 | - | 1.3KB | 1 653B | 0 0B | 1 653B | 1.3KB | 1 0.5 -total | 6 3.8KB 0B 0 | - | 2.0KB | 3 1.9KB | 0 0B | 5 5.2KB | 1.3KB | 5 2.6 + 6 | 2 1.3KB 0B 0 | - | 1.3KB | 1 659B | 0 0B | 1 659B | 1.3KB | 1 0.5 +total | 6 3.9KB 0B 0 | - | 2.0KB | 3 1.9KB | 0 0B | 5 5.2KB | 1.3KB | 5 2.6 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 82B written: 108B (32% overhead) Flushes: 6 -Compactions: 1 estimated debt: 3.8KB in progress: 0 (0B) +Compactions: 1 estimated debt: 3.9KB in progress: 0 (0B) default: 1 delete: 0 elision: 0 move: 0 read: 0 tombstone-density: 0 rewrite: 0 copy: 0 multi-level: 0 MemTables: 1 (512KB) zombie: 1 (512KB) Zombie tables: 0 (0B, local: 0B) Backing tables: 0 (0B) Virtual tables: 0 (0B) -Local tables size: 3.8KB +Local tables size: 3.9KB Compression types: snappy: 6 -Block cache: 6 entries (360B) hit rate: 0.0% +Block cache: 6 entries (336B) hit rate: 0.0% Table cache: 0 entries (0B) hit rate: 50.0% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 diff --git a/testdata/flushable_ingest b/testdata/flushable_ingest index 81b5cad598..09ca46e456 100644 --- a/testdata/flushable_ingest +++ b/testdata/flushable_ingest @@ -671,7 +671,7 @@ small-00001-does-not-exist: pebble: not found get with-fs-logging large-00001 ---- -read-at(1161265, 69): 000005.sst +read-at(1161265, 65): 000005.sst read-at(1155684, 2966): 000005.sst read-at(0, 2818): 000005.sst large-00001:val-00001 @@ -680,7 +680,7 @@ large-00001:val-00001 get with-fs-logging large-00001-does-not-exist ---- -read-at(1161265, 69): 000005.sst +read-at(1161265, 65): 000005.sst read-at(1155684, 2966): 000005.sst read-at(0, 2818): 000005.sst large-00001-does-not-exist: pebble: not found diff --git a/testdata/ingest b/testdata/ingest index 49fadcac8b..9eccab8dbc 100644 --- a/testdata/ingest +++ b/testdata/ingest @@ -359,7 +359,7 @@ num-entries: 2 num-deletions: 2 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 1226 +range-deletions-bytes-estimate: 1229 # A set operation takes precedence over a range deletion at the same # sequence number as can occur during ingestion. diff --git a/testdata/ingest_external b/testdata/ingest_external index acb60caba6..1e675bfba8 100644 --- a/testdata/ingest_external +++ b/testdata/ingest_external @@ -330,8 +330,8 @@ gi: (foo, .) lsm verbose ---- L6: - 000004(000004):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:1254 - 000005(000005):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:968 + 000004(000004):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:1261 + 000005(000005):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:1016 download g h via-backing-file-download ---- @@ -341,8 +341,8 @@ ok lsm verbose ---- L6: - 000006(000006):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:874 - 000007(000007):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:867 + 000006(000006):[gc#10,DELSIZED-gf#inf,RANGEDEL] seqnums:[10-10] points:[gc#10,DELSIZED-gf#inf,RANGEDEL] size:908 + 000007(000007):[gg#11,DELSIZED-gj#inf,RANGEDEL] seqnums:[11-11] points:[gg#11,DELSIZED-gj#inf,RANGEDEL] size:916 reopen ---- diff --git a/testdata/iterator_stats b/testdata/iterator_stats index 087d445e75..4698094b4e 100644 --- a/testdata/iterator_stats +++ b/testdata/iterator_stats @@ -64,10 +64,10 @@ c: (2, .) stats: seeked 1 times (1 internal); stepped 0 times (0 internal); blocks: 113B cached; points: 1 (1B keys, 1B values) d@10: (d10, .) d@9: (d9, .) -stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 282B cached, 10B not cached (read time: 0s); points: 3 (8B keys, 6B values); separated: 1 (2B, 2B fetched) +stats: seeked 1 times (1 internal); stepped 2 times (2 internal); blocks: 303B cached, 10B not cached (read time: 0s); points: 3 (8B keys, 6B values); separated: 1 (2B, 2B fetched) d@8: (d8, .) -stats: seeked 1 times (1 internal); stepped 3 times (3 internal); blocks: 282B cached, 10B not cached (read time: 0s); points: 4 (11B keys, 8B values); separated: 2 (4B, 4B fetched) +stats: seeked 1 times (1 internal); stepped 3 times (3 internal); blocks: 303B cached, 10B not cached (read time: 0s); points: 4 (11B keys, 8B values); separated: 2 (4B, 4B fetched) e@20: (e20, .) -stats: seeked 1 times (1 internal); stepped 4 times (4 internal); blocks: 282B cached, 10B not cached (read time: 0s); points: 5 (15B keys, 11B values); separated: 2 (4B, 4B fetched) +stats: seeked 1 times (1 internal); stepped 4 times (4 internal); blocks: 303B cached, 10B not cached (read time: 0s); points: 5 (15B keys, 11B values); separated: 2 (4B, 4B fetched) e@18: (e18, .) -stats: seeked 1 times (1 internal); stepped 5 times (5 internal); blocks: 282B cached, 10B not cached (read time: 0s); points: 6 (19B keys, 13B values); separated: 3 (7B, 7B fetched) +stats: seeked 1 times (1 internal); stepped 5 times (5 internal); blocks: 303B cached, 10B not cached (read time: 0s); points: 6 (19B keys, 13B values); separated: 3 (7B, 7B fetched) diff --git a/testdata/manual_compaction_set_with_del_sstable_Pebblev5 b/testdata/manual_compaction_set_with_del_sstable_Pebblev5 index 0860e13bae..145bdcdbbf 100644 --- a/testdata/manual_compaction_set_with_del_sstable_Pebblev5 +++ b/testdata/manual_compaction_set_with_del_sstable_Pebblev5 @@ -88,7 +88,7 @@ num-entries: 1 num-deletions: 1 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 1314 +range-deletions-bytes-estimate: 1320 compact a-e L1 ---- @@ -106,7 +106,7 @@ num-entries: 2 num-deletions: 1 num-range-key-sets: 0 point-deletions-bytes-estimate: 0 -range-deletions-bytes-estimate: 657 +range-deletions-bytes-estimate: 660 # Same as above, except range tombstone covers multiple grandparent file boundaries. diff --git a/testdata/marked_for_compaction b/testdata/marked_for_compaction index 3d1b34c97e..5d4a9966a6 100644 --- a/testdata/marked_for_compaction +++ b/testdata/marked_for_compaction @@ -8,7 +8,7 @@ L1 L0.0: 000004:[c#11,SET-c#11,SET] seqnums:[11-11] points:[c#11,SET-c#11,SET] size:653 L1: - 000005:[c#0,SET-d#0,SET] seqnums:[0-0] points:[c#0,SET-d#0,SET] size:661 + 000005:[c#0,SET-d#0,SET] seqnums:[0-0] points:[c#0,SET-d#0,SET] size:664 mark-for-compaction file=000005 ---- @@ -20,9 +20,9 @@ marked L0.000004 maybe-compact ---- -[JOB 100] compacted(rewrite) L1 [000005] (661B) Score=0.00 + L1 [] (0B) Score=0.00 -> L1 [000006] (661B), in 1.0s (2.0s total), output rate 661B/s +[JOB 100] compacted(rewrite) L1 [000005] (664B) Score=0.00 + L1 [] (0B) Score=0.00 -> L1 [000006] (664B), in 1.0s (2.0s total), output rate 664B/s [JOB 100] compacted(rewrite) L0 [000004] (653B) Score=0.00 + L0 [] (0B) Score=0.00 -> L0 [000007] (653B), in 1.0s (2.0s total), output rate 653B/s L0.0: 000007:[c#11,SET-c#11,SET] seqnums:[11-11] points:[c#11,SET-c#11,SET] size:653 L1: - 000006:[c#0,SET-d#0,SET] seqnums:[0-0] points:[c#0,SET-d#0,SET] size:661 + 000006:[c#0,SET-d#0,SET] seqnums:[0-0] points:[c#0,SET-d#0,SET] size:664 diff --git a/testdata/metrics b/testdata/metrics index ab5d8ae29e..22c6a878df 100644 --- a/testdata/metrics +++ b/testdata/metrics @@ -483,7 +483,7 @@ level | tables size val-bl vtables | score | in | tables size | tables siz 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 6 | 3 2.0KB 41B 0 | - | 3.2KB | 0 0B | 0 0B | 3 2.0KB | 3.2KB | 1 0.6 -total | 7 4.5KB 41B 0 | - | 2.1KB | 3 1.9KB | 0 0B | 9 7.9KB | 3.2KB | 3 3.8 +total | 7 4.5KB 41B 0 | - | 2.1KB | 3 1.9KB | 0 0B | 9 7.9KB | 3.2KB | 3 3.7 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 176B written: 187B (6% overhead) Flushes: 8 @@ -495,7 +495,7 @@ Backing tables: 0 (0B) Virtual tables: 0 (0B) Local tables size: 4.5KB Compression types: snappy: 7 -Block cache: 8 entries (441B) hit rate: 9.1% +Block cache: 8 entries (417B) hit rate: 9.1% Table cache: 1 entries (784B) hit rate: 53.8% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 @@ -559,7 +559,7 @@ Backing tables: 0 (0B) Virtual tables: 0 (0B) Local tables size: 6.3KB Compression types: snappy: 10 -Block cache: 8 entries (441B) hit rate: 9.1% +Block cache: 8 entries (417B) hit rate: 9.1% Table cache: 1 entries (784B) hit rate: 53.8% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 @@ -624,18 +624,18 @@ level | tables size val-bl vtables | score | in | tables size | tables siz 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 - 6 | 4 2.7KB 41B 0 | - | 3.2KB | 1 654B | 0 0B | 3 2.0KB | 3.2KB | 1 0.6 -total | 11 5.8KB 41B 2 | - | 2.8KB | 4 2.6KB | 0 0B | 12 10KB | 3.2KB | 3 3.7 + 6 | 4 2.7KB 41B 0 | - | 3.2KB | 1 660B | 0 0B | 3 2.0KB | 3.2KB | 1 0.6 +total | 11 5.9KB 41B 2 | - | 2.8KB | 4 2.6KB | 0 0B | 12 10KB | 3.2KB | 3 3.7 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 223B written: 245B (10% overhead) Flushes: 9 -Compactions: 2 estimated debt: 5.8KB in progress: 0 (0B) +Compactions: 2 estimated debt: 5.9KB in progress: 0 (0B) default: 2 delete: 0 elision: 0 move: 0 read: 0 tombstone-density: 0 rewrite: 0 copy: 0 multi-level: 0 MemTables: 1 (1.0MB) zombie: 1 (1.0MB) Zombie tables: 0 (0B, local: 0B) Backing tables: 2 (1.2KB) Virtual tables: 2 (102B) -Local tables size: 6.9KB +Local tables size: 7.0KB Compression types: snappy: 9 unknown: 2 Block cache: 0 entries (0B) hit rate: 0.0% Table cache: 0 entries (0B) hit rate: 0.0% @@ -728,7 +728,7 @@ level | tables size val-bl vtables | score | in | tables size | tables siz 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 6 | 6 3.9KB 41B 0 | - | 6.4KB | 2 1.3KB | 0 0B | 4 2.6KB | 6.4KB | 1 0.4 -total | 6 3.9KB 41B 0 | - | 3.4KB | 5 3.2KB | 0 0B | 13 12KB | 6.4KB | 1 3.4 +total | 6 3.9KB 41B 0 | - | 3.5KB | 5 3.2KB | 0 0B | 13 12KB | 6.4KB | 1 3.4 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 223B written: 245B (10% overhead) Flushes: 9 @@ -751,7 +751,7 @@ Cgo memory usage: 0B block cache: 0B (data: 0B, maps: 0B, entries: 0B) memtabl Iter category stats: b, latency: {BlockBytes:44 BlockBytesInCache:0 BlockReadDuration:10ms} c, non-latency: {BlockBytes:44 BlockBytesInCache:44 BlockReadDuration:0s} - pebble-compaction, non-latency: {BlockBytes:872 BlockBytesInCache:571 BlockReadDuration:70ms} + pebble-compaction, non-latency: {BlockBytes:890 BlockBytesInCache:589 BlockReadDuration:70ms} pebble-ingest, latency: {BlockBytes:272 BlockBytesInCache:72 BlockReadDuration:30ms} # Create a DB where lower levels are written as shared tables. All ingests also @@ -863,14 +863,14 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 1 654B 0B 0 | 0.25 | 38B | 1 654B | 0 0B | 1 604B | 0B | 1 15.9 + 0 | 1 660B 0B 0 | 0.25 | 38B | 1 660B | 0 0B | 1 604B | 0B | 1 15.9 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 6 | 1 604B 0B 0 | - | 604B | 0 0B | 0 0B | 1 604B | 0B | 1 1.0 -total | 2 1.2KB 0B 0 | - | 692B | 1 654B | 0 0B | 2 1.9KB | 0B | 2 2.7 +total | 2 1.2KB 0B 0 | - | 698B | 1 660B | 0 0B | 2 1.9KB | 0B | 2 2.7 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 27B written: 38B (41% overhead) Flushes: 1 @@ -882,7 +882,7 @@ Backing tables: 0 (0B) Virtual tables: 0 (0B) Local tables size: 0B Compression types: snappy: 2 -Block cache: 4 entries (195B) hit rate: 0.0% +Block cache: 4 entries (187B) hit rate: 0.0% Table cache: 1 entries (784B) hit rate: 50.0% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 @@ -912,14 +912,14 @@ metrics | | | | ingested | moved | written | | amp level | tables size val-bl vtables | score | in | tables size | tables size | tables size | read | r w ------+-----------------------------+-------+-------+--------------+--------------+--------------+-------+--------- - 0 | 2 1.2KB 0B 0 | 0.50 | 66B | 1 654B | 0 0B | 2 1.2KB | 0B | 2 18.1 + 0 | 2 1.2KB 0B 0 | 0.50 | 66B | 1 660B | 0 0B | 2 1.2KB | 0B | 2 18.1 1 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 2 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 3 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 4 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 5 | 0 0B 0B 0 | 0.00 | 0B | 0 0B | 0 0B | 0 0B | 0B | 0 0.0 6 | 1 604B 0B 0 | - | 604B | 0 0B | 0 0B | 1 604B | 0B | 1 1.0 -total | 3 1.8KB 0B 0 | - | 720B | 1 654B | 0 0B | 3 2.5KB | 0B | 3 3.5 +total | 3 1.8KB 0B 0 | - | 726B | 1 660B | 0 0B | 3 2.5KB | 0B | 3 3.5 ------------------------------------------------------------------------------------------------------------------- WAL: 1 files (0B) in: 44B written: 66B (50% overhead) Flushes: 2 @@ -931,7 +931,7 @@ Backing tables: 0 (0B) Virtual tables: 0 (0B) Local tables size: 589B Compression types: snappy: 3 -Block cache: 4 entries (195B) hit rate: 0.0% +Block cache: 4 entries (187B) hit rate: 0.0% Table cache: 1 entries (784B) hit rate: 50.0% Secondary cache: 0 entries (0B) hit rate: 0.0% Snapshots: 0 earliest seq num: 0 @@ -1019,4 +1019,4 @@ Filter utility: 0.0% Ingestions: 0 as flushable: 0 (0B in 0 tables) Cgo memory usage: 0B block cache: 0B (data: 0B, maps: 0B, entries: 0B) memtables: 0B Iter category stats: - pebble-compaction, non-latency: {BlockBytes:212 BlockBytesInCache:0 BlockReadDuration:30ms} + pebble-compaction, non-latency: {BlockBytes:218 BlockBytesInCache:0 BlockReadDuration:30ms}