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

Profiling memory usage #4442

Closed
ViralBShah opened this issue Oct 6, 2013 · 5 comments
Closed

Profiling memory usage #4442

ViralBShah opened this issue Oct 6, 2013 · 5 comments

Comments

@ViralBShah
Copy link
Member

In a couple of talks I gave recently, the question of profiling memory usage came up. That got me thinking of something that could be very useful if it existed. What if we also capture the total memory usage when the sampling profiler runs, and say also the top 5 objects by memory consumption?

This data can then be analyzed and plotted to get a very good idea of the memory behaviour of the program. I know there are a lot of ifs and buts, but I thought I would post it here to see what others things.

Cc: @timholy

@ViralBShah
Copy link
Member Author

I always wanted something like this when I used Matlab. My general strategy has been to keep increasing the problem size until the program crashes and hopefully tells me where in the code it ran out of memory.

@aviks
Copy link
Member

aviks commented Oct 6, 2013

For useful memory profiling, possibly the simplest thing would be to sample both the number of objects, and total memory allocated for the top N objects at each sampling. This information can then be used to build further visualisation and analytical tools.

@juhljr
Copy link

juhljr commented Oct 18, 2013

@ViralBShah Just lurking around in the issue tracker. MATLAB can profile memory with profile on -memory and then do profile viewer. It's pretty neat.

@ViralBShah
Copy link
Member Author

@juhljr Thanks. I did not know about the memory profiler in matlab. Fortunately, I no longer have access to matlab - but I would have loved to try it out!

@timholy
Copy link
Member

timholy commented Jul 28, 2014

This was closed by #7464.

@timholy timholy closed this as completed Jul 28, 2014
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

4 participants