-
-
Notifications
You must be signed in to change notification settings - Fork 452
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
bring back a non-broken get_memory_usage #33637
Comments
comment:1
I tried the last few versions of Sage (at least on CoCalc, so ubuntu linux), and get_memory_usage returns total nonsense on them. Maybe it accounts for some huge amount of virtual memory address spaces that Pari allocates (I don't know).
The "smem -ntk" command (which is I think written in Python) does give perfectly useful memory information about the above Sage process:
so this isn't an unsolvable problem. I'll update this ticket title to include "not broken". |
This comment has been minimized.
This comment has been minimized.
comment:3
|
comment:4
To clarify, when I tested our existing get_memory_usage from sage-9.4, which does not provide useful output, I was testing on Linux. Similarly, with smem. |
comment:5
With WSL widely available and cygwin consistently broken, our effective list of supported platforms is
With that in mind, what number should Even on linux however there are a number of options (see e.g. the There's also the question of subprocesses (like pexpect maxima) that would have to be accounted for separately, if at all. This doesn't have to be perfect, but I think we should have an idea of what it should do this time around. |
comment:6
Thanks for supporting bring this back, and taking such a systematic approach. For me personally, I can list some reasons that I use get_memory_usage:
In Sage there is a common contruction:
which outputs the elapsed cputime. Similar for walltime. We could support and encourage something similar for get_memory_usage, e.g.,
Acknowledgement: I copied this "cputime(t)" approach (which gives the delta) from Magma. |
comment:7
Suggestion: how about To everyone's satisfaction we use |
comment:8
For what it is worth, the names we currently use were copied (by me) from Magma, which has:
I would provide a link, but the Magma website seems down, or at least what google points at is down. |
comment:10
A few thoughts:
|
comment:11
See also https://pypi.org/project/memory-profiler/. I don't know how well that functions on different platforms. |
comment:12
Replying to @jhpalmieri:
it depends on |
comment:13
Replying to @dimpase:
The interface is worth looking at, including IPython integration via |
See #32656
and also my comments below that just reverting #32656 won't help, since get_memory_usage was evidently broken anyways.
CC: @orlitzky @koffie
Component: misc
Issue created by migration from https://trac.sagemath.org/ticket/33637
The text was updated successfully, but these errors were encountered: