lhotari commented on code in PR #24359:
URL: https://github.com/apache/pulsar/pull/24359#discussion_r2111454136
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/cache/RangeEntryCacheImpl.java:
##########
@@ -332,14 +332,12 @@ void doAsyncReadEntriesWithAcquiredPermits(ReadHandle lh,
Position firstPosition
final ReadEntriesCallback
originalCallback, Object ctx,
InflightReadsLimiter.Handle
handle, long estimatedReadSize) {
if (!handle.success()) {
- String message = String.format(
- "Couldn't acquire enough permits on the max reads in
flight limiter to read from ledger "
- + "%d, %s, estimated read size %d bytes for %d
entries (check "
- + "managedLedgerMaxReadsInFlightSizeInMB, "
- +
"managedLedgerMaxReadsInFlightPermitsAcquireTimeoutMillis and "
- +
"managedLedgerMaxReadsInFlightPermitsAcquireQueueSize)", lh.getId(), getName(),
- estimatedReadSize, numberOfEntries);
- log.error(message);
+ String message = String.format("Couldn't acquire enough permits on
the max reads in flight limiter to read"
+ + " from ledger %d, %s, estimated read size %d bytes for %d
entries. because the pending read requests"
+ + " queue is full, please increase the broker config"
+ + " managedLedgerMaxReadsInFlightPermitsAcquireQueueSize.",
Review Comment:
This tuning recommendation about increasing
`managedLedgerMaxReadsInFlightPermitsAcquireQueueSize` isn't so straight
forward since `managedLedgerMaxReadsInFlightSizeInMB` and
`managedLedgerMaxReadsInFlightPermitsAcquireTimeoutMillis` settings also impact
the situation.
If the `managedLedgerMaxReadsInFlightSizeInMB` value is higher, the queuing
wouldn't happen in the first place. The general tuning recommendation should be
to primarily increase `managedLedgerMaxReadsInFlightSizeInMB`, make more
direct memory for the broker and possibly also increase the queue size.
When the timeout `managedLedgerMaxReadsInFlightPermitsAcquireTimeoutMillis`
is shorter, the queue length would eventually be shorter when reads are
rejected due to being in the queue for too long. However, reducing the timeout
isn't very helpful since retries would happen eventually and that would just
add unnecessary load to the system.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]