1 Jul 2011 01:12
parallel stop-the-world garbage collection
I cleaned up the remaining code from my go-gc fork and integrated it into the current Go tree. It still stops the world during garbage collection but if there are extra procs lying around idle, it will use them (up to GOMAXPROCS) to parallelize both the mark and the sweep phases. There is a CL at http://codereview.appspot.com/4641082. It is not ready for review, and it only runs on linux/amd64 because that is the only platform I bothered to implement usleep on. One thing I've noticed is that while programs do get a little faster, the total user time increases by much more than the saved real time. Even making the busy loops give up and do timed sleeps after the first few iterations doesn't help - it's not spinning that is the problem, but there is a problem. For example, the test/bench/parser program has these times when I vary the number of cores the collector can use on a 16-core machine: 1 38.0u 38.8r 2 44.6u 35.2r 3 47.8u 32.8r 4 56.6u 33.6r 5 53.9u 33.0r 6 51.0u 32.0r 7 53.9u 33.4r 8 54.0u 32.9r(Continue reading)
RSS Feed