GC FAQ nari/Narihiro Nakamura/ @nari_en Network Applied Communication Laboratory Ltd.GC FAQ Powered by Rabbit 0.9.3
Q: What do you thinkabout REE?
A: Totally awesomeapproach!
But, REEis based onRuby 1.8.7.
And, Ruby1.9s GC has many cool features.
Features of Ruby 1.9 series ✓ Suppression of Fragmentation - since 1.9.1 ✓ GC::Profiler - since 1.9.1 ✓ LazySweepGC - since 1.9.3 ✓ GC tuning params - since 1.9.3 5/51GC FAQ Powered by Rabbit 0.9.3
GC tuning params
GC tuning params ✓ You can tune GC by using environment variables. ✓ RUBY_GC_MALLOC_LIMIT ✓ RUBY_HEAP_MIN_SLOTS ✓ RUBY_FREE_MIN ✓ Since Ruby 1.9.3 7/51GC FAQ Powered by Rabbit 0.9.3
GC tuning params ✓ Its originally and idea from REE. ✓ <URL:http:// www.rubyenterpriseedition.com/ documentation.html#_garbage_collector _performance_tuning> ✓ Please check this page if you are interesting. 8/51GC FAQ Powered by Rabbit 0.9.3
BTW, REE adopts the BitmapMarking GC.
REEs Bitmap Marking ✓ Its implemented on Ruby 1.8s heap structure. ✓ To port it for Ruby 1.9 would be hard. ✓ And, it would be slow. 10/51GC FAQ Powered by Rabbit 0.9.3
I want tocreate a faster BitmapMarking GC.
For Ruby 1.9.4 or later.
Q: What dothink about the future of CRubys GC?
A: We need to breakcompatibility with CRubys C extension.
We need efficient GC algorithms ✓ Generational GC ✓ Incremental GC ✓ Concurrent GC 15/51GC FAQ Powered by Rabbit 0.9.3
But...No pain,No gain
Pains ✓ These algorithms need a write barrier. ✓ We should insert a write barrier on the C extension. ✓ This breaks compatibility of the C extension. 17/51GC FAQ Powered by Rabbit 0.9.3
Ill createsome tools forthe transition.
Im stillthinking about how to do it.
Q: Why do you like GC?
A: Imnot sure...
"Beating the Averages" http://www.flickr.com/photos/ringai/2733018174/
"Beaten by the Averages" http://www.flickr.com/photos/ringai/2733018174/
GC is goodscapegoat.
e.g. ✓ "Memory isnt freed!" ✓ "The cause is GC!" ✓ "My program is slow!" ✓ "The cause is GC!" 28/51GC FAQ Powered by Rabbit 0.9.3
e.g. ✓ "SEGV!!" ✓ "GC!" 29/51GC FAQ Powered by Rabbit 0.9.3
GC is alwayspicked on.
InRubyKaigi2010, Chad Fowler says
"Youre not GarbageCollector"
GC is alwayspicked on :P
But, GC wasmade by reallycool hackers.
John McCarthy http://www.flickr.com/photos/null0/272015955/
He created theMark & Sweep algorithm on Lisp.
Marvin L. Minsky taken by Bcjordan : http://en.wikipedia.org/wiki/File:Marvin_Minsky_at_OLPCb.jpg
He created the Copying GC algorithm.
Edsger WybeDijkstra photo 息2002 Hamilton Richards : http://userweb.cs.utexas.edu/users/EWD/
He created Tri-colormarking.
Donald ErvinKnuth Flickr user Jacob Appelbaum : http://flickr.com/photos/ioerror/56359970/in/set-1220741/
He created Lisp2(one ofMark Compact algorithms).
And manyother hackershave studied GC.
That means GC is thetraining school of Hackers!
Become stronger by being beaten!
Lets becomestronger by being beat together with GC.