jpcm
DESCRIPTION
testTRANSCRIPT
1
Java Performance
Counter Monitor
JPCM - JDC12
Amr ElAdawy
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
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
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.
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
CPU
RAM
Core1 Core2 Core3 Core4
L1 L1 L1 L1
L2 L2
L3
CPU Cache
JPCM - JDC12 7
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
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
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?
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)
DEMO
Native C++
JAVAJMX
JNI
PCM
Under the Hood!
JPCM - JDC12 13
JPCM - JDC12 14
Future Roadmap
Moving into a pure Java code
Integration into
Exposing TLAB hits/misses
Supporting more CPUs and platforms
JPCM - JDC12 15
Get Involved!Please visit our project on java.net
http://java.net/projects/jpcm
http://www.jpcm.net
JPCM - JDC12 16
Thank You