GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Cli tools] Disable Pulsar client memory limit by default by lhotari · Pull Request #15748 · apache/pulsar

Conversation

@lhotari

@lhotari lhotari commented May 24, 2022

Copy link
Copy Markdown
Member

Motivation

  • There's a regression with the tools since the memory limit cannot be adjusted

    • It's better to default to the previous setting of disabling memory limits
      so that the performance profile doesn't change because of the memory limit.
  • Memory limit is enabled by default in "PIP-120: Enable client memory limit by default", PIP-120: Enable client memory limit by default #13306 . PR was PIP-120 : Enable client memory limit controller by default #13344 .

Modifications

Set .memoryLimit(0, SizeUnit.BYTES) for PulsarClient builders in Cli tools.

Additional context

#15723 restores the default maxPendingMessages & maxPendingMessagesAcrossPartitions limits for producers to the defaults used before PIP-120 changes when the memory limit is disabled. That might be necessary in some cases for restoring the pre-PIP-120 behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lhotari lhotari added area/cli doc-not-needed Your PR changes do not impact docs release/2.10.1 labels May 24, 2022
@lhotari lhotari added this to the 2.11.0 milestone May 24, 2022
@lhotari
lhotari requested review from codelipenghui, eolivelli, hezhangjian and merlimat May 24, 2022 08:24
@lhotari lhotari self-assigned this May 24, 2022
@lhotari lhotari mentioned this pull request May 24, 2022
[Broker, Functions, Websocket] Disable memory limit controller in internal Pulsar clients #15752
Merged
@lhotari lhotari closed this May 27, 2022
@lhotari lhotari reopened this May 27, 2022
@lhotari
[Cli tools] Disable Pulsar client memory limit by default
8742024
- There's a regression with the tools since the memory limit cannot be adjusted
  - It's better to default to the previous setting of disabling memory limits
    so that the performance profile doesn't change because of the memory limit.
@lhotari
lhotari force-pushed the lh-disable-memory-limit-in-performance-clients branch from 3e13d58 to 8742024 Compare June 2, 2022 06:57
@lhotari
lhotari requested review from michaeljmarshall and nicoloboschi June 2, 2022 06:59
nicoloboschi
nicoloboschi approved these changes Jun 2, 2022
View reviewed changes
@lhotari
lhotari merged commit a6a7516 into apache:master Jun 2, 2022
@merlimat

merlimat commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

There's a regression with the tools since the memory limit cannot be adjusted

@lhotari Can you elaborate on what kind of regression it was seen there? I have in general experienced the opposite, going from msg-count based to memory based.

I think this change goes in the wrong direction as it completely removes the memory limit and it will easily cause OOM in the client, since there's no limitation on the producer queue size.

I believe a better change here is to make the memory limit configurable for the perf producer.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lhotari lhotari mentioned this pull request Jun 2, 2022
[Cli tools] Add command line option for configuring the memory limit #15912
Closed
@lhotari

lhotari commented Jun 2, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

Can you elaborate on what kind of regression it was seen there? I have in general experienced the opposite, going from msg-count based to memory based.

We have run into regressions with pulsar-perf that seem to be caused by the change in the memory limit. Some test results are very sensitive of the producer's maxPendingMessages and maxPendingMessagesAcrossPartitions settings (as well as batchingMaxBytes, batchingMaxPublishDelayMicros and batchingMaxMessages settings).

For a performance testing tool such as pulsar-perf, I think it's expected that all parameters impacting performance should be tunable. That's why I think it's better to disable the memory limit until there's a configurable parameter.

I believe a better change here is to make the memory limit configurable for the perf producer.

I agree. Until that is done, it's better to set the limit to 0 by default. I added #15912 for tracking this.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sijie sijie mentioned this pull request Jun 2, 2022
ISSUE-15912: [Cli tools] Add command line option for configuring the memory limit streamnative/pulsar-archived#4329
Open
lhotari added a commit that referenced this pull request Jun 6, 2022
@lhotari
[Cli tools] Disable Pulsar client memory limit by default (#15748)
d847e1c
- There's a regression with the tools since the memory limit cannot be adjusted
  - It's better to default to the previous setting of disabling memory limits
    so that the performance profile doesn't change because of the memory limit.

(cherry picked from commit a6a7516)
@lhotari lhotari added the cherry-picked/branch-2.10 label Jun 6, 2022
nicoloboschi pushed a commit to datastax/pulsar that referenced this pull request Jun 17, 2022
@lhotari @nicoloboschi
[Cli tools] Disable Pulsar client memory limit by default (apache#15748)
870af8a
- There's a regression with the tools since the memory limit cannot be adjusted
  - It's better to default to the previous setting of disabling memory limits
    so that the performance profile doesn't change because of the memory limit.

(cherry picked from commit a6a7516)
@lhotari lhotari mentioned this pull request Aug 17, 2026
[fix][cli] Restore the 64M default client memory limit in pulsar-perf #26341
Closed
1 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nicoloboschi nicoloboschi nicoloboschi approved these changes
@merlimat merlimat Awaiting requested review from merlimat
@eolivelli eolivelli Awaiting requested review from eolivelli
@codelipenghui codelipenghui Awaiting requested review from codelipenghui
@hezhangjian hezhangjian Awaiting requested review from hezhangjian
@michaeljmarshall michaeljmarshall Awaiting requested review from michaeljmarshall

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lhotari lhotari

Labels

area/cli cherry-picked/branch-2.10 doc-not-needed Your PR changes do not impact docs release/2.10.1

Projects

None yet

Milestone

2.11.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@lhotari @merlimat @nicoloboschi
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.