-
Notifications
You must be signed in to change notification settings - Fork 19
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
Memory growth #839
Comments
Is the growth reflected in
I.e. do those increase timestep-over-timestep? If there is growth, can identify what bins in the memory pool are affected? Can you identify which allocations? Python makes it straightforward to attach stack traces to allocations. Do we know if this growth is of "array" memory or "other" memory? How do your findings change if you call What is the simplest driver that exhibits the growth? I gather from @lukeolson that, maybe, |
Also, it looks like including bin size data |
The growth happens both with and without the pool. Here is an example with
|
Btw, please keep vertical space in mind when writing issue text. Write claims, and hide supporting evidence under a |
Tracing the memory pool allocations with
Looking at the graph above, it seems like freeing the held memory may not help?
The memory usage I initially added here is the RSS high water mark measured with illinois-ceesd/logpyle#79 (= |
Thanks. This tally of pool-held memory means (to me) that the issue is very likely "above" the pool, i.e. in Python. I.e., replacing the memory allocation scheme used by the pool should not help, or at least not much. My read of this is that some member of a group of objects that cyclically refer to each other holds a reference to our arrays. This follows because Python's refcounting frees objects without cyclic referents effectively instantaneously, i.e. as soon as a reference to them is no longer being held. To validate the latter conclusion, you could try calling Assuming the above conclusion is correct, the way to address this would be to find the objects referring to the arrays and make it so they no longer hold those references.
|
I've seen the growth in all drivers I tried, including the simplest ones:
The growth only happens in lazy mode, not eager. The specific memory pool used (SVM, CL buffer) or lazy actx class do not seem to matter. Graph for mirgecom's wave: |
It does seem that running |
It's important that |
I like your idea of running it every |
A few more updates for mirgecom's wave (w/ lazy eval):
Edit:
|
I understand that there is some type of memory growth occurring.
From the 2023-02-17 dev meeting notes, I gather that
Possibly related: #212.
cc @matthiasdiener
The text was updated successfully, but these errors were encountered: