Hello,

Patric Michaud made some observations regarding parrot GC changes. The basic findings are that parrot 3.0 with MS2 GC has the same execution time of rakudo spectest as current parrot with GMS GC, current MS2 throughput is worse compared to parrot 3.0. He was wondering if GMS is then better GC than MS2.

I think I know what causes the performance differences. Improved tri-colour MS2 GC has landed in parrot 3.0. It did not have adaptive triggering that the old MS GC had - it kicked out every 1/8 of system memory allocated (if my memory serves me correctly). It wasted a lot of memory and had long pauses. For example, on my system compiling rakudo used 700+ M.

In parrot 3.1 Nick Wellnhofer have ported GC adaptive triggering system from MS to MS2 GC core. It compiled rakudo in 400-500M but somewhat slower because it kicked more frequently. It also had improved on interactive loads - there were no long pauses.

GMS also landed at the same time in master - it does not have adaptive triggering - it kicks minor collection on every 1/100 of system memory allocated. Older generation GC is started on 10 younger generation collection. It has 8 generations. So it wastes a lot less memory - it could compile rakudo in 256M of RAM and have further improved interactive behavior. Parrot with GMS compiles Rakudo in the same time as MS2 without adaptive triggering but in 1/2-1/3 of the memory.

So, though execution times of GMS and MS2 (without adaptive triggering) are similar, their other characteristics are quite different - GMS wastes a lot less memory, has better interactive behavior etc.

I have also ported adaptive triggering system to GMS but the performance was the same as current GMS. It wasted a lot more memory (comparable to MS2 with adaptive triggering). The current triggering system relies on the size of the youngest generation, adaptive triggering system of MS2 depends on the size of all allocated memory and complicates the things. Current GMS has more uniform pauses than GMS with adaptive triggering. These are the causes I have dropped this first experiment for adaptive triggering of GMS GC.

GMS has some tunable parameters but every tuning is compromise. So it will be best to pick some sane defaults (we are not far from them on my account) and provide mechanism to change them with parrot options. My preliminary experiments show that 3-4 generations in GMS are enough and there also a lot other variables to tune - I have not done the extensive test in order to change the current defaults.

--
Luben Karavelov
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to