Re: Question regarding adding a new generation to mono's GC

Jérôme De Cuyper <[email protected]> Sun, 7 Nov 2010 21:38:44 -0600
Newsgroups gmane.comp.gnome.mono.garbage-collection
Message-ID <[email protected]>
--===============0881451846==
Content-Type: multipart/alternative; boundary=000e0cd56b2c3b8e4e0494825ed2

--000e0cd56b2c3b8e4e0494825ed2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you Ciprian! The design is clear and understood!

I will definitively have a look in the literature but do you have any idea
what would be the main reasons to have an additional generation and what
kind of benefits it would bring?

My guess is:
- delaying a too quick promotion to the older generation may help cleaning
up medium lived objects that otherwise would not be collected until a full
scan is fired
- Gen1 will certainly be smaller than Gen2 and therefore also quicker to
scan.
- having an additional generation may contribute in minimizing the time
occupied by the "stop the world" mechanism
- increase the number of collected unreachable objects before firing a full
scan

Am I in the right track?

On Sat, Nov 6, 2010 at 2:25 AM, Ciprian Mustiata <[email protected]=
m
> wrote:

> You are right
>
> As of today as SGen works is like this:
> Gen0 (or nursery) and Old Generation split in two: the free list for larg=
e
> objects and the old generation.
>
> Your task will consist in following: create Gen1 and you will have the
> following design:
> Gen0: short lived objects
> Gen1: medium lived objects (using bump-pointer)
> Gen2: long lived objects (using bump-pointer)
> GenFreeList: large objects (regardless of generation)
>
> I really hope that your project will evolve nicely and I would love to se=
e
> this addition to Mono runtime
>
> On Sat, Nov 6, 2010 at 1:56 AM, J=C3=A9r=C3=B4me De Cuyper <
> [email protected]> wrote:
>
>> This is my first message on the mono-gc mailing list and I hope I will n=
ot
>> break any implicit rule it may have. Otherwise please let me know!
>>
>> I decided to use my CS thesis as an opportunity to contribute some code =
to
>> the mono project. Lupus kindly offered the following task:
>>
>> "we currently have 2 generations: introduce a third one that sits betwee=
n
>> the nursery and the old generation. It should be a bump-pointer
>> style generation for fast gen0 collections."
>>
>> Before starting to dig into the code, I need to justify the change that =
is
>> proposed. I suppose the purpose of a new generation is to create a  grou=
p of
>> objects from
>> a different age in order to recollect as much of them as possible
>> before sending them to the two oldest generations. Is that correct?
>>
>> Please correct me but I'm guessing the new flow of collection would be a=
s
>> follow:
>>
>> gen0 - newest objects - bump-pointer based
>> *gen1 - middle aged objects  - bump-pointer based (the new generation)*
>> gen2 - oldest generation - size-segregated freelists
>> gen3 - oldest generation - bump-pointer based
>>
>> Thank you!
>>
>> J=C3=A9r=C3=B4me De Cuyper
>> http://www.jdecuyper.com
>>
>>
>>
>> _______________________________________________
>> Mono-gc-list maillist  -  [email protected]
>> http://lists.ximian.com/mailman/listinfo/mono-gc-list
>>
>>
>
> _______________________________________________
> Mono-gc-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/mono-gc-list
>
>

--000e0cd56b2c3b8e4e0494825ed2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thank you Ciprian!=C2=A0The design is clear and understood!=C2=A0<div><br><=
/div><div>I will definitively have a look in the literature but do you have=
 any idea what would be the main reasons to have an additional generation a=
nd what kind of benefits it would bring?=C2=A0</div>

<div><br></div><div>My guess is:=C2=A0</div><div>-=C2=A0delaying a too quic=
k promotion to the older generation may help cleaning up=C2=A0<span class=
=3D"Apple-style-span" style=3D"font-family: arial, sans-serif; font-size: 1=
3px; border-collapse: collapse; ">medium lived objects that otherwise would=
 not be collected until a full scan is fired</span></div>

<div>- Gen1 will certainly be smaller than Gen2 and therefore also quicker =
to scan.</div><div>- having an additional generation may contribute in mini=
mizing the time occupied by the &quot;stop the world&quot; mechanism=C2=A0<=
/div>

<div>- increase the number of collected=C2=A0<span class=3D"Apple-style-spa=
n" style=3D"font-family: sans-serif; font-size: 13px; line-height: 19px; ">=
unreachable objects before firing a full scan</span></div><div><br></div><d=
iv>Am I in the right track?</div>

<div><br><div class=3D"gmail_quote">On Sat, Nov 6, 2010 at 2:25 AM, Ciprian=
 Mustiata <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]=
m">[email protected]</a>&gt;</span> wrote:<br><blockquote class=3D=
"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding=
-left:1ex;">

You are right<br><br>As of today as SGen works is like this:<br>Gen0 (or nu=
rsery) and Old Generation split in two: the free list for large objects and=
 the old generation.<br><br>Your task will consist in following: create Gen=
1 and you will have the following design:<br>



Gen0: short lived objects<br>Gen1: medium lived objects (using bump-pointer=
)<br>Gen2: long lived objects (using bump-pointer)<br>GenFreeList: large ob=
jects (regardless of generation)<br><br>I really hope that your project wil=
l evolve nicely and I would love to see this addition to Mono runtime<br>



<br><div class=3D"gmail_quote"><div><div></div><div class=3D"h5">On Sat, No=
v 6, 2010 at 1:56 AM, J=C3=A9r=C3=B4me De Cuyper <span dir=3D"ltr">&lt;<a h=
ref=3D"mailto:[email protected]" target=3D"_blank">jerome.decuyper@=
gmail.com</a>&gt;</span> wrote:<br>

</div></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;bo=
rder-left:1px #ccc solid;padding-left:1ex"><div><div></div><div class=3D"h5=
">

<div><div>This is my first message on the mono-gc mailing list and I hope I=
 will not break any implicit rule it may have. Otherwise please let me know=
!</div><div><br></div><div>I decided to use my CS thesis as an opportunity =
to contribute some code to the mono project. Lupus kindly offered the follo=
wing task:</div>





<div><br></div><div><div>&quot;we currently have 2 generations: introduce a=
 third one that sits=C2=A0between the nursery and the old generation. It sh=
ould be a bump-pointer</div><div>style generation for fast gen0 collections=
.&quot;</div>





</div><div><br></div><div><div>Before starting to dig into the code, I need=
 to justify the change that is proposed. I suppose the purpose of a new gen=
eration is to create a =C2=A0group of objects from</div><div>a different ag=
e in order to recollect as much of them as possible before=C2=A0sending the=
m to the two oldest generations. Is that correct?</div>





</div></div><div><br></div><div>Please correct me but I&#39;m guessing the =
new flow of collection would be as follow:=C2=A0</div><div><br></div><div>g=
en0 - newest objects -=C2=A0<span style=3D"font-family:arial, sans-serif;fo=
nt-size:13px;border-collapse:collapse">bump-pointer based</span></div>





<div><i>gen1 - middle aged objects =C2=A0-=C2=A0<span style=3D"font-family:=
arial, sans-serif;font-size:13px;border-collapse:collapse">bump-pointer bas=
ed (the new generation)</span></i></div><div>gen2=C2=A0- oldest generation =
-=C2=A0<span style=3D"font-family:arial, sans-serif;font-size:13px;border-c=
ollapse:collapse">size-segregated freelists</span></div>





<div>gen3 - oldest generation -=C2=A0<span style=3D"font-family:arial, sans=
-serif;font-size:13px;border-collapse:collapse">bump-pointer based</span></=
div><div><br></div><div>Thank you!</div><div>
<br>
</div>J=C3=A9r=C3=B4me De Cuyper<br><a href=3D"http://www.jdecuyper.com" ta=
rget=3D"_blank">http://www.jdecuyper.com</a><br><br><br>
<br></div></div>_______________________________________________<br>
Mono-gc-list maillist =C2=A0- =C2=A0<a href=3D"mailto:[email protected]=
mian.com" target=3D"_blank">[email protected]</a><br>
<a href=3D"http://lists.ximian.com/mailman/listinfo/mono-gc-list" target=3D=
"_blank">http://lists.ximian.com/mailman/listinfo/mono-gc-list</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
Mono-gc-list maillist =C2=A0- =C2=A0<a href=3D"mailto:[email protected]=
mian.com">[email protected]</a><br>
<a href=3D"http://lists.ximian.com/mailman/listinfo/mono-gc-list" target=3D=
"_blank">http://lists.ximian.com/mailman/listinfo/mono-gc-list</a><br>
<br></blockquote></div><br></div>

--000e0cd56b2c3b8e4e0494825ed2--

--===============0881451846==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Mono-gc-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-gc-list

--===============0881451846==--