[issue40255] Fixing Copy on Writes from reference counting

Eddie Elizondo report at bugs.python.org
Sat Apr 11 11:40:21 EDT 2020


New submission from Eddie Elizondo <eduardo.elizondorueda at gmail.com>:

Copy on writes are a big problem in large Python application that rely on multiple processes sharing the same memory.

With the implementation of `gc.freeze`, we've attenuated the problem by removing the CoW coming from the GC Head. However, reference counting still causes CoW.

This introduces Immortal Instances which allows the user to bypass reference counting on specific objects and avoid CoW on forked processes.

Immortal Instances are specially useful for applications that cache heap objects in shared memory which live throughout the entire execution (i.e modules, code, bytecode, etc.)

----------
components: Interpreter Core
messages: 366216
nosy: eelizondo
priority: normal
severity: normal
status: open
title: Fixing Copy on Writes from reference counting
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40255>
_______________________________________


More information about the Python-bugs-list mailing list