jpcm

15
Java Performance Counter Monitor JPCM - JDC12 1 Amr ElAdawy JPCM

Upload: suppport-jspx

Post on 26-Jun-2015

336 views

Category:

Technology


0 download

DESCRIPTION

test

TRANSCRIPT

Page 1: Jpcm

1

Java Performance

Counter Monitor

JPCM - JDC12

Amr ElAdawy

JPCM

Page 2: Jpcm

Agenda

JPCM - JDC12 2

Software Performance. CPU Utilization CPU Cache JPCM What you can Do with JPCM and How? DEMO Under the Hood! Future Roadmap

Page 3: Jpcm

Software performance is:

Effective performance requires right measurements.

JPCM - JDC12 4

Software Performance

Software profiling tools tell you a lot bout what your application is doing,

But what about CPU?

Minimize the amount of time and resources needed to complete a unit of work

Page 4: Jpcm

JPCM - JDC12 5

CPU Utilization(OS tools)

Shows the portion of time slots to which a hardware thread is executing a user or OS task…

CPU does not spend all the time running your code…Some good time is spent also in communicating with RAM.

Page 5: Jpcm

CPU has three types of Cache:1. Data Cache2. Instructions Cache3. (TLB) Translation Lookaside Buffer

Smaller and faster memory that has a copy of data that is most frequently used.

Reduces latency by avoiding trips to RAM.

Data Cache is leveled up to three layer (L1,L2,L3)....

CPU Cache

JPCM - JDC12 6

Page 6: Jpcm

CPU

RAM

Core1 Core2 Core3 Core4

L1 L1 L1 L1

L2 L2

L3

CPU Cache

JPCM - JDC12 7

Page 7: Jpcm

JPCM - JDC12 8

JPCMJPCM is a Java wrapper over PCM, C++ code from Intel that reads performance counters built into the hardware.

Supports Intel Xeon 5500, 5600, 7500, E7 and Core i7 processor

The following metrics are supported: Core:

1. Instructions retired2. Elapsed core clock ticks3. Core frequency.4. L2 cache hits and misses, L3 cache misses and hits.

Uncore:1. Read bytes from memory controller(s).2. Bytes written to memory controller(s).3. Data traffic transferred by the Intel® QuickPath Interconnect links

Page 8: Jpcm

Get The CPU info CPU Family CPU Model Threads Per Core Number of Cores Number of Sockets

Get counter State Core Counter State Socket Counter State System Counter State

What can you do with JPCM?

JPCM - JDC12 9

Page 9: Jpcm

JPCM - JDC12 10

L2/L3 Metrics Cycles lost due to cache missesCache hitsCaches missesCache hit ratio

Other MetricsExecution usageTotal Execution usage CyclesInstructions retried

Around 24 metrics are exposed

What can you do with JPCM?

Page 10: Jpcm

Come out with the CPU counters

JPCM - JDC12 11

How it can be used?

Take a snapshot (Before)

Run your code

Take another snapshot

(After)

Page 11: Jpcm

DEMO

Page 12: Jpcm

Native C++

JAVAJMX

JNI

PCM

Under the Hood!

JPCM - JDC12 13

Page 13: Jpcm

JPCM - JDC12 14

Future Roadmap

Moving into a pure Java code

Integration into

Exposing TLAB hits/misses

Supporting more CPUs and platforms

Page 14: Jpcm

JPCM - JDC12 15

Get Involved!Please visit our project on java.net

http://java.net/projects/jpcm

http://www.jpcm.net

Page 15: Jpcm

JPCM - JDC12 16

Thank You