You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/10/19 21:18:32 UTC
(pulsar) 13/16: [improve][bk] Lower the bookies' read-ahead after a read cache miss from 1,000 to 100 entries (#27004)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch branch-5.0
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit c691b87bf05996aa12517c7839d422849c2382a2
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Mon Oct 19 21:00:16 2026 +0300
[improve][bk] Lower the bookies' read-ahead after a read cache miss from 1,000 to 100 entries (#27004)
(cherry picked from commit 7c501d260e6bfa2a6a47033b334570503a59db4d)
---
conf/bookkeeper.conf | 6 ++++--
conf/standalone.conf | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/conf/bookkeeper.conf b/conf/bookkeeper.conf
index df433612e8f0..29b1be30d46e 100644
--- a/conf/bookkeeper.conf
+++ b/conf/bookkeeper.conf
@@ -763,8 +763,10 @@ dbStorage_writeCacheMaxSizeMb=
# By default it will be allocated to 1/4th of the available direct memory
dbStorage_readAheadCacheMaxSizeMb=
-# How many entries to pre-fill in cache after a read cache miss
-dbStorage_readAheadCacheBatchSize=1000
+# How many entries to pre-fill in cache after a read cache miss. The bookie reads them one by one in the read
+# thread, whether the reads are sequential or not, so a random read, such as of a due delayed message or a
+# redelivered one, costs as many entry reads as this. 100 keeps most of the benefit for sequential reads.
+dbStorage_readAheadCacheBatchSize=100
## RocksDB specific configurations
## DbLedgerStorage uses RocksDB to store the indexes from
diff --git a/conf/standalone.conf b/conf/standalone.conf
index 17fc3df4dd9a..a2e0ae3d0606 100644
--- a/conf/standalone.conf
+++ b/conf/standalone.conf
@@ -1523,8 +1523,10 @@ dbStorage_writeCacheMaxSizeMb=
# By default it will be allocated to 1/4th of the available direct memory
dbStorage_readAheadCacheMaxSizeMb=
-# How many entries to pre-fill in cache after a read cache miss
-dbStorage_readAheadCacheBatchSize=1000
+# How many entries to pre-fill in cache after a read cache miss. The bookie reads them one by one in the read
+# thread, whether the reads are sequential or not, so a random read, such as of a due delayed message or a
+# redelivered one, costs as many entry reads as this. 100 keeps most of the benefit for sequential reads.
+dbStorage_readAheadCacheBatchSize=100
flushInterval=60000