max memory used during a process
In Mathematica, the command MaxMemoryUsed[computation]
tells you what the largest usage of RAM was when executing some computation
. Is there a similar comand in SageMath?
Any ideas?
Off the top of my head, no, I don't think so. One could write such a utility (in fact such utilities likely already exist outside
sage
) to track memory usage of a process over some period of time (e.g. start and stop of some computation). It would also have to track memory usage across child processes as many computations can launch subprocesses, either to run other programs, or to parallelize the computation. This make computing the exact memory usage a bit tricky since parallel processes in particular will use a lot of shared memory.Although I've never used it directly myself, I believe I've seen some people produce reports from memory-profiler before.