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

Make Memory Usage Reporting More Reliable #10120

Closed
peterallenwebb opened this issue May 9, 2024 · 0 comments · Fixed by #10177
Closed

Make Memory Usage Reporting More Reliable #10120

peterallenwebb opened this issue May 9, 2024 · 0 comments · Fixed by #10177
Assignees
Labels
enhancement New feature or request performance

Comments

@peterallenwebb
Copy link
Contributor

peterallenwebb commented May 9, 2024

At present, dbt uses python's resource.getrusage() function to record the max RSS upon termination. This is not reliable in all of our use cases. Unfortunately this value persists across fork and exec calls on linux, which means that the process which kicks off dbt may set a memory floor that dbt never reaches, obscuring its actual memory usage.

To improve the situation, we can use the /proc/self/status file which should be present on Linux systems, extracting the value of the VmHWM line from that file, which reprsents the high water mark (HWM) of the resident set size. When this file is missing we should fall back to the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant