Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby应用性能调优实践

Li Zhe
October 12, 2015

 Ruby应用性能调优实践

了解Ruby的性能调优关键,以及都有哪些工具可以利用

Li Zhe

October 12, 2015
Tweet

Other Decks in Programming

Transcript

  1. ౯ժฎଗՋԍጱ? • OneAPM • ௔ᚆፊഴଘݣ • 2015ଙڡਠ౮C᫪ᣟᩒ • 350Ո •

    ᬪ200ՈฎᎸݎ • قࢵԆᥝITउ૱᮷ํړلݪ౲ېԪ॒
  2. ౯ฎ᧡Ҙ • ๫߽ • Java 2007 ~ 2010 • Ruby

    2011 ~ Now • ፓڹ੪ᘳOneAPM - RubyAgent, Cloud Insight • github.com/markgeek • douban.com/people/markgeek/
  3. RubyVMጱݎ઀ܲݥ • 1.9 Koichi Sasada : YARV • 1.9 Narihiro

    Nakamura ғLazySweep • 2.0 Narihiro Nakamura ғBitmap Marking GC • 2.1 Koichi Sasada ғGenerational Collector • 2.2 Koichi Sasada ғIncremental Generational Collector
  4. RubyProf • flat - Prints a flat profile as text

    (default). • dot - Prints a graph profile as a dot file • call_stack - prints a HTML visualization of the call tree • call_tree - format for KCacheGrind
  5. rbtrace • rbtrace -p <PID> —firehose • rbtrace -p <PID>

    —slow=<N> • rbtrace -p <PID> --methods "Kernel#sleep" “Proc#call" • rbtrace -p <PID> --gc
  6. ݇ᘍᩒා1 • https://engineering.heroku.com/blogs/2015-02-04-incremental-gc/ • http://tmm1.net/ruby21-rgengc/ • https://www.youtube.com/watch?v=nRehkd22j78&spfreload=10 • https://avsej.net/2012/systemtap-and-ruby-20/ •

    https://www.shopify.com/technology/16777156-tuning-rubys-global-method-cache • https://www.youtube.com/watch?v=pZ_BcEcFGj0 • http://www.atdot.net/~ko1/activities/2015_railsconf.pdf • http://samsaffron.com/archive/2013/11/22/demystifying-the-ruby-gc