This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author al3x3i.k
Recipients al3x3i.k
Date 2022-03-03.14:48:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1646318914.17.0.951983551273.issue46912@roundup.psfhosted.org>
In-reply-to
Content
Hi!

Maybe it is just my misunderstanding of the mechanism, so please excuse me if it is so. Looking at the GC module code, I think that once there are X objects in the oldest gen, a full collection blocked due to the condition https://github.com/python/cpython/blob/3.10/Modules/gcmodule.c#L1465-L1467 being always True.

So, if youngest gen is collected each 700 objects, the middle gen will have maximum 7000 objects. Full collection will be triggered each ~70K objects. X/4 = 70000 ===> X=280000. If oldest gen has >280K objects in it, the condition for full collection (long_lived_pending < gcstate->long_lived_total / 4) is always true since to my understanding, long_lived_pending is 70K at most, and got zeroed each full collection (https://github.com/python/cpython/blob/3.10/Modules/gcmodule.c#L1253).
History
Date User Action Args
2022-03-03 14:48:34al3x3i.ksetrecipients: + al3x3i.k
2022-03-03 14:48:34al3x3i.ksetmessageid: <1646318914.17.0.951983551273.issue46912@roundup.psfhosted.org>
2022-03-03 14:48:34al3x3i.klinkissue46912 messages
2022-03-03 14:48:34al3x3i.kcreate