jpmanager: a j2ee performance management system jiang guo department of computer science california...
TRANSCRIPT
JPManager: A J2EE PERFORMANCE
MANAGEMENT SYSTEM
Jiang GuoDepartment of Computer ScienceCalifornia State University Los Angeles
March 24, 2010
Background
J2EE is widely used in enterprise scale application
Performance management of J2EE application is a challenge issue
A tool is developed to solve the problem based on Java instrumentation
Two End-to-end Monitoring Tools
Non-intrusive Ghost Transaction
Simulates the scenarios of user interactions
intrusive Java Instrumentation
Insert extra Java codes into the applications
Benefit of Java Instrumentation
Collecting executing information at low level
Make fine-grained measurements into the application structure
Dynamic or Static
Dynamic – Java Instrumentation Can deal with third party classes from
remote side Static – Aspect Programming
Only deal with classes with source code
J2EE-based Enterprise Applications
BrowsersIE, Firefox
AppletsJavaScripts
HTML
Clients
Filters
Web ServersApache, Tomcat
Web Servers
Servlets
JSPs
EJB Containers
JBoss, WebLogic
Application Servers
EJBs
JDBCs
DB Servers
MySQL …
Legacy Systems
Remote Classes
The Architecture of JPManager
Data CollectionAgent
Data CollectionAgent
Server
JPManagerServer
Client Browser Tier
Web Server TierApplication Server Tier
DataBase
Browser
AnalysisAgent
Data Collection Agent of JPManager
Java Virtual Machine
Java Application Environment(Tomcat, JBoss, WebLogic)
Target ApplicationServlets, JSP, EJBs, Threads
Data Collection Agents
Instrumenter
Instrumenter
InstrumenterApplicatoin Class
Instrumentation Profile
Metrics Information: Class MetricsThread Metrics
DCAMetric Provider
Two instrumentation methods
Class Intercepting Instrument the byte code by changing the
hierarchy of class inheritance. Method Hijacking
Instrument the byte code by adding new methods to classes or new probe codes to the methods.
Java Virtual Machine Components
Class loaders Class file verifier Execution engine
The Delegation of Class Loaders
Primary Class Loader
Extension Class Loader
Application Class Loader
User Defined Class Loader
Data Flow of the Instrumentation
Modified ClassLoader
Instrumentation Profile
DCA Instrumenter
InstrumentedClasses
Metrics Information
DCAMetric Provider
ApplicationClasses
JVM Execution Engine
Dynamic Information
JPManagerServer
JVM
Steps of the Java Instrumentation
Run Data CollectionAgents in a Standard
JVM
Modify theClassLoaderBased on the
Instrumentation Profile
Create a New JVMwith Modified
ClassLoader and RunJ2EE Application in the
Modified JVM
Extract Data and Sendthem to JPManger
Server
Analysis of Java Instrumentation (1)
Static Structure Consistency instrumentation : R = <L, P >x, v [P.start(x) = R.start(x) v before L
P.ValueOf(v) = R.ValueOf(v)]x, v [P.start(x) = R.start(x) w after L
P.ValueOf(w) = R.ValueOf(w)] Dynamic Execution Consistency
Object o can be described by a six-tuple = (S, s0, Mcall, T, )
Analysis of Java Instrumentation (2)
is o life spaceS is a finite set of states of objects0 is a single start state of the object s0 ,
this state is usually created by new.Mcall is a set of method callsT is a set of valid timestamps is a mapping
Execution of the WEB Store Application
Conclusions (1)
Most commercial J2EE tools focus on service transactions database serversdirectory servicesapplication servers themselves
Conclusions (2)
Our tool support monitoring and analyzing the J2EE components and APIs
Can monitor all Java based systems
Thank you!
Thank you!