max memory used during a process

asked 2019-01-07 22:00:12 +0100

Leon gravatar image

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?

edit retag flag offensive close merge delete

Comments

Any ideas?

Leon gravatar imageLeon ( 2019-01-11 18:08:26 +0100 )edit
1

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.

Iguananaut gravatar imageIguananaut ( 2019-01-14 14:31:35 +0100 )edit
1

Although I've never used it directly myself, I believe I've seen some people produce reports from memory-profiler before.

Iguananaut gravatar imageIguananaut ( 2019-01-14 14:34:54 +0100 )edit