-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Severe memory leak in populate_mock()
#917
Comments
populate_mocks()
populate_mock()
I cannot reproduce your memory leak results using python 2x, @rainwoodman. I have not yet tried python 3.x but will try this soon. I can say that the It is also worth trying to see whether simply forcing garbage collection resolves the issue, which is what @johannesulf and @surhudm found in the closely related #568. |
Sorry I was testing this with Python 3.6, actually. This is an updated script, which uses
and here is my conda environment list:
|
@rainwoodman - since there is a perfectly good workaround, can you suggest how to make this explicit call to garbage collect more discoverable in the documentation? Resolving this memory leak could be quite involved, and most of my effort on Halotools now is geared towards Issue #825, so that Halotools scales with the number of available nodes. |
It's alright. I will give this a go. I may need to introduce some weak references. I'll comment on 825. |
I can confirm updating astropy to the master branch (included 6277) fixed bulk of memory leak.
#918 further reduced this to a more conservative growth:
|
I made a recent test with python3.6, numpy1.14.5, astropy3.0.4 (included 6277), halotools0.6 and the script above. Even without #918, I don't have a memory leak. However, there seems to be a consistent memory leak (even when calling gc.collect and #918) when using numpy 1.15. With numpy1.14.5 there doesn't seem to be a problem. It's probably unrelated to the commit here and maybe not caused by halotools directly. But I just wanted to mention it because it's related. |
Run the following test case and we observe the RSS size increase continuously. There is no apparent reason for this to happen reading from the face value of the code.
Result
The text was updated successfully, but these errors were encountered: