Hey everyone! Weâve (me, @ambv and Marta Gomez) have been working on something pretty cool and weâre finally ready to share it with the world!
At the last Python Language Summit, I proposed that CPython should âalso benchmark memoryâ alongside our speed benchmarks, arguing that memory is âkinda important as well, especially because weâre doing big changesâ. So I figured it was time to put my work where my mouth is Also as now the Steering Council now requires that the free-threaded GIL implementation meet memory limits, with usage increases staying below 15% compared to the GIL build this will be very useful to keep track of how we are doing.
So, weâre thrilled to announce the launch of CPython Memory Tracker - a cool new memory benchmarking and analysis tool specifically designed for CPython development:
IMPORTANT: Current Version Contains Mock Data
The current deployed version contains fake/mock data for demonstration purposes while we finish all the final touches and get the real benchmark infrastructure fully operational. This is a preview release to showcase the interface and functionality. Real CPython memory benchmarks will be populated once our production benchmark runners are deployed and operational.
Is it ready yet? 
Weâre still putting the finishing touches on the production infrastructure and getting all the real benchmark runners properly deployed and configured. We also need to start preparing realistic memory benchmarks because currently we have just simple ones to prove that everything works. However, we were so excited about how this was shaping up that we wanted to give you a sneak peek of whatâs coming!
The current version you can access is populated with mock data to demonstrate the interface, functionality, and the types of insights this tool will provide once we have real CPython memory benchmarks flowing through the system. Think of this as a âcoming attractionsâ preview - you can explore the UI, test out the features, and get a feel for how memory tracking will work, but the actual data points youâre seeing are placeholder examples.
What exactly does this thing do? 
If youâve ever worked on CPython you know how frustrating it can be to track memory usage patterns across different commits and build configurations. You make a change, run some tests, but you donât really have a clear picture of how that change affects memory consumption in the long run.
Thatâs where the new tool comes in! CPython Memory Tracker is like speed.python.org but for memory: a web application that receives memory benchmarks on CPython commits and presents the results through nice, interactive visualizations.
The application tracks memory usage patterns across different commits, so you can see exactly when a regression was introduced or when an optimization actually made a difference. We also have different ways to look at the data so you can make sense and compare config builds, compilers and versions easily!
The (initial) team behind this
- Pablo Galindo Salgado (@pablogsal)
- Ĺukasz Langa (@ambv)
- Marta GĂłmez MacĂas (cyberwitch at google.com)
We absolutely have to thank @EWDurbin and @JacobCoffee for their incredible help deploying this beast on the new Cabotage system! Seriously, without their help and patience this project would still be sitting on our laptops
Ready to try it out? 
Weâre excited to see how the community uses this and what insights it brings to CPython development! If you find bugs (and you probably will), or have ideas for improvements, please donât hesitate to open issues or contribute.
This is just the beginning - we have plans for more features and improvements, but we wanted to get this into your hands as soon as possible. Stay tuned for more information about the formal release with real benchmark data coming soon!
Cheers from suprisingly hot London!