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

Change virtual threads metrics default to disabled; remove count-leve enable/disable; update tests and doc #9701

Merged
merged 2 commits into from
Jan 27, 2025

Conversation

tjquinno
Copy link
Member

@tjquinno tjquinno commented Jan 27, 2025

Description

Resolves #9652

Release Note

Joe - this release note supersedes all earlier ones for virtual threads metrics.


Helidon's built-in meters now include new ones for additional thread information.

New meters related to virtual thread usage (disabled by default)

  • current number of active virtual threads
  • total number of virtual thread starts
  • total number of pinned threads
  • timer (with histogram) of pinned threads' durations
  • number of failed attempts to submit virtual threads to platform threads

For performance reasons Helidon by default does not report the virtual threads meters.

New meter related to platform threads

Helidon also now exposes the new system meter thread.starts which displays the total number of platform thread starts performed in the JVM since server start-up.

Configuration

  • metrics.virtual-threads.enabled

    Whether the virtual thread meters feature is enabled.

    Default: false

  • metrics.virtual-threads.pinned.threshold

    Helidon tracks pinned thread events only if the duration reaches a threshold. This value is a Duration expression.

    Default: PT0.02S (20 ms)


Overview of the PR changes

  • The virtual threads meters are now disabled by default.
  • There is no separate setting for enabling the virtual thread count meters.
  • Test changes.
  • Doc changes.
  • Revert earlier change to mp-1. It contains a test verifying how many base meters are registered. With virtual threads meters now disabled by default, the expected value goes from 1 back to 0. (I'd changed this in an earlier PR for virtual threads meters.)

Documentation

Includes updates to the SE and MP metrics guide pages and the generated doc for config.

@tjquinno tjquinno self-assigned this Jan 27, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 27, 2025
spericas
spericas previously approved these changes Jan 27, 2025
@tjquinno tjquinno merged commit 7d1d452 into helidon-io:main Jan 27, 2025
58 checks passed
@tjquinno tjquinno deleted the 4.x-vthread-default branch January 27, 2025 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4.x Allow user to influence JFR RecordingStream used for virtual thread meters
2 participants