-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
HostMetrics process scraper high CPU usage during collection on Windows Server 2019 #32947
Comments
Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @drewftw, I made improvements to the CPU usage of the process scraper in v0.99.0 of the collector. Would you be able to update the collector and give that a try? Hopefully that should make it better. |
Hey @braydonk, thanks for your quick response! Sure I can try v0.99 and see if it helps the issue. I've been testing with v0.94 since thats the version my users are on, they haven't upgraded yet |
Here's the issue with the explanation for the CPU usage and how it was fixed in v0.99.0. #28849 We can't be 100% sure you aren't running into something different since this was focused on Linux, but it's worth seeing if this helps in your scenario. |
@braydonk We're still observing a similar pattern after upgrading to v0.99.0. CPU spiking to 5% when metrics are being scraped. Anything I can investigate to provide more info? |
Thanks for the info @drewftw. I don't expect I'll need anything from your environment; I expect this is the same thing many users are experiencing rather than a specific breakage. The inefficiencies that existed on Linux may exist in different ways on Windows. I'll replicate the same research I did on Linux in my Windows environment. I expect I can set aside some time next week, I will keep this issue updated with progress. |
I had time to investigate this today and I opened a PR with details and a fix! |
Removed |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners: See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Not Stale. The PR for this is open and ready for review. Can be marked stale-exempt. |
Component(s)
receiver/hostmetrics
What happened?
Description
Otel Collector running on Windows Server 2019 was observed to have high CPU spikes (3-7%) each time the hostmetrics receiver collection process ran which was set to an interval of 1 minute.
After testing the issue was narrowed down to the
process
scraper. The following shows the Otel collector CPU usage when only theprocess
scraper is enabled.After reenabling all other hostmetrics scrapers except for the
process
scraper, we can see the magnitude of the CPU spikes come down significantly (<0.5%).Steps to Reproduce
On a machine running Windows Server 2019, download the
v0.94
version of Otel collector from https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.94.0.Modify the
config.yaml
to enable the hostmetricsprocess
scraper and set the collection interval (see config attached to the issue for an example).Run the otel collector exe
Monitor the CPU usage of the otel collector on Task Manager or graph the usage using perfmon
Expected Result
CPU usage comparable to observed levels on Linux collectors (<0.5%)
Actual Result
CPU spikes to 3-7%
Collector version
v0.93.0
Environment information
Environment
OS: Windows Server 2019
OpenTelemetry Collector configuration
Log output
No response
Additional context
Additional details: Windows 2019 was running on an m5x.large EC2
The text was updated successfully, but these errors were encountered: