Re: Question regarding adding a new generation to mono's GC
Jérôme De Cuyper <[email protected]> Tue, 9 Nov 2010 14:41:52 -0600
| Newsgroups | gmane.comp.gnome.mono.garbage-collection |
|---|---|
| Message-ID | <[email protected]> |
--===============2131156559== Content-Type: multipart/alternative; boundary=000e0cd59cb81c6bb80494a4c716 --000e0cd59cb81c6bb80494a4c716 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rodrigo! The new generation/space configuration would look like: 3 generations: young, middle-aged and old. There are 5 spaces: nursery, kinder or kindergarten, major, los and los-huge. Once there is no free memory available in the nursery, the garbage collecto= r will trigger a nursery collection which will use a copying collection to move the live objects from the nursery to the kinder generation (which may be faster than copying it to the older generation). Once the kinder generation is full, a kinder collection will be fired to move the live objects to the older generation. At first sight, a problem can arise if during a nursery collection the kinder generation gets out of space. This could be avoided if the kinder generation always has enough space to hold a= t least all objects from the nursery. Is there an easy way to "watch" what the GC is doing in detail or do I need to create some kind of log functionality? When testing out SGen, are there any test applications with typical behavior that I should be using? Or how should I be testing it= ? Cheers. J=C3=A9r=C3=B4me De Cuyper http://www.jdecuyper.com On Mon, Nov 8, 2010 at 12:08 AM, Rodrigo Kumpera <[email protected]> wrote: > Hi J=C3=A9r=C3=B4me, > > First, a minor correction on the current setup of sgen. Right now mono us= e > a 2 generations / 4 spaces setup. > > There are 2 generations: young and old. > There are 4 spaces: nursery, major, los and los-huge. > > The distinction before generation and spaces is important when discussing > things like write barriers and collections. > We have los and los-huge to better handle allocation of large > objects[1] against huge objects. > > Said that, adding the extra generation will certainly help making gen0 > collections faster. Some aspects of it > are kind of open questions that will require experimentation as their > answer are not always obvious. > > Things like how handle write barrier efficiently and figuring out a good > size relation between gen0 and gen1. > > I would love to see someone interested in cracking this issue. > > Cheers, > Rodrigo > > [1]Right now between 8k and 1020k > > > On Fri, Nov 5, 2010 at 10:56 PM, 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 >> >> > --000e0cd59cb81c6bb80494a4c716 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rodrigo!<div><br></div><div>The new generation/space configuration would= look like:</div><div><br></div><div><span class=3D"Apple-style-span" style= =3D"font-family: arial, sans-serif; font-size: 13px; border-collapse: colla= pse; "><div> 3 generations: young, middle-aged and old.</div><div>There are 5 spaces: nu= rsery, kinder or=C2=A0kindergarten,=C2=A0major, los and los-huge.</div></sp= an></div><div><br></div><div>Once there is no free memory available in the = nursery, the garbage collector will trigger a nursery collection which will= use a copying collection to move the live objects from the nursery to the = kinder generation (which may be faster than copying it to the older generat= ion). Once the kinder generation is full, a kinder collection will be fired= to move the live objects to the older generation. At first sight, a proble= m can arise if during a nursery collection the kinder generation gets out o= f space. This could be avoided if the kinder generation always has enough s= pace to hold at least all objects from the nursery.=C2=A0</div> <div><br></div><div>Is there an easy way to "watch" what the GC i= s doing in detail or do I need to create some kind of log functionality?</d= iv><div><br></div><div>When testing out SGen, are there any test applicatio= ns with=C2=A0typical=C2=A0behavior=C2=A0that I should be using? Or how shou= ld I be testing it?</div> <div><br></div><div>Cheers.</div><div><br></div><div>J=C3=A9r=C3=B4me De Cu= yper<br><a href=3D"http://www.jdecuyper.com" target=3D"_blank">http://www.j= decuyper.com</a><br><br><br> <br><br><div class=3D"gmail_quote">On Mon, Nov 8, 2010 at 12:08 AM, Rodrigo= Kumpera <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target= =3D"_blank">[email protected]</a>></span> wrote:<br><blockquote class=3D= "gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding= -left:1ex"> <div>Hi J=C3=A9r=C3=B4me,</div><div><br></div><div>First, a minor correctio= n on the current setup of sgen.=C2=A0Right now mono use a 2 generations / 4= spaces setup.</div><div><br></div><div>There are 2 generations: young and = old.</div> <div> There are 4 spaces: nursery, major, los and los-huge.</div><div><br></div><= div>The distinction before generation and spaces is important when discussi= ng things like write barriers=C2=A0and collections.</div><div>We have los a= nd los-huge to better handle allocation of large objects[1]=C2=A0against hu= ge objects.</div> <div><br></div><div>Said that, adding the extra generation will certainly h= elp making gen0 collections faster. Some aspects of it</div><div>are kind o= f open questions that will require experimentation as their answer are not = always obvious.</div> <div><br></div><div>Things like how handle=C2=A0write barrier efficiently a= nd figuring out a good size relation between gen0 and gen1.</div><div><br><= /div><div>I would love to see someone interested in cracking this issue.=C2= =A0</div> <div><br></div><div>Cheers,</div><div>Rodrigo</div><div><br></div><div>[1]R= ight now between 8k and 1020k</div><div><div><div><br><br><div class=3D"gma= il_quote"><div><div></div><div>On Fri, Nov 5, 2010 at 10:56 PM, J=C3=A9r=C3= =B4me De Cuyper <span dir=3D"ltr"><<a href=3D"mailto:jerome.decuyper@gma= il.com" target=3D"_blank">[email protected]</a>></span> wrote:<b= r> </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><div><div>T= his is my first message on the mono-gc mailing list and I hope I will not b= reak 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 cont= ribute some code to the mono project. Lupus kindly offered the following ta= sk:</div> <div><br></div><div><div>"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= ."</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'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><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></div></blockquote></div><br></div></div></div> </blockquote></div><br> </div> --000e0cd59cb81c6bb80494a4c716-- --===============2131156559== 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 --===============2131156559==--