Selecting points of interest in traces using patterns of events - - PowerPoint PPT Presentation

selecting points of interest in traces using patterns of
SMART_READER_LITE
LIVE PREVIEW

Selecting points of interest in traces using patterns of events - - PowerPoint PPT Presentation

Selecting points of interest in traces using patterns of events Franois Trahay , Elisabeth Brunet, Mohamed Mosli Bouksiaa, Jianwei Liao Context Hardware is more and more complex NUMA, hierarchical caches, GPU, ... Software is more


slide-1
SLIDE 1

Selecting points of interest in traces using patterns of events

François Trahay, Elisabeth Brunet, Mohamed Mosli Bouksiaa, Jianwei Liao

slide-2
SLIDE 2

2

Context

Hardware is more and more complex

  • NUMA, hierarchical caches, GPU, ...

Software is more and more complex

  • Hybrid MPI+OpenMP, MPI+CUDA, …

Achieving good performance is hard Understanding the performance of an application

is difficult → Need for performance analysis tools

slide-3
SLIDE 3

3

Performance analysis

Tracing tools

 Tracing applications

  • Run the application once
  • Capture interesting events (eg. MPI functions)
  • Generate an execution trace
  • Visualize & understand the behavior of the

application

  • Find problematic parts of the execution

 Examples

  • VampirTrace
  • ScalaTrace
  • Intel Trace Analyzer and Collector
  • EZTrace

(#82) 5292 Enter: function 14, process 7, source 0 (#83) 5387 Leave: function 1, process 7, source 0 (#84) 5540 Enter: function 14, process 3, source 0 (#85) 5631 Leave: function 1, process 3, source 0 (#86) 5767 Enter: function 14, process 5, source 0 (#87) 5801 Leave: function 1, process 5, source 0 (#88) 5995 Counter: process 8, counter 1, value 14829 (#89) 6062 Counter: process 8, counter 1, value 14573 (#90) 6747 Enter: function 14, process 9, source 0 (#91) 6764 Counter: process 6, counter 1, value 14829 (#92) 6796 Leave: function 1, process 9, source 0 (#93) 6806 Counter: process 6, counter 1, value 14573

slide-4
SLIDE 4

4

Visualizing large trace files

Visualizing a large trace

is difficult

  • Millions of events

How to detect the

interesting part of the trace ?

NPB CG class A 16 MPI Processes – 426 000 events

slide-5
SLIDE 5

5

Visualizing large trace files

Visualizing a large trace

is difficult

  • Millions of events

How to detect the

interesting part of the trace ?

NPB CG class A 16 MPI Processes – 426 000 events

slide-6
SLIDE 6

6

Visualizing large trace files

repeating patterns

A trace is usually

structured

  • Loops
  • Functions

Lots of similar

information

NPB CG class A 16 MPI Processes – 426 000 events

slide-7
SLIDE 7

7

Proposal:

pointing what users should examinate

Detect similarities in a trace

  • Application phases that repeat

Select « points of interests » of the trace

  • Parts that users should examine first
  • Where useful information is

100 x { MPI_SEND (src=0 dest=1 len=16 tag=0) MPI_RECV (src=1 dest=0 len=16 tag=0) } MPI_Barrier 10000 x { MPI_SEND (src=0 dest=1 len=16 tag=0) MPI_RECV (src=1 dest=0 len=16 tag=0) } MPI_Barrier

slide-8
SLIDE 8

8

Detecting similarities

slide-9
SLIDE 9

9

Representation of a trace

 A trace can be represented as an event list  Goal: detect patterns in this list

  • Can be viewed as a factorization
slide-10
SLIDE 10

10

Factorization algorithm

First step: find small patterns

 Find a couple of events (e1, e2) that appears several times

→ 2-event patterns

 Browse the event list and search for duplicated sequences

slide-11
SLIDE 11

11

Factorization algorithm

First step: find small patterns

 Find a couple of events (e1, e2) that appears several times

→ 2-event patterns

 Browse the event list and search for duplicated sequences

slide-12
SLIDE 12

12

Factorization algorithm

Second step: find loops in patterns

 A loop is a sequence of events that repeats

  • Each iteration has been detected as a pattern

 Browse the patterns lists and search for consecutive sequences

slide-13
SLIDE 13

13

Factorization algorithm

Second step: find loops in patterns

 A loop is a sequence of events that repeats

  • Each iteration has been detected as a pattern

 Browse the patterns lists and search for consecutive sequences

slide-14
SLIDE 14

14

Factorization algorithm

Second step: find loops in patterns

 A loop is a sequence of events that repeats

  • Each iteration has been detected as a pattern

 Browse the patterns lists and search for consecutive sequences

slide-15
SLIDE 15

15

Factorization algorithm

Second step: find loops in patterns

 A loop is a sequence of events that repeats

  • Each iteration has been detected as a pattern

 Browse the patterns lists and search for consecutive sequences

slide-16
SLIDE 16

16

Factorization algorithm

Third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?

slide-17
SLIDE 17

17

Factorization algorithm

Third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?  Case 1 : pattern #1 is always followed by event C

slide-18
SLIDE 18

18

Factorization algorithm

Third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?  Case 1 : pattern #1 is always followed by event C

→ pattern #1 is a 3-event pattern

slide-19
SLIDE 19

19

Factorization algorithm

third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?  Case 2: pattern #1 is not always followed by event C, but it sometimes is

→ create pattern #2 that integrates Pattern #1

slide-20
SLIDE 20

20

Factorization algorithm

third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?  Case 2: pattern #1 is not always followed by event C, but it sometimes is

→ create pattern #2 that integrates Pattern #1

slide-21
SLIDE 21

21

Factorization algorithm

third step: try to expand patterns

 Is this 2-event pattern a 3-event pattern ?  Case 3: pattern #1 is followed by event C only once

→ do nothing

slide-22
SLIDE 22

22

Factorization algorithm

Limitations

 Only valid for 1 thread/process

  • Based on temporal order

→ the algorithm needs to run for each thread → can be done in parallel

 Complexity : O(n2)

  • Worst case complexity (when there is no pattern)
  • In real life : it depends on the size of patterns
slide-23
SLIDE 23

23

Evaluation

 Implemented in EZTrace

  • Post mortem analysis
  • Parallelized with OpenMP

 Stark cluster

  • 4 nodes
  • Quad-core Xeon

 Results

  • Detects patterns
  • Detects the applications iterations
  • Cheap compared to data mining techniques

Kernel Pattern detection (ms) # of events # of patterns CG 178 284 000 160 MG 186 118 000 2 728 SP 596 557 000 174 BT 951 400 000 112 LU 4 564 4 568 000 210

NPB Class A, Procs=16

slide-24
SLIDE 24

24

Selecting points of interest

slide-25
SLIDE 25

25

Searching for duplicated information

Select representative occurrences

  • Instead of examining 1000 occurrences
  • Select 1 occurrence per class

#327 #549 #871

slide-26
SLIDE 26

26

Selecting representative occurrences

Classify occurrences

according to their duration

Search for 'peaks' in

the distribution

slide-27
SLIDE 27

27

Filtering traces

Select one occurrence

per peak

  • Filter out 'similar'
  • ccurrences
slide-28
SLIDE 28

28

Experimental results

NPB class A, 16 procs

Kernel # events #events after filtering EP 3 090 2 873 FT 10 256 6 704 IS 18 552 15 948 MG 118 688 41 031 CG 284 754 11 724 BT 399 944 24 338 SP 557 318 68 287 LU 4 568 002 42 881

slide-29
SLIDE 29

29

Experimental results

NPB class A, 16 procs

Kernel # events #events after filtering EP 3 090 2 873 FT 10 256 6 704 IS 18 552 15 948 MG 118 688 41 031 CG 284 754 11 724 BT 399 944 24 338 SP 557 318 68 287 LU 4 568 002 42 881

slide-30
SLIDE 30

30

Conclusion

slide-31
SLIDE 31

31

Conclusion

 Manually detecting the interesting parts of a trace is

difficult

 Proposal: automate the detection of problems

  • Detect repeating patterns of events
  • Compare similar patterns whose duration differ significantly
  • Filter out redundant information

 Future work

  • Analyze patterns
  • Integrate to the stable version of EZTrace
slide-32
SLIDE 32

32

Question ?

François Trahay http://eztrace.gforge.inria.fr/

slide-33
SLIDE 33

33

Backtracking irregularities

slide-34
SLIDE 34

34

Backtracking irregularities

slide-35
SLIDE 35

35

Backtracking irregularities