Program uses twice as much memory in Python 3.6 than in Python 3.5

Chris Angelico rosuav at
Mon Mar 27 18:42:28 EDT 2017

On Tue, Mar 28, 2017 at 8:57 AM, Jan Gosmann <jan at> wrote:
> I have a program which uses twice as much memory when I run it in Python 3.6
> than when I run it in Python 3.5 (about 60GB instead of 30GB). I tried to
> find the reason for that, but the cumulated size (measured with
> sys.getsizeof) of all objects returned by gc.get_objects accumulates only to
> about 17GB in both cases. The program also uses NumPy and I tried tracking
> allocations with the NumPy allocation tracker in the relevant part of the
> program, but again the number of allocations are almost identical and the
> reported maximum memory usage perfectly agrees (it is about 18GB).
> Any ideas where this significant increase in memory consumption could come
> from? Or any ideas how to further debug this?

Are you able to share the program? I could try it on my system and see
if the same thing happens.


More information about the Python-list mailing list