Upload
linganesan-mani
View
119
Download
1
Embed Size (px)
Citation preview
The AnomalieZ
The Crew
SupervisorsExternal - Dr. Srinath [email protected] - Dr. Amal Shehan [email protected]
Evaluation PanelDr. Indika Perera Mrs. Sandareka Wickramanayake
Team membersMr. K.Kokulan Mr. K.LinganesanMr. I.Suventhan Mr. M.V.Vithulan
What is profiling?
A development tool
Dynamic performance analysis at runtime
Implicit: Performance optimization based on analysis results
What do we get from profiling?
Measuring and locating performance bottlenecksTime-expensive functions or code parts
Memory leaks and unnecessary memory allocation
Dead locks
Useful interpretation of analysis resultsUsually, the data gathered with a profiler can be represented in stacks or graphs
Software performance improvements
Provide a detailed view on runtime behaviour
Goals
Current Biggies
Top Profiling Tools
JProfiler
● JProfiler is a commercially licensed Java profiling tool developed by ej-technologies GmbH
● It is mainly designed for use with Java EE and Java SE applications
● Combining CPU, Memory and Thread profiling into one application
● It can be used to manually analyze
○ Performance bottlenecks
○ Memory leaks
○ CPU loads
○ Resolve threading issues
VisualVM
● VisualVM is a profiling tool that provides GUI Interface for getting the information about the applications (Java apps) running on Virtual Machine (JVM)
● VisualVM can do
○ CPU Profiling
○ Memory Profiling
○ Run garbage collections
○ Take snapshots
Java Mission Control
● A set of powerful tools running on the Oracle JDK to monitor and manage Java applications
● Free for development use (Oracle Binary Code License)
● Available in JDK since Java 7 update 40
● Two main tools
○ JMX Console
○ JFR - Java Flight Recorder
Something is missing ..
The Problem
How can we perform the collection, processing and analysing of JFR that allows users to gain the following analysis mechanisms such as, detect anomalies/outliers and automate the performance analysis using machine learning algorithms?
Anomaly detection and performance analysis automation
using data analytics
Java Flight Recorder?
●Black box used in aircraft
●Profiling and event collection framework built into JDK
●Gathers low level information about the JVM with low performance overhead (>2%)
●From Java 7 update 4
JFR data structure
Events●86 events
●Some sample events○ System Process
○ GC Configuration - Configuration of parameters for the garbage collector
○ Java Thread Sleep
●Attributes for Java Thread sleep○ Starttime
○ Endtime
○ Duration
○ eventType
○ Thread
○ stackTrace
JFR Parser
● POC level JFR Parser using JRockit APIs
● It can
○ Sort the hot methods
○ Extract the stack trace
● Github - https://github.com/VIthulan/jfr-client
JFR Parser
Anomaly Detection
Anomalies or outliers is the data points from the data set that does not fit well with the rest of the data.
There is no labeled data so we will use unsupervised learning approach to detect anomalies.
Markov Chain Modelling
Markov chain is discrete time stochastic process that undergoes transitions from one state to another state on a state space.
It must possess a property called Markov property
HH - (High memory, High time between two garbage collections)
Clustering
Detecting Anomalies from clustering
●Normal data instances belong to a cluster in the data, while anomalies either do not belong to any cluster
Detecting Anomalies from clustering
●Normal data instances lie close to their closest cluster centroid, while anomalies are far away from their closest cluster centroid.
Detecting Anomalies from clustering
●Normal data instances belong to large and dense clusters, while anomalies either belong to small or sparse clusters.
Performance Analysis Automation
Algorithm to Automating Performance
Java Flight Recorder can be used to record selected events during an execution of a java
program
Those trace events can be represented in one or more nodes in a tree data structure
Find out performance statistics for each events
Processing the performance statistics at each node to determine an overhead
compensation value
Applying the overhead compensation value to the performance statistics at each node
Objectives
A tool which can,1. Parse JFR binary2. Analyze the data using
machine learning algorithms.
a. Detecting anomaliesb. Automating performance
analysis
3. Produce a dashboard/report
Deliverables
●A tool where we can upload and analyze JFR files which will extract and present insights of Java application performance.
●Blog - http://theanomaliez.blogspot.com/
●Publish research papers to related conferences.
The Future?
Thankyou!
References[1] V.Cortellessa, A.Martens, R.Reussner, and C.Trubiani, “A Process to Effectively Identify guilty Performance Antipatterns,” in Fundamental Approaches to Software Engineering. Springer, 2010, pp. 368–382.
[2] W.Dickinson, D.Leon, and A.Podgurski,“Finding Failures by Cluster Analysis of Execution Profiles. In the proceeding of the 23rd International Conference on Software Engineering, May, 2001.
[3] J.-G.Lou, Q.Fu, S.Yang, Y.Xu, and J.Li, “Mining Invariants from Console Logs for System Problem Detection”, In proc. Of USENIX Annual Technical Conference, Boston, June. 2010.
[4] Izakian, H.; Pedrycz, W. "Anomaly Detection and Characterization in Spatial Time Series Data: A Cluster-Centric Approach", Fuzzy Systems, IEEE Transactions, On page(s): 1612- 1624 Volume:22, Issue: 6, Dec. 2014
[5] Nong Ye. “A Markov Chain Model of Temporal Behavior for Anomaly Detection”, In Proceedings of the 5th Annual IEEE Information Assurance and Security Workshop, US Military Academy, West Point, NY, 6-7 June, 2000.
[6] VARUN CHANDOLA, ARINDAM BANERJEE and VIPIN KUMAR, “Anomaly Detection : A Survey”, in ACM Computing Surveys, September 2009.
[7] Kingsly Leung, Christopher Leckie, “Unsupervised Anomaly Detection in Network Intrusion DetectionUsing Clusters” , ACSC '05 Proceedings of the Twenty-eighth Australasian conference on Computer Science - Volume 38 ,Pages 333-342.
[8] Pankaj Malhotra, Lovekesh Vig, Gautam Shroff, Puneet Agarwa, “Long Short Term Memory Networks for Anomaly Detection in Time Series”, European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning. Bruges (Belgium), 22-24 April 2015,6doc.com publ.,ISBN 978-287587014-8.