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

Add memrecap callback plugin #37940

Closed
wants to merge 2 commits into from
Closed

Conversation

sivel
Copy link
Member

@sivel sivel commented Mar 26, 2018

SUMMARY

Adds a memrecap callback plugin that utilizes the memory_profiler python module.

Example output:

MEMORY RECAP *********************************************************************************************************************************************************************************************************************************
Execution Maximum: 226.66MB

Gathering Facts: 225.33MB
Check who I am 1: 155.12MB
Check who I am 2: 142.66MB
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

lib/ansible/plugins/callback/memrecap.py

ANSIBLE VERSION
devel
ADDITIONAL INFORMATION

@ansibot ansibot added feature This issue/PR relates to a feature request. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Mar 26, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Mar 26, 2018
@ryansb ryansb removed the needs_triage Needs a first human triage before being processed. label Mar 27, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 4, 2018
@sivel
Copy link
Member Author

sivel commented Apr 5, 2018

I'm now debating this callback. After some extensive testing, it seems that the way memory_profiler totals memory with children can report a value exceeding actual memory utilization.

The method it uses for calculating memory is to sum RSS from parent and children. However, due to COW and forks, it's likely that much of the memory reported via RSS is actually shared.

@sivel
Copy link
Member Author

sivel commented Apr 12, 2018

Closing in favor of #38675

#38675 is limited to where it can be utilized, but as described above, this PR will produce inaccurate results.

@sivel sivel closed this Apr 12, 2018
@ansible ansible locked and limited conversation to collaborators Apr 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue/PR relates to a feature request. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants