1 Title: CDGC first breath
2 Tags: en, d, gc, dgc, cdgc, pause time, concurrent, stop-the-world, fork
4 I'm glad to announce that now, for the first time, CDGC__ means **Concurrent**
5 D__ Garbage Collector, as I have my first (extremely raw and unoptimized)
6 version of the concurrent GC running. And I have to say, I'm very excited and
7 happy with the results from the very small benchmark I did.
9 __ http://llucax.com.ar/blog/blog/post/-2c067531
10 __ http://www.digitalmars.com/d/
12 The *stop-the-world* (pause) time was reduced by **2 orders of magnitude** for
13 the average, the standard deviation and, probably the more important, the
14 **maximum** (these are the results for a single run, measuring the pause time
15 for all the collections in that run). This is good news for people needing
16 (soft) real-time in D, even when using the GC. Where the standard D GC have
17 a pause time of 100ms, the CDGC have a pause time of 1ms.
19 The total run-time of the program was increased a little though, but not as much
20 as the pause time was reduced. Only a 12% performance loss was measured, but
21 this is just the first raw unoptimized version of the CDGC.
23 All this was measured with the voronoi benchmark, with ``-n 30000``. Here are
26 .. image:: ##POST_URL##/22-cdgc-stw-pause-time.png
29 .. image:: ##POST_URL##/22-cdgc-stw-run-time.png
32 Please note that the GC still has a global lock, so if 2 threads needs to
33 allocate while the collection is running, both will be paused anyways (I have
34 a couple of ideas on how to try to avoid that).
36 The idea about how to make the GC concurrent is based on the paper `Nonintrusive
37 Cloning Garbage Collector with Stock Operating System Support`__. I'm
38 particularly excited by the results because the reduction of the pause time in
39 the original paper were less than 1 order of magnitude better than their
40 stop-the-world collector, so the preliminary results of the CDGC are **much**
41 better than I expected.
43 __ http://www.cs.purdue.edu/homes/grr/snapshot-gc.ps
46 .. vim: set et sw=3 sts=3 :