~/talk

PEP 683: Immortal Objects - A new approach for memory managing

Talkat PyCon Italia 2024 · 2024-05-22..05-25· [python]
links:none on file
slides:none on file

PEP 683 makes some Python objects truly persistent by setting their C reference count to a very large sentinel so increments/decrements skip them; implemented in C and already used at Instagram to keep many shared constants resident across forked workers, which lowers process memory growth while handling millions of requests. Measurements show roughly 2% CPU overhead in the demo, some related PEPs predict 5–8% on other configs. Examples marked immortal include small integers and empty strings, they only free at process exit and cannot be created from pure Python today.

AI-written summary · about

  1. 0:00Introduction and speaker background
  2. 1:12Talk overview and schedule
  3. 1:56Python objects and reference counting
  4. 6:55Memory leaks in threads and processes
  5. 7:17Motivation for PEP 683
  6. 11:36Copy-on-write issues in server architecture
  7. 15:15What are immortal objects?
  8. 18:24Implementation challenges and solutions
  9. 20:10Future uses of immortal objects
  10. 21:13PEP 684 and sub-interpreters
  11. 22:57PEP 730 making GIL optional
  12. 24:43Performance impact and compatibility
  13. 25:26Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.