Skip to content

Commit

Permalink
Return the actual RSS instead of VSZ
Browse files Browse the repository at this point in the history
Summary:
We are returning the virtual memory size (VSZ) instead of the resident set size (RSS).
We do want RSS which is approximately the memory used.

Reviewed By: compositor

Differential Revision: D53470567

fbshipit-source-id: f854c253fc484b0e0d56464443908c41bcfc41ac
  • Loading branch information
arthaud authored and facebook-github-bot committed Feb 6, 2024
1 parent 54cf5f1 commit 5beb1fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sapp/operating_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
def get_rss_in_gb() -> float:
if psutil is None:
return 0
return psutil.virtual_memory().used / (1000**3)
return psutil.Process().memory_info().rss / (1000**3)

0 comments on commit 5beb1fc

Please sign in to comment.