GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — [improve][cli] Default the pulsar-perf client memory limit to half of the JVM max direct memory by AlvaroStream · Pull Request #26491 · apache/pulsar Conversation
Contributor
Main Issue: #26340 Follow-up to #26341, which is closed. That PR proposed a fixed 64M default; this one takes the approach recommended in review instead: #26341 (comment) Motivation
@Option(names = { "-ml", "--memory-limit", }, ...) public long memoryLimit; and public boolean isMemoryLimited() { return memoryLimit > 0; } So since #20663 the performance tools run with client memory limiting disabled unless the user passes #26342 fixes the root cause of #26340 by making A fixed 64M default (the approach in the now-closed #26341) was rejected for good reason: since there has effectively been no limit, imposing 64M changes behaviour significantly for workloads with many partitions and larger messages (for example 100 partitions, 32kB messages, high rate), because far fewer messages stay in flight. Making the default proportional to the direct memory the JVM was actually given avoids that: results stay comparable across versions, the tool uses the memory it was handed, and it is still bounded. Modifications
This applies to
Verifying this change
This change is covered by existing tests.
Added Does this pull request potentially affect one of the following parts:If the box was checked, please highlight the changes
The default of the
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions… the JVM max direct memory PerformanceBaseArguments#memoryLimit had no initializer, so an unset --memory-limit passed 0 to the client builder, and 0 disables the limit rather than leaving the client default in place. The performance tools have therefore run with client memory limiting switched off since apache#20663. Instead of restoring a fixed 64M default, which would change results for workloads that relied on the unbounded behaviour, derive the default from the direct memory the JVM was actually given: half of DirectMemoryUtils.jvmMaxDirectMemory(). pulsar-perf uses direct memory only for Netty, so half leaves ample headroom while still bounding the tool. This follows the existing convention in ManagedLedgerClientFactory, which derives managedLedgerMaxReadsInFlightSizeInMB from a fraction of the same value. --memory-limit 0 still disables the limit explicitly, so the capability added by apache#20663 is retained. Only the unset behaviour changes. Assisted-by: Claude Code (Opus 5)
lhotari
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM, thanks!
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Radiancebobo
pushed a commit
to Radiancebobo/pulsar
that referenced
this pull request
… the JVM max direct memory (apache#26491)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |