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

Differences between lobstr::mem_used() & memuse::Sys.procmem() #73

Closed
mitch-tanney-coterie opened this issue Aug 14, 2024 · 1 comment
Closed

Comments

@mitch-tanney-coterie
Copy link

mitch-tanney-coterie commented Aug 14, 2024

I currently see differences in reported memory consumption between the following commands.

print(lobstr::mem_used())
print(memuse::Sys.procmem()$size)

The result from the memuse::Sys.procmem()$size command matches or is very close to the values I see in the RStudio Environment pane.

Therefore, what exactly is lobstr::mem_used() describing? I apologize in advance if I'm missing something obvious in the documentation, but I'm curious to know the differences between these commands.

@hadley
Copy link
Member

hadley commented Oct 21, 2024

Basically, mem_used() reports the memory that R tracks from inside the process, and I suspect what memuse and RStudio track are the memory usage of the entire process (as reported by the operating system).

@hadley hadley closed this as completed Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants