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

Large quantities of virtual threads may cause JFR performance issues #9536

Open
roberttoyonaga opened this issue Aug 20, 2024 · 0 comments
Open

Comments

@roberttoyonaga
Copy link
Collaborator

Describe the issue
In SubstrateVM, JFR eagerly registers virtual threads when they are mounted and during a chunk rotation. This means large numbers of virtual threads will result in a lot of work, even if the threads don't end up emitting any events. In Hotspot, virtual threads are registered lazily upon event emission.

Steps to reproduce the issue

  • Create a large number of virtual threads
  • Configure JFR to emit fewer events.

Describe GraalVM and your environment:
The problem is in the latest GraalVM master and all previous versions that support virtual threads in JFR.

Solution
Adopt a lazy approach to registration similar to Hotspot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant