Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

> What threshold is this?

This is the different thresholds for the generations that you can get using 
gc.get_threshold(). They are in relationship to the number of objects in every 
generation (there are slightly different rules for the latest generation).

> This method is good but we will still incur the overhead of copying objects 
> between the semi-spaces.

I am not sure what you mean with "copy" here. Moving objects from generations 
or spaces is just updating the pointers of the linked lists. Objects are not 
"copied" but "moved". 

> I have looked at a similar problem before for a different runtime and instead 
> think to consider basing promotion on the number of collections survived by 
> objects in the young generation. This requires using five bits from one of 
> two header words of each object to record its age. The objects that reach the 
> collection threshold are promoted to the old generation. This will give the 
> young objects enough time to die thereby reducing how often objects are 
> promoted to the old generation. This in turn reduces the frequency of major 
> collections hence reduced pause times.

The reason I am proposing sub-generation steps is that making the object header 
bigger is a price too high to pay for this problem. We have recently gone to 
notable efforts to reduce one word per object by complicating the code 
substantially using tagged pointers, so recording the age in the object seems 
the opposite direction. 

> I would only consider the generational semi-spaces after we have explored 
> basing promotion on the age of an object in a generation. If this doesn't 
> work, then we can use the bucket brigade scheme.

As I mentioned before, recording per-object age will be probably a no-go (the 
solution to this problem will yield memory gains because objects won't suffer 
"generational nepotism" but making the object header bigger will annihilate 
those gains) so that is the reason I proposed generational sub-steps.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39143>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to