From ea7940e5a7eba8e0c59e103202268e889db8b515 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Tue, 13 Dec 2022 09:10:44 -0800 Subject: [PATCH] lib/mergeset: reduce the parts threshold before starting assisted merges This should improve query speed in general case. This is a follow-up for d1af6046c7f42375b69a40a93bcf14f0ae61fb44 --- lib/mergeset/table.go | 2 +- lib/storage/partition.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mergeset/table.go b/lib/mergeset/table.go index aa921b9e1f..29afa687a2 100644 --- a/lib/mergeset/table.go +++ b/lib/mergeset/table.go @@ -34,7 +34,7 @@ const maxInmemoryParts = 64 // This number may be reached when the insertion pace outreaches merger pace. // If this number is reached, then assisted merges are performed // during data ingestion. -const maxFileParts = 256 +const maxFileParts = 64 // Default number of parts to merge at once. // diff --git a/lib/storage/partition.go b/lib/storage/partition.go index 77f07a2443..41b1a7177a 100644 --- a/lib/storage/partition.go +++ b/lib/storage/partition.go @@ -38,7 +38,7 @@ const maxInmemoryPartsPerPartition = 32 // The maximum number of small parts in the partition. // // If the number of small parts reaches this value, then assisted merge runs during data ingestion. -const maxSmallPartsPerPartition = 128 +const maxSmallPartsPerPartition = 64 // Default number of parts to merge at once. //