[Python-Dev] The untuned tunable parameter ARENA_SIZE (original) (raw)

Larry Hastings larry at hastings.org
Thu Jun 1 03:38:09 EDT 2017


When CPython's small block allocator was first merged in late February 2001, it allocated memory in gigantic chunks it called "arenas". These arenas were a massive 256 KILOBYTES apiece.

This tunable parameter has not been touched in the intervening 16 years. Yet CPython's memory consumption continues to grow. By the time a current "trunk" build of CPython reaches the REPL prompt it's already allocated 16 arenas.

I propose we make the arena size larger. By how much? I asked Victor to run some benchmarks with arenas of 1mb, 2mb, and 4mb. The results with 1mb and 2mb were mixed, but his benchmarks with a 4mb arena size showed measurable (>5%) speedups on ten benchmarks and no slowdowns.

What would be the result of making the arena size 4mb?

What say you? Vote for your favorite color of bikeshed now!

//arry/

-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20170601/57602cee/attachment.html>



More information about the Python-Dev mailing list