From 0def3545ac74b95b145752f5c1ce1fe18cc07665 Mon Sep 17 00:00:00 2001 From: Zefeng Yin Date: Thu, 30 Apr 2026 16:39:14 +0800 Subject: [PATCH] fix: rollback hnsw ChunkSize to 2M --- src/core/algorithm/hnsw/hnsw_entity.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/algorithm/hnsw/hnsw_entity.h b/src/core/algorithm/hnsw/hnsw_entity.h index 74b959e8..71f2080c 100644 --- a/src/core/algorithm/hnsw/hnsw_entity.h +++ b/src/core/algorithm/hnsw/hnsw_entity.h @@ -516,8 +516,8 @@ class HnswEntity { constexpr static uint32_t kDefaultDocsHardLimit = 1 << 30U; // 1 billion constexpr static float kDefaultDocsSoftLimitRatio = 0.9f; constexpr static size_t kMaxChunkSize = 0xFFFFFFFF; - constexpr static size_t kDefaultChunkSize = 16 * 1024UL; - constexpr static size_t kDefaultMaxChunkCnt = 128 * 50000UL; + constexpr static size_t kDefaultChunkSize = 2 * 1024UL * 1024UL; + constexpr static size_t kDefaultMaxChunkCnt = 50000UL; constexpr static float kDefaultNeighborPruneMultiplier = 1.0f; // prune_cnt = upper_max_neighbor_cnt * multiplier constexpr static float kDefaultL0MaxNeighborCntMultiplier =