2. Agenda
Software Performance.
CPU Utilization
CPU Cache
JPCM
What you can Do with JPCM and How?
DEMO
Under the Hood!
Future Roadmap
JPCM - JDC12 2
3. Software Performance
Software performance is:
Minimize the amount of time and resources needed to
complete a unit of work
Effective performance requires right measurements.
Software profiling tools tell you a lot bout what your application is doing,
But what about CPU?
JPCM - JDC12 4
4. 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.
JPCM - JDC12 5
5. CPU Cache
Smaller and faster memory that has a copy of data that is most
frequently used.
Reduces latency by avoiding trips to RAM.
CPU has three types of Cache:
1. Data Cache
2. Instructions Cache
3. (TLB) Translation Lookaside Buffer
Data Cache is leveled up to three layer (L1,L2,L3)....
JPCM - JDC12 6
6. CPU Cache
RAM
L3
L2 L2
CPU
L1 L1 L1 L1
Core1 Core2 Core3 Core4
JPCM - JDC12 7
7. JPCM
JPCM is a Java wrapper over PCM, C++ code from Intel that reads performance
counters built into the hardware.
The following metrics are supported:
Core:
1. Instructions retired
2. Elapsed core clock ticks
3. 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
Supports Intel Xeon 5500, 5600, 7500, E7 and Core i7 processor
JPCM - JDC12 8
8. What can you do with JPCM?
Get The CPU info Get counter State
CPU Family Core Counter State
CPU Model Socket Counter State
Threads Per Core System Counter State
Number of Cores
Number of Sockets
JPCM - JDC12 9
9. What can you do with JPCM?
Around 24 metrics are exposed
L2/L3 Metrics Other Metrics
Cycles lost due to cache misses Execution usage
Cache hits Total Execution usage
Caches misses Cycles
Cache hit ratio Instructions retried
JPCM - JDC12 10
10. How it can be used?
Take a Take another
snapshot Run your snapshot
(Before) code (After)
Come out with the
CPU counters
JPCM - JDC12 11