Top Banner
The AnomalieZ
36

TAZ-Project introduction

Feb 17, 2017

Download

Education

Linganesan Mani
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: TAZ-Project introduction

The AnomalieZ

Page 2: TAZ-Project introduction

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

Page 3: TAZ-Project introduction

What is profiling?

Page 4: TAZ-Project introduction

A development tool

Dynamic performance analysis at runtime

Implicit: Performance optimization based on analysis results

Page 5: TAZ-Project introduction

What do we get from profiling?

Page 6: TAZ-Project introduction

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

Page 7: TAZ-Project introduction

Current Biggies

Page 8: TAZ-Project introduction

Top Profiling Tools

Page 9: TAZ-Project introduction

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

Page 10: TAZ-Project introduction

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

Page 11: TAZ-Project introduction

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

Page 12: TAZ-Project introduction

Something is missing ..

Page 13: TAZ-Project introduction

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?

Page 14: TAZ-Project introduction

Anomaly detection and performance analysis automation

using data analytics

Page 15: TAZ-Project introduction

Java Flight Recorder?

Page 16: TAZ-Project introduction

●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

Page 17: TAZ-Project introduction

JFR data structure

Page 18: TAZ-Project introduction

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

Page 19: TAZ-Project introduction

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

Page 20: TAZ-Project introduction

Anomaly Detection

Page 21: TAZ-Project introduction

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.

Page 22: TAZ-Project introduction

Markov Chain Modelling

Page 23: TAZ-Project introduction

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

Page 24: TAZ-Project introduction

HH - (High memory, High time between two garbage collections)

Page 25: TAZ-Project introduction

Clustering

Page 26: TAZ-Project introduction

Detecting Anomalies from clustering

●Normal data instances belong to a cluster in the data, while anomalies either do not belong to any cluster

Page 27: TAZ-Project introduction

Detecting Anomalies from clustering

●Normal data instances lie close to their closest cluster centroid, while anomalies are far away from their closest cluster centroid.

Page 28: TAZ-Project introduction

Detecting Anomalies from clustering

●Normal data instances belong to large and dense clusters, while anomalies either belong to small or sparse clusters.

Page 29: TAZ-Project introduction

Performance Analysis Automation

Page 30: TAZ-Project introduction

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

Page 31: TAZ-Project introduction

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

Page 32: TAZ-Project introduction

Deliverables

Page 33: TAZ-Project introduction

●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.

Page 34: TAZ-Project introduction

The Future?

Page 35: TAZ-Project introduction

Thankyou!

Page 36: TAZ-Project introduction

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.