Navigation Menu

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

Metricbeat shows swap usage after disabling Windows paging file #19875

Closed
ErnestoBezanilla opened this issue Jul 14, 2020 · 6 comments
Closed
Labels
Metricbeat Metricbeat Stalled Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team :Windows

Comments

@ErnestoBezanilla
Copy link

Reproduced with 7.5 / 7.6 + Win 2016 Server / Win 10

After disabling the paging file on Windows systems via System Properties → Advanced → Performance → Advanced → Virtual memory metricbeat still shows swap usage.

87032262-a1d4bf00-c1e4-11ea-8088-45916f0f6843

Current library version gets swap info from the windows syscall GlobalMemoryStatusEx. Newer versions of the library have switched to an alternate approach, using the Windows system utility wmic, i.e. wmic pagefile list full

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2020
@ChrsMark ChrsMark added the Team:Services (Deprecated) Label for the former Integrations-Services team label Jul 14, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jul 14, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@andresrc andresrc added [zube]: Inbox Team:Platforms Label for the Integrations - Platforms team and removed Team:Services (Deprecated) Label for the former Integrations-Services team labels Jul 15, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@narph
Copy link
Contributor

narph commented Aug 11, 2020

@ErnestoBezanilla I had a look at the type of information GlobalMemoryStatusEx returns and it looks like this:

ullTotalPageFile The current committed memory limit for the system or the current process, whichever is smaller, in bytes.

ullAvailPageFile The maximum amount of memory the current process can commit, in bytes. This value is equal to or smaller than the system-wide available commit value.

The committed memory limit here could be thought as the maximum potential pagefile usage if pagefile is enabled and it will still be counted in systems with no pagefile.
Either way, it does not seem to reflect the current pagefile usage.

I would not go on the wmic path since we had cpu and memory high usage issues in the past but it looks like another option might be the using the '\Paging File(*)\% Usage' performance counters.

At the moment users can try the windows/perfmon metricset to get this information.

That said, the documentation should either be clarified on the windows side or a new implementation should be considered here.

@martinscholz83
Copy link
Contributor

martinscholz83 commented Apr 9, 2021

The ullTotalPageFile is the physical RAM + pagefile.sys. I think the only way to detect how much of the swap memory is used, is to check with performance counters. Because although you have enough free physical memory windows is still using the pagefile for internal stuff. So the calculation in metricbeat doesn't reflect the swap usage at all instead the whole memory usage.

@narph narph removed their assignment Oct 25, 2021
@jlind23 jlind23 added Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team and removed Team:Platforms Label for the Integrations - Platforms team labels Jan 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane)

@botelastic
Copy link

botelastic bot commented Apr 27, 2023

Hi!
We just realized that we haven't looked into this issue in a while. We're sorry!

We're labeling this issue as Stale to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1.
Thank you for your contribution!

@botelastic botelastic bot added the Stalled label Apr 27, 2023
@botelastic botelastic bot closed this as completed Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Metricbeat Metricbeat Stalled Team:Elastic-Agent-Data-Plane Label for the Agent Data Plane team :Windows
Projects
None yet
Development

No branches or pull requests

7 participants