We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Measuring memory: Python memory profilers and when to use them

Formal Metadata

Title
Measuring memory: Python memory profilers and when to use them
Title of Series
Number of Parts
115
Author
Contributors
License
CC Attribution - NonCommercial - ShareAlike 4.0 International:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
If your program is using too much memory, it can crash, thrash, or just run more slowly. To reduce memory usage, you need to measure it somehow. There are a number of tools to measure Python memory usage, however. Which one should you pick? This depends heavily on your use case. In this talk you will learn about the different ways memory problems manifest in Python, the memory usage patterns of different application types, and which tools to use in each situation. For web applications, the typical problem is memory leaks: memory that is never freed adds up if your program runs forever. That means you need tools to help you identify the source of memory leaks, whether in Python or in C extensions. For data processing applications like data science or scientific computing, the problem is typically caused by processing large amounts of data. Here you need to find the peak memory usage, and what code what responsible for it.