[Melbourne-pm] Perl forking & Copy-on-write

Mathew Robertson mathew.blair.robertson at gmail.com
Wed Jan 18 17:24:46 PST 2017


Here is an interesting read on how Python's garbage-collector, causes
Linux's copy-on-write, to become less effective than would otherwise:

https://engineering.instagram.com/dismissing-python-garbage-collection-at-instagram-4dca40b29172#.25rzyh6im

Essentially it amounts to the GC walking over Python's read-only variables,
but still adjusting the reference-counters... thus causing Linux to see
that the memory that is backing the Python instance, to be written to.

Python's cycle-detection could also cause memory-writes due to the
mark+sweep job.

And it also has a generational collection, for short-term vs long-term
objects. Adjusting lifetime lengths, would also cause a memory-write.


Perl also uses reference counting. So I can also see that Perl's
reference-counting would cause the references to be written, when a given
Perl variable is copied.


The question is... does anyone have any insight into the same CoW failings
within the context of Perl 5 ?


Perl 6 uses a generational collector (does it *also* use reference
counting?), so the generational migration would impact CoW. But given the
rather smart people working on that project, I can envisage that some
solution may eventually get implemented.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/melbourne-pm/attachments/20170119/6fe89cfe/attachment.html>


More information about the Melbourne-pm mailing list