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

Introducing fasthat

Introducing fasthat

A lightning talk I gave at JRubyConf 2012. See https://github.com/on-site/fasthat for the actual project.

B653b7151d55cded30759a5c35f95390?s=128

Chris Jester-Young

May 22, 2012
Tweet

Transcript

  1. Introducing fasthat: A faster Java heap analyser Chris K. Jester-Young

    cky@on-site.com @cky944 May 2012
  2. What I do at On-Site • Part of Performance Engineering

    team ◦ One of the many hats I wear • Keep the site fast and stable • Major sources of performance issues: ◦ Database queries ◦ Concurrency bugs ◦ Using the wrong algorithms ◦ GC thrashing due to memory leaks • The last one plagued us for a long time
  3. Why I love JRuby • All the power of Ruby

    • All the platform support of JVM ◦ Reuse many useful Java class libraries ◦ Debugging and profiling APIs ◦ hprof, jhat, etc. • ...but many of these don't support JRuby well • Luckily, OpenJDK is, well, open-source ◦ Tweak it till it works
  4. So I did my own thing • Faster ◦ Uses

    non-JDK Rhino for OQL queries ◦ Uses more optimal data structures from Guava and newer JDK • Enable histogram referrer tracing • Peek into data structures like arrays and hashes---even Ruby ones! ◦ Currently shallow only
  5. Areas for improvement • Support deep data structure peeking •

    Find version-independent ways to peek • Support Ruby class hierarchies • Support Ruby stack traces ◦ ...intermingled with Java stack frames • Support other languages
  6. Love low-level hacking? • https://github.com/on-site/fasthat • Or, come work with

    us! class << please = Object.new def us puts "Send your resume to: jruby-#{yield}@on-site.com" end end if your_resume = "rocks" please.send(:us) { your_resume } end