[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-07 Thread Alexei Komarov


Alexei Komarov  added the comment:

Oh, I see it now. I've been missing the fact that long_lived_pending is 
accumulated each 1st gen collection until full collection.

Thanks!

--
stage:  -> resolved
status: open -> closed

___
Python tracker 
<https://bugs.python.org/issue46912>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-06 Thread Alexei Komarov


Change by Alexei Komarov :


--
nosy: +pablogsal, pitrou

___
Python tracker 
<https://bugs.python.org/issue46912>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46912] Full gc collection blocked from collecting after some amount of objects in oldest gen

2022-03-03 Thread Alexei Komarov


New submission from Alexei Komarov :

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 
= 7 ===> X=28. 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).

--
components: Extension Modules
messages: 41
nosy: al3x3i.k
priority: normal
severity: normal
status: open
title: Full gc collection blocked from collecting after some amount of objects 
in oldest gen
type: behavior
versions: Python 3.10

___
Python tracker 
<https://bugs.python.org/issue46912>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com