Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

GC FAQ

2,508 views

Published on

Published in: Technology
  • Be the first to comment

GC FAQ

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

×