GC FAQ
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
2,039
On Slideshare
2,003
From Embeds
36
Number of Embeds
4

Actions

Shares
Downloads
6
Comments
0
Likes
1

Embeds 36

http://coderwall.com 14
http://paper.li 10
http://a0.twimg.com 6
http://a0.twimg.com 6

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. GC FAQ nari/Narihiro Nakamura/ @nari_en Network Applied Communication Laboratory Ltd.GC FAQ Powered by Rabbit 0.9.3
  • 2. Q: What do you thinkabout REE?
  • 3. A: Totally awesomeapproach!
  • 4. But, REEis based onRuby 1.8.7.
  • 5. And, Ruby1.9s GC has many cool features.
  • 6. 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
  • 7. GC tuning params
  • 8. 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
  • 9. 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
  • 10. BTW, REE adopts the BitmapMarking GC.
  • 11. 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
  • 12. I want tocreate a faster BitmapMarking GC.
  • 13. For Ruby 1.9.4 or later.
  • 14. Q: What dothink about the future of CRubys GC?
  • 15. A: We need to breakcompatibility with CRubys C extension.
  • 16. We need efficient GC algorithms ✓ Generational GC ✓ Incremental GC ✓ Concurrent GC 15/51GC FAQ Powered by Rabbit 0.9.3
  • 17. But...No pain,No gain
  • 18. 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
  • 19. Ill createsome tools forthe transition.
  • 20. Im stillthinking about how to do it.
  • 21. Q: Why do you like GC?
  • 22. A: Imnot sure...
  • 23. PaulGraham says
  • 24. "Beating the Averages" http://www.flickr.com/photos/ringai/2733018174/
  • 25. But, Ibelieve
  • 26. "Beaten by the Averages" http://www.flickr.com/photos/ringai/2733018174/
  • 27. Forexample, GC!!
  • 28. GC is goodscapegoat.
  • 29. 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
  • 30. e.g. ✓ "SEGV!!" ✓ "GC!" 29/51GC FAQ Powered by Rabbit 0.9.3
  • 31. GC is alwayspicked on.
  • 32. InRubyKaigi2010, Chad Fowler says
  • 33. "Youre not GarbageCollector"
  • 34. GC is alwayspicked on :P
  • 35. But, GC wasmade by reallycool hackers.
  • 36. Forexample,
  • 37. John McCarthy http://www.flickr.com/photos/null0/272015955/
  • 38. He created theMark & Sweep algorithm on Lisp.
  • 39. Marvin L. Minsky taken by Bcjordan : http://en.wikipedia.org/wiki/File:Marvin_Minsky_at_OLPCb.jpg
  • 40. He created the Copying GC algorithm.
  • 41. Edsger WybeDijkstra photo 息2002 Hamilton Richards : http://userweb.cs.utexas.edu/users/EWD/
  • 42. He created Tri-colormarking.
  • 43. Donald ErvinKnuth Flickr user Jacob Appelbaum : http://flickr.com/photos/ioerror/56359970/in/set-1220741/
  • 44. He created Lisp2(one ofMark Compact algorithms).
  • 45. And manyother hackershave studied GC.
  • 46. That means GC is thetraining school of Hackers!
  • 47. I think..
  • 48. Become stronger by being beaten!
  • 49. Lets becomestronger by being beat together with GC.
  • 50. Thegoal is ...
  • 51. Punch-drunkenmaster!
  • 52. Lets train in GCsince now!!