Skip to content

Commit 1e1841c

Browse files
committed
db: make TestCompaction/l0_to_lbase_compaction faster
This test took ~1s, now it takes 0.06s.
1 parent 53f12aa commit 1e1841c

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed
Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Generate sstables with sequential, non-overlapping keys. When we trigger a compaction
22
# from L0 to Lbase, we expect all the compactions to be moves, since there are no
33
# overlapping keys being written.
4-
define l0-compaction-threshold=1 auto-compactions=off
4+
define l0-compaction-threshold=1 auto-compactions=off target-file-sizes=65536
55
----
66

77

@@ -10,59 +10,61 @@ set-concurrent-compactions range=(3,3)
1010
concurrency set to [3, 3]
1111

1212

13-
populate keylen=4 timestamps=(1) vallen=1
13+
populate keylen=3 timestamps=(1) vallen=1
1414
----
15-
wrote 475254 keys
15+
wrote 18278 keys
1616

1717

1818
flush
1919
----
2020
L0.0:
21-
000005:[a@1#10,SET-itbq@1#159645,SET]
22-
000006:[itbr@1#159646,SET-rmbh@1#319226,SET]
23-
000007:[rmbi@1#319227,SET-zzzz@1#475263,SET]
21+
000006:[a@1#10,SET-hci@1#4995,SET]
22+
000007:[hcj@1#4996,SET-oex@1#9985,SET]
23+
000008:[oey@1#9986,SET-vhm@1#14976,SET]
24+
000009:[vhn@1#14977,SET-zzz@1#18287,SET]
2425

2526

2627
auto-compact count=3
2728
----
2829
L6:
29-
000005:[a@1#10,SET-itbq@1#159645,SET]
30-
000006:[itbr@1#159646,SET-rmbh@1#319226,SET]
31-
000007:[rmbi@1#319227,SET-zzzz@1#475263,SET]
30+
000006:[a@1#10,SET-hci@1#4995,SET]
31+
000007:[hcj@1#4996,SET-oex@1#9985,SET]
32+
000008:[oey@1#9986,SET-vhm@1#14976,SET]
33+
000009:[vhn@1#14977,SET-zzz@1#18287,SET]
3234

3335
metrics
3436
----
3537
----
3638
LSM | vtables | value sep | | ingested | amp
3739
level size | tables size | count size | refsz valblk | in | tables size | r w
3840
-----------------+--------------+--------------+---------------+--------+--------------+----------
39-
L0 0B | 0 0B | 0 0 | 0B 0B | 4.5MB | 0 0B | 0 1.32
40-
L6 6MB | 3 6MB | 0 0 | 0B 0B | 0B | 0 0B | 1 0
41+
L0 0B | 0 0B | 0 0 | 0B 0B | 160KB | 0 0B | 0 1.47
42+
L6 236KB | 4 236KB | 0 0 | 0B 0B | 0B | 0 0B | 1 0
4143
-----------------+--------------+--------------+---------------+--------+--------------+----------
42-
total 6MB | 3 6MB | 0 0 | 0B 0B | 4.5MB | 0 0B | 1 2.32
44+
total 236KB | 4 236KB | 0 0 | 0B 0B | 160KB | 0 0B | 1 2.47
4345

4446
COMPACTIONS | moved | multilevel | read | written
4547
level | score ff cff | tables size | top in read | tables blob | tables sstsz blobsz
4648
------+-------------------+--------------+-------------------+--------------+---------------------
47-
L0 | - 0 0 | 0 0B | 0B 0B 0B | 0B 0B | 3 6MB 0B
48-
L6 | - 0.09 0.09 | 3 6MB | 0B 0B 0B | 0B 0B | 0 0B 0B
49+
L0 | - 0 0 | 0 0B | 0B 0B 0B | 0B 0B | 4 236KB 0B
50+
L6 | - 0.00 0.00 | 4 236KB | 0B 0B 0B | 0B 0B | 0 0B 0B
4951
------+-------------------+--------------+-------------------+--------------+---------------------
50-
total | - - - | 3 6MB | 0B 0B 0B | 0B 0B | 3 10MB 0B
52+
total | - - - | 4 236KB | 0B 0B 0B | 0B 0B | 4 396KB 0B
5153

5254
kind | default delete elision move read tomb rewrite copy multi blob virtual
53-
count | 0 0 0 3 0 0 0 0 0 0 0
55+
count | 0 0 0 4 0 0 0 0 0 0 0
5456

5557
COMMIT PIPELINE
5658
wals | memtables | ingestions
5759
files | written | overhead | flushes | live | zombie | total | flushable
5860
----------+--------------+-----------+-----------+------------+------------+-----------+------------
59-
1 (0B) | 4.5MB: 4.5MB | 0.0% | 2 | 1 (512KB) | 1 (512KB) | 9.5 M | 0 (0B)
61+
1 (0B) | 160KB: 160KB | 0.0% | 1 | 1 (512KB) | 1 (512KB) | 328 K | 0 (0B)
6062

6163
ITERATORS
6264
block cache | file cache | filter | sst iters | snapshots
6365
entries | hit rate | entries | hit rate | util | open | open
6466
-------------+-------------+--------------+-------------+--------------+-------------+------------
65-
1.5K (6.4MB) | 60.0% | 3 (840B) | 90.0% | 0.0% | 0 | 0
67+
63 (251KB) | 78.0% | 4 (1.1KB) | 90.0% | 0.0% | 0 | 0
6668

6769
FILES tables | blob files | blob values
6870
stats prog | backing | zombie | live | zombie | total | refed
@@ -87,6 +89,6 @@ KEYS
8789
COMPRESSION
8890
algorithm | tables | blob files
8991
--------------+---------------+--------------
90-
none | 5.9MB |
92+
none | 234KB |
9193
----
9294
----

0 commit comments

Comments
 (0)