tag:blogger.com,1999:blog-273593670040001243.post4823195136324497460..comments2008-05-03T18:39:43.125-07:00Comments on Useless Factor: A couple GC algorithms in more detailDaniel Ehrenberghttp://www.blogger.com/profile/00902922561603041049noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-273593670040001243.post-4108166167858834662008-05-03T18:23:00.000-07:002008-05-03T18:23:00.000-07:00It'd be great if it was orthogonal, but unfortunat...It'd be great if it was orthogonal, but unfortunately I doubt it is. Let's say you have a live set (x bytes) and memory provided from the OS (y bytes).<BR/><BR/>If you manage to completely avoid fragmentation and overhead, you're left with y-x bytes to use for your younger generations.<BR/><BR/>So now the question is how you'll divide up those bytes.<BR/><BR/>I used to think three generation was ideal, but then I noticed that none of the benchmarks were using three, just two. Obviously this also varies with the behaviour of the workload.dmpk2knoreply@blogger.comtag:blogger.com,1999:blog-273593670040001243.post-14595094518903091612008-05-03T18:10:00.000-07:002008-05-03T18:10:00.000-07:00dmpk2k,You're right. I don't have empirical eviden...dmpk2k,<BR/><BR/>You're right. I don't have empirical evidence one way or the other, which is very unfortunate. But the number of generations is orthogonal from the choice of nursery size. I've just heard, from several places, that three generations happens to turn out well most of the time, and that's not a very strong argument.Daniel Ehrenberghttp://www.blogger.com/profile/00902922561603041049noreply@blogger.comtag:blogger.com,1999:blog-273593670040001243.post-45029865980212752132008-05-03T17:54:00.000-07:002008-05-03T17:54:00.000-07:00> I don't know why, but the papers about this seem...> I don't know why, but the papers about this seem to use a two-generation rather than three-generation model.<BR/><BR/>Generations don't come free. For the same amount of memory requested from the OS you need to run minor collections more often (since the nursery space(s) need to be smaller).<BR/><BR/>Also, objects that survive the first two generations will have been copied more often. So the question is if the second copy is worth it, particularly when you consider that it requires more frequent minor collections.dmpk2knoreply@blogger.com