Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High GC pause cases high publish latency #22866

Closed
1 of 2 tasks
shibd opened this issue Jun 7, 2024 · 3 comments · Fixed by #22908 or #23006
Closed
1 of 2 tasks

High GC pause cases high publish latency #22866

shibd opened this issue Jun 7, 2024 · 3 comments · Fixed by #22908 or #23006
Assignees
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Comments

@shibd
Copy link
Member

shibd commented Jun 7, 2024

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

We have observed that using Individual ack frequently results in young generation GC and relatively high GC pauses.

image
  • Resource: k8s cluster
    • broker(1.5CPU)(3CPU 8Gi)
    • bookie(2.5CPU 8Gi) 250Gi gp3 ssd
    • zookeeper(1CPU 4Gi)
  • Version: 3.2.2

Performance cmd:

bin/pulsar-perf consume test-c 1200 -n 10 -st Shared -t 10
bin/pulsar-perf produce test-p -s 100 -time 1200 -n 10 -t 10 -ml 256M

Solution

The issue should be caused by the large long[] allocated by bitmap. The allocation invoking chain.

image image

Maybe this is a normal phenomenon and can be solved by increasing the CPU, I would like to share it here to see if there are any similar problems and suggestions in the community.

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@shibd shibd added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Jun 7, 2024
@lhotari
Copy link
Member

lhotari commented Jun 7, 2024

Btw. The metric might be wrong. It's not necessarily pause time, but GC time that happens in the background. See #18891

@mattisonchao
Copy link
Member

mattisonchao commented Jun 7, 2024

I think so. But we might need to improve here to avoid allocating a very large long[] to give GC pressure. :)

@dao-jun dao-jun self-assigned this Jun 7, 2024
@lhotari
Copy link
Member

lhotari commented Jun 14, 2024

I think so. But we might need to improve here to avoid allocating a very large long[] to give GC pressure. :)

One alternative would be to switch to use https://github.com/lemire/RoaringBitmap/ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
4 participants