What does the "peak" memory consumption mean? #618
-
I am running a docker container with memory limit set to 6GB. Inside this container there is a Python program executed using Scalene profiling tool. In the results there is a line which is indicated to have "peak" memory consumption of 13.4GB. This should not be possible because the container should get killed when exceeding 6GB. So what does Scalene "peak" memory consumption mean and how it is derived? Is it perhaps the accumulative memory consumption of the entire program execution? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
The peak memory is the peak allocated (requested by the app) but not necessarily the maximum amount used. If you allocate a very large object, it is allocated via |
Beta Was this translation helpful? Give feedback.
-
Thanks for the clarification. Is there a way to know the peak used memory then? @emeryberger |
Beta Was this translation helpful? Give feedback.
The peak memory is the peak allocated (requested by the app) but not necessarily the maximum amount used. If you allocate a very large object, it is allocated via
mmap
, which does not consume (physical) memory until the memory inside the object is actually accessed.