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

First call to omrsysinfo_get_memory_info on Windows can be very slow #7569

Open
JamesKingdon opened this issue Nov 28, 2024 · 0 comments
Open

Comments

@JamesKingdon
Copy link
Contributor

On Windows omrsysinfo_get_memory_info is implemented with the PDH apis. The first time these are used incurs a significant penalty. Specifically the first call to PdhAddCounter at

status = PdhAddCounter(statsHandle,

has been seen to take over 2s, with subsequent calls taking only a few microseconds.

While 2 to 3 seconds may not seem much it can be noticeable to an interactive user and significant for short lived JVMs. I have not yet found out why it can take much longer on some machines than others. It might be worth exploring if there are alternatives for getting the required memory stats.

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

No branches or pull requests

1 participant