Is persistent Heapsize memory growth a sign of memory leak? #422
Replies: 1 comment
-
Hi, thanks for opening the discussion. Unfortunately, without looking at the application is difficult to say what's going on, and even with the application could be a challenging task. Looking at your plot it looks that this is indeed a memory leak because the heap size (what your application is requesting) is growing and growing across what seems to be regular patterns. There is some memory in these chunks that's not being deallocated. You can try to use our new temporal flame graphs with the https://bloomberg.github.io/memray/flamegraph.html#temporal-flame-graphs |
Beta Was this translation helpful? Give feedback.
-
Hi, dear team. You are doing a great job! This product is fantastic!
@pablogsal , could you, please, kindly help me...
I was faced with the task of having a test on memory leakage. Our app (refinitiv-data) is a thin layer between User and Server.
The current script created 5000 streams by iterations.
testrdp.py.zip
We've got feedback about some memory leak assumptions.
Windows perf results below:
Then I tested with Memray on MacOS Ventura 13.4.
Memray 1.8.1, python 3.10
export PYTHONMALLOC="malloc"
memray run -f -o memray_capture_develop.bin --trace-python-allocators testrdp.py
memray flamegraph --leaks memray_capture_develop.bin
Graph with initial issues - memray-flamegraph-memray_capture_develop.html.zip
Heapsize starts ~94.69Mb, ends ~113.5Mb
Do I understand correctly that Python process constantly asks OS to allocate more memory (Heapsize memory)?
Resident size memory is a real app memory that depends on allocated/deallocated objects?
Does this look like a memory leak?
How should look like an absence of memory leak, the Heapsize graph has to come back to initial(start) size ?
Also we did some app adjustments to streams
Heapsize starts ~93.75Mb, ends ~105.3Mb
Graph with fix - memray-flamegraph-memray_capture_fix.html.zip
Thank you for you time.
Beta Was this translation helpful? Give feedback.
All reactions