SlideShare a Scribd company logo
1 of 11
The Right Pill for JRuby
Memory and Thread Issues:
Eclipse Memory Analyzer




Vladimir Pavlov
Dimitar Giormov             Memory Analyzer
SAP Labs Bulgaria
AGENDA



         Ruby and JRuby
         The Headaches
         Eclipse Memory Analyzer
         The Pill
         Further Enhancements
         Q&A




© SAP 2010 / Page 2
DISCLAIMER
         We are not experts in Ruby/JRuby
              Although we have (some) experience with those
         However, we have quite a lot of experience and track in Java and Eclipse
              Or at least we think so ;-)




© SAP 2010 / Page 3
RUBY AND JRUBY
         Ruby is…
              Dynamic scripting language
              Object-oriented
              Focus on simplicity and productivity
              Elegant syntax, natural to read and easy to write


         JRuby is…
              100% Java implementation of the Ruby programming language
              Interpreter running atop the JVM
              Generating Java bytecode (JIT compilation mode)
              Tight integration with Java




© SAP 2010 / Page 4
THE HEADACHES
         Memory leaks
              Hard to debug and find the root cause
              Eventually lead to OOM errors


           Brings your system down
           Often not reproducible


         Thread issues
              Deadlocks
              Exhausted threads
              Waiting for an external resource – e.g. DB connection


           Application does not respond
           Whole system hangs



© SAP 2010 / Page 5
THE HEADACHES – AGGRAVATED
    Adding JRuby into the picture…




© SAP 2010 / Page 6
ECLIPSE MEMORY ANALYZER
         Eclipse Memory Analyzer (MAT) is…
              Java heap analyzer                                             Memory Analyzer
              Helps find memory leaks and reduce memory consumption
              Query heap dumps via OQL
              Multi-Gigabyte Java Heap Dumps Are Nothing to Fear Now
              Soooo much faster than other tools, e.g. jhat
              Very little memory “overhead” for processing heap dumps (again – cf. jhat)
              Provides a report with automatically extracted leak suspects
              Supports Sun, SAP, HP, IBM JDKs 1.4.2 and above
              Could also process thread dumps and correlate data to provide additional details
              Highly extensible
              Open source




© SAP 2010 / Page 7
THE PILL
     JRuby extension plugin for Eclipse Memory Analyzer
     Plugs into the heap dump processing by means of extension points
          <extension point="org.eclipse.mat.api.requestResolver">
                  <resolver
                      impl="org.eclipse.mat.extension.jruby.RubyStacktraceDumper">
                  </resolver>
                  <resolver
                      impl="org.eclipse.mat.extension.jruby.JRubyScriptResolver">
                  </resolver>
          </extension>
         Looks for specific JRuby implementation objects in the heap
          @Subject("org.jruby.internal.runtime.RubyRunnable")
          @Subject("org.jruby.runtime.ThreadContext")
     Produces readable Ruby stack traces
     Memory Analyzer 1.1 snapshot/preview download




© SAP 2010 / Page 8
FURTHER ENHANCEMENTS
         Producing hybrid Ruby/Java stack traces
         Thread dumps analysis
         Specific use case information, e.g. session data
         Automation
         …

         Feedback…
              Ideas…
                Contributions…

                                           … always welcome! 
                         https://dev.eclipse.org/mailman/listinfo/mat-dev
          http://www.eclipse.org/projects/project_summary.php?projectid=tools.mat




© SAP 2010 / Page 9
© SAP 2010 / Page 10
THANK YOU!




Memory Analyzer




                           in: vpavlov
                         t: @giormov

More Related Content

Similar to The Right Pill for JRuby Memory and Thread Issues

3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developersnick_garrod
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importancenishajj
 
Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?Orest Ivasiv
 
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?Arun Gupta
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta ThoughtWorks
 
JRuby and Google App Engine
JRuby and Google App EngineJRuby and Google App Engine
JRuby and Google App Enginejoshsmoore
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringNayden Gochev
 
Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11Arto Santala
 
Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseGet ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseJeanne Boyarsky
 
1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptxKabiles07
 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10Arto Santala
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails FinalRobert Postill
 
Java notes | All Basics |
Java notes | All Basics |Java notes | All Basics |
Java notes | All Basics |ShubhamAthawane
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about javakanchanmahajan23
 
Easy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEEasy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEJBUG London
 

Similar to The Right Pill for JRuby Memory and Thread Issues (20)

3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers3978   Why is Java so different... A Session for Cobol/PLI/Assembler Developers
3978 Why is Java so different... A Session for Cobol/PLI/Assembler Developers
 
DavidWible_res
DavidWible_resDavidWible_res
DavidWible_res
 
Ruby
RubyRuby
Ruby
 
Java
JavaJava
Java
 
Node.js an Exectutive View
Node.js an Exectutive ViewNode.js an Exectutive View
Node.js an Exectutive View
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importance
 
Why don't you Groovy?
Why don't you Groovy?Why don't you Groovy?
Why don't you Groovy?
 
GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?GlassFish can support multiple Ruby frameworks ... really ?
GlassFish can support multiple Ruby frameworks ... really ?
 
Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta Glass fish rubyconf-india-2010-Arun gupta
Glass fish rubyconf-india-2010-Arun gupta
 
JRuby and Google App Engine
JRuby and Google App EngineJRuby and Google App Engine
JRuby and Google App Engine
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with Spring
 
Migrating to Java 11
Migrating to Java 11Migrating to Java 11
Migrating to Java 11
 
Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and EclipseGet ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
Get ready for FRC 2015: Intro to Java 5 through 8 updates and Eclipse
 
1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx1 Introduction to JAVA.pptx
1 Introduction to JAVA.pptx
 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10
 
DiUS Computing Lca Rails Final
DiUS  Computing Lca Rails FinalDiUS  Computing Lca Rails Final
DiUS Computing Lca Rails Final
 
Java notes | All Basics |
Java notes | All Basics |Java notes | All Basics |
Java notes | All Basics |
 
10 interesting things about java
10 interesting things about java10 interesting things about java
10 interesting things about java
 
Easy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDEEasy Integration with Apache Camel and Fuse IDE
Easy Integration with Apache Camel and Fuse IDE
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

The Right Pill for JRuby Memory and Thread Issues

  • 1. The Right Pill for JRuby Memory and Thread Issues: Eclipse Memory Analyzer Vladimir Pavlov Dimitar Giormov Memory Analyzer SAP Labs Bulgaria
  • 2. AGENDA  Ruby and JRuby  The Headaches  Eclipse Memory Analyzer  The Pill  Further Enhancements  Q&A © SAP 2010 / Page 2
  • 3. DISCLAIMER  We are not experts in Ruby/JRuby  Although we have (some) experience with those  However, we have quite a lot of experience and track in Java and Eclipse  Or at least we think so ;-) © SAP 2010 / Page 3
  • 4. RUBY AND JRUBY  Ruby is…  Dynamic scripting language  Object-oriented  Focus on simplicity and productivity  Elegant syntax, natural to read and easy to write  JRuby is…  100% Java implementation of the Ruby programming language  Interpreter running atop the JVM  Generating Java bytecode (JIT compilation mode)  Tight integration with Java © SAP 2010 / Page 4
  • 5. THE HEADACHES  Memory leaks  Hard to debug and find the root cause  Eventually lead to OOM errors  Brings your system down  Often not reproducible  Thread issues  Deadlocks  Exhausted threads  Waiting for an external resource – e.g. DB connection  Application does not respond  Whole system hangs © SAP 2010 / Page 5
  • 6. THE HEADACHES – AGGRAVATED Adding JRuby into the picture… © SAP 2010 / Page 6
  • 7. ECLIPSE MEMORY ANALYZER  Eclipse Memory Analyzer (MAT) is…  Java heap analyzer Memory Analyzer  Helps find memory leaks and reduce memory consumption  Query heap dumps via OQL  Multi-Gigabyte Java Heap Dumps Are Nothing to Fear Now  Soooo much faster than other tools, e.g. jhat  Very little memory “overhead” for processing heap dumps (again – cf. jhat)  Provides a report with automatically extracted leak suspects  Supports Sun, SAP, HP, IBM JDKs 1.4.2 and above  Could also process thread dumps and correlate data to provide additional details  Highly extensible  Open source © SAP 2010 / Page 7
  • 8. THE PILL  JRuby extension plugin for Eclipse Memory Analyzer  Plugs into the heap dump processing by means of extension points <extension point="org.eclipse.mat.api.requestResolver"> <resolver impl="org.eclipse.mat.extension.jruby.RubyStacktraceDumper"> </resolver> <resolver impl="org.eclipse.mat.extension.jruby.JRubyScriptResolver"> </resolver> </extension>  Looks for specific JRuby implementation objects in the heap @Subject("org.jruby.internal.runtime.RubyRunnable") @Subject("org.jruby.runtime.ThreadContext")  Produces readable Ruby stack traces  Memory Analyzer 1.1 snapshot/preview download © SAP 2010 / Page 8
  • 9. FURTHER ENHANCEMENTS  Producing hybrid Ruby/Java stack traces  Thread dumps analysis  Specific use case information, e.g. session data  Automation  …  Feedback…  Ideas…  Contributions… … always welcome!  https://dev.eclipse.org/mailman/listinfo/mat-dev http://www.eclipse.org/projects/project_summary.php?projectid=tools.mat © SAP 2010 / Page 9
  • 10. © SAP 2010 / Page 10
  • 11. THANK YOU! Memory Analyzer in: vpavlov t: @giormov