SlideShare a Scribd company logo
1 of 37
Advanced Java Data Locality and
Data IPC Transport Solutions:
An Introduction to OpenHFT
ben.cotton@jpmorgan.com
ben.cotton@alumni.rutgers.edu
Jan 27, 2015
For real-time Java deployments
(with the strictest SLAs) the
problem of JVM “Stop the World”
GC activity (on medium-lived on-
Heap objects) is a MONSTROUS
problem.
2
Simple Remedy?
Design Java developments and deployments so that medium-lived
Collections (e.g. that “old dog” HashMap) object instance(s) are taught a
“new trick” …. That “new trick” is simple: take HashMap completely Off-Heap.
The Heap
Good Boy!
Off-Heap
you go …
3
But What kind of HashMap are we putting Off-Heap?
• java.util.HashMap ?
• Collections.synchronizedMap( java.util.HashMap ); ?
• java.util.concurrent.ConcurrentHashMap ?
• something entirely different ?
ANSWER: something very different (indeed)!
• OpenHFT’s Chronicle Map SOLUTION
• net.openhft.chronicle.map.ChronicleMap
4
What exactly is OpenHFT?
• 100% Open Source
• Designed to empower Higher Frequency Trading (HFT)
• https://github.com/OpenHFT (developer source repo)
• http://www.openhft.net (Products. Services. Training)
• Provides modules that empower ultra low latency Java deployments to achieve
REAL-TIME compliance (with even their strictest of SLAs)
• Java-Lang (Marshalling / GC Free De-Marshalling / Thread-SAFE / IPC-SAFE /
Off-Heap/ 64-bit ByteBuffers)
• Chronicle-Queue (persisted low-latency Queue messaging and Logging)
• Chroncile-Map (ChronicleMap, Thread-SAFE/IPC-SAFE/Off-Heap)
• Chronicle-Engine Fast Data Framework.
• Java-Runtime-Compiler (builds OpenHFT native impl classes – in process –
of user supplied JBI interfaces)
• Java-Thread-Affinity (allows JVM Threads to be pinned by affinity to specific
OS cpus)
• TransFIX (ultra low latency FIX engine)
5
What really is OpenHFT?
OpenHFT is a 100% OSS solution that empowers Java developers to deliver
the highest performing and most flexible
• Data Locality (Optimised memory layout)
And
• Data IPC Transport (waaay faster than
UDP/TCP)
Capabilities.
6
PART 1
OpenHFT as an Advanced Java Data Locality Provider
(That’s right folks! We’re going Off-Heap)
7
java.util.HashMap
8
Collections.synchronizedMap( java.util.HashMap );
9
10
11
Java Heap Layout: Through the Generations View
12
OpenHFT: Off-Heap ChronicleMap … an Architectural View
13
OpenHFT : Step #1 (PID 1)
14
OpenHFT : Step #2 (PID 1) – thread safe write to off heap
15
OpenHFT : Step #3 (PID 1)
16
OpenHFT : Step #4 (PID 2) – thread safe read (concurrent)
17
OpenHFT : Step #5 (PID 2) update an existing entry (thread safe)
18
OpenHFT : Step #6 (PID 2)
19
OpenHFT : Step #6 (PID 2)
S
OpenHFT code sample demo Summary:
- MT-SAFE operations
- IPC-SAFE operations
- IPC-ATOMIC operations
- ZERO-COPY (*)
- GC-Free Marshalling/De-Marshalling
- Ambition to provide the symmetry of
java.util.concurrent.* API support across native Linux
processes (not just Threads!)
- Nanosecond transport latency (stay tuned for details)
* (note on Map<K,V > type domain support status).
20
Performance Results: CHM vs. SHM
On Linux 14.04, dual E5-2650 v2 @ 2.60GHz, 128 GB memory, each entry updated 32 times.
ConcurrentHashMap -Xmx110g -Xms110g -verbose:gc
21
Performance Results: CHM vs. SHM
On Linux 14.04, dual E5-2650 v2 @ 2.60GHz, 128 GB memory, each entry updated 32 times.
22
OpenHFT as an Off-Heap JCACHE Provider (e.g. RedHat JDG Infinispan)
23
OpenHFT empowers developers to use OpenJDK and Native Linux OS to
100% protect their medium-lived Java Collections (ChronicleMap) from being
impacted by STW GC pauses.
24
PART 2
OpenHFT as an Advanced Java IPC Transport Provider
(That’s right folks! UDP/TCP now joined by
native Linux /dev/shm IPC)
25
OSI Model of Networking Layers:
26
Java 7 Sockets Direct Protocol: Delivering SDP/IB as a Transport
27
Java 7 Sockets Direct Protocol: Delivering to Java its first RDMA capability
28
Intel iWARP: potential to empower Java 9 with SDP/10gE as a Transport
With SDP/10gE Java 9 will be able to deliver RDMA to the Java Ethernet
masses!
29
OpenHFT as a /dev/shm IPC Transport Provider:
peter.lawrey@higherfrequencytrading.com
“I want to be disruptive rather than
rehash or just slightly improve existing
products.”
08/14/2014
Ah, the glory!
30
OpenHFT as a /dev/shm IPC Transport Provider:
ZERO COPY capability
Advanced BytesMarshallable impl of Externalizable – for CBV Copy tolerant
parts of Liquidity Risk AE.
ZERO GC
CAPACITY LIMITED ONLY BY PHYSICAL RAM
CONSISTENTLY 438% Faster than On JVM Heap Cache<K,V> like
operands
JPM Tests show= Mean 350 nano-second /dev/shm latency (ZC
Entry<K,V> transport, RDR_DIM Mock)
DOES NOT SUPPORT FULLY-TRANSITIVE GENERIC V=Object Graph as
Cache<K,V> Operand. Currently {String, primitive} for ZC. NO immediate
Plug-N-Play w/ RDR_DIM Operands used by Liquidity Risk AE
NOT YET ADAPTED w/in RedHat JDG as JSR-107 compliant Cache<K,V>
Operand.
31
PROOF IS IN THE TEST RESULTS: What do we get using OpenHFT vs.
RedHat JDG?
OpenHFT /dev/shm/SharedHashMap<K,V> as operand provider:
To try , run the following command in 2 separated terminals ( (rm /dev/shm/*) Left
player must be started first!):
java 
org.junit.runner.JUnitCore 
net.openhft.collections.fromdocs.com.jpmorgan.pingpong_latency.PingPongPlayerLeft
java 
org.junit.runner.JUnitCore 
net.openhft.collections.fromdocs.com.jpmorgan.pingpong_latency.PingPongPlayerRigh
t
32424: 1 x _bondEntryV.getCoupon() (last _couponL=[5.00 %]) in 37.0 nanos
32425: 1 x _bondEntryV.getCoupon() (last _couponL=[5.00 %]) in 37.5 nanos
32423: 1 x _bondEntryV.getCoupon() (last _couponR=[4.00 %]) in 37.0 nanos
32424: 1 x _bondEntryV.getCoupon() (last _couponR=[4.00 %]) in 31.0 nanos
Full results at https://github.com/Cotton-
Ben/HugeCollections/tree/master/collections/src/test/java/net/openhft/collect
ions/fromdocs/com/jpmorgan/pingpong_latency
32
OpenHFT /dev/shm/SharedHashMap<K,V> as operand provider:
33
PROOF IS IN THE TEST RESULTS: What do we get using OpenHFT vs.
RedHat JDG?
RedHat JDG and JCACHE<K,V> as operand provider:
To try with a distributed cache, run the following command in separated terminals:
java 
-cp "target/classes:target/dependency/*“ 
org.infinispan.quickstart.clusteredcache.Node 
-d LEFT
java 
-cp "target/classes:target/dependency/*“ 
org.infinispan.quickstart.clusteredcache.Node 
-d RIGHT
counter=[217924] cache.put('369604103',3.000%); took 92,599 nanos
counter=[217925] cache.put('369604103',6.000%); took 90,062 nanos
counter=[42529] fl=[5%] = cache.get('369604103'); took 52,624 nanos
counter=[42530] fl=[6%] = cache.get('369604103'); took 47,981 nanos
( full results at https://github.com/Cotton-Ben/infinispan-
quickstart/tree/master/clustered-cache )
34
RedHat JDG and JCACHE<K,V> as operand provider (1,000x slower)
35
Bottom Line = Tests by Real-Time Liquidity Risk Technology AggEng team
imperically demonstrate that OpenHFT off-heap over /dev/shm IPC transport is
1,000x faster than RedHat JDG on-heap over UDP OSI-Loopback IPC transport.
IMMEDIATE NEXT STEPS:
NO DOUBT ABOUT IT = We need the OpenHFT off heap capability made
available to us via the RedHat JDG product and its JCACHE API!
Explicit commits from Mircea re: adapting Peter’s OpenHFT SHM as RedHat JDG
interoperable JSR-107 Cache<K,V>. RedHat customer support case?
Explicit commits from Bela re: “short circuiting” all node  node transport
resolution to use /dev/shm IPC as transport (instead of TCP/UDP) whenever
possible … RedHat customer support case?
Explicit commits from Peter re: supporting above with OpenHFT as the Off-Heap
provider. JPM retain OpenHFT via support subscription?
Continued commits/time planning re: Ben, Dmitry, Xiao efforts to maintained
Fork’d repo and build sound/complete/confirming tests.
36
THE END
Note: For all things re OpenHFT
Please contact:
Peter.Lawrey@higherfrequencytrading.com
www.openhft.net
Peter.Lawrey@higherfrequencytrading.com
www.openhft.net 37

More Related Content

What's hot

"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from IntelEdge AI and Vision Alliance
 
TomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudTomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudJean-Frederic Clere
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoringSimon Ritter
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlLeon Chen
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection TuningKai Koenig
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptablesKernel TLV
 
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...AMD Developer Central
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Hajime Tazaki
 
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Anne Nicolas
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpotjClarity
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machineAlexei Starovoitov
 
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUsShoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUsJiannan Ouyang, PhD
 
HotSpot JVM Tuning
HotSpot JVM TuningHotSpot JVM Tuning
HotSpot JVM TuningGilad Garon
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionKohei Tokunaga
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsJiannan Ouyang, PhD
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time JavaDeniz Oguz
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasualYuji Kubota
 
Design choices of golang for high scalability
Design choices of golang for high scalabilityDesign choices of golang for high scalability
Design choices of golang for high scalabilitySeongJae Park
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...Yuji Kubota
 

What's hot (20)

"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel"Making OpenCV Code Run Fast," a Presentation from Intel
"Making OpenCV Code Run Fast," a Presentation from Intel
 
TomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloudTomcatCon: from a cluster to the cloud
TomcatCon: from a cluster to the cloud
 
Java performance monitoring
Java performance monitoringJava performance monitoring
Java performance monitoring
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection Tuning
 
netfilter and iptables
netfilter and iptablesnetfilter and iptables
netfilter and iptables
 
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...
PT-4057, Automated CUDA-to-OpenCL™ Translation with CU2CL: What's Next?, by W...
 
Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01Library Operating System for Linux #netdev01
Library Operating System for Linux #netdev01
 
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
Kernel Recipes 2018 - XDP: a new fast and programmable network layer - Jesper...
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpot
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machine
 
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUsShoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
Shoot4U: Using VMM Assists to Optimize TLB Operations on Preempted vCPUs
 
HotSpot JVM Tuning
HotSpot JVM TuningHotSpot JVM Tuning
HotSpot JVM Tuning
 
Startup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image DistributionStartup Containers in Lightning Speed with Lazy Image Distribution
Startup Containers in Lightning Speed with Lazy Image Distribution
 
Achieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-KernelsAchieving Performance Isolation with Lightweight Co-Kernels
Achieving Performance Isolation with Lightweight Co-Kernels
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time Java
 
jcmd #javacasual
jcmd #javacasualjcmd #javacasual
jcmd #javacasual
 
Design choices of golang for high scalability
Design choices of golang for high scalabilityDesign choices of golang for high scalability
Design choices of golang for high scalability
 
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
HeapStats: Troubleshooting with Serviceability and the New Runtime Monitoring...
 

Similar to OpenHFT: An Advanced Java Data Locality and IPC Transport Solution

H2O Design and Infrastructure with Matt Dowle
H2O Design and Infrastructure with Matt DowleH2O Design and Infrastructure with Matt Dowle
H2O Design and Infrastructure with Matt DowleSri Ambati
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Vadym Kazulkin
 
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovJava 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovSvetlin Nakov
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Martijn Verburg
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016Trayan Iliev
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1Hajime Tazaki
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Hajime Tazaki
 
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...Vadym Kazulkin
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevMattias Karlsson
 
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...Vadym Kazulkin
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12FarjanaAhmed3
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGSylvain Wallez
 

Similar to OpenHFT: An Advanced Java Data Locality and IPC Transport Solution (20)

Java 7 & 8
Java 7 & 8Java 7 & 8
Java 7 & 8
 
H2O Design and Infrastructure with Matt Dowle
H2O Design and Infrastructure with Matt DowleH2O Design and Infrastructure with Matt Dowle
H2O Design and Infrastructure with Matt Dowle
 
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
Highlights from Java 10, 11 and 12 and Future of Java at Javaland 2019 By Vad...
 
Panama.pdf
Panama.pdfPanama.pdf
Panama.pdf
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin NakovJava 7 - New Features - by Mihail Stoynov and Svetlin Nakov
Java 7 - New Features - by Mihail Stoynov and Svetlin Nakov
 
Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)Back to the future with Java 7 (Geekout June/2011)
Back to the future with Java 7 (Geekout June/2011)
 
Java 7 & 8 - A&BP CC
Java 7 & 8 - A&BP CCJava 7 & 8 - A&BP CC
Java 7 & 8 - A&BP CC
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
Java On Speed
Java On SpeedJava On Speed
Java On Speed
 
LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1LibOS as a regression test framework for Linux networking #netdev1.1
LibOS as a regression test framework for Linux networking #netdev1.1
 
Java 8 Overview
Java 8 OverviewJava 8 Overview
Java 8 Overview
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
How can your applications benefit from Java 9?
How can your applications benefit from Java 9?How can your applications benefit from Java 9?
How can your applications benefit from Java 9?
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ..."Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
"Highlights from Java 10&11 and Future of Java" at Java User Group Bonn 2018 ...
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...
Highlights from Java 10-13 and Future of Java at JCON 2019 by Alukhanov and K...
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12
 
Inside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUGInside the JVM - Follow the white rabbit! / Breizh JUG
Inside the JVM - Follow the white rabbit! / Breizh JUG
 

Recently uploaded

Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 

Recently uploaded (20)

Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 

OpenHFT: An Advanced Java Data Locality and IPC Transport Solution

  • 1. Advanced Java Data Locality and Data IPC Transport Solutions: An Introduction to OpenHFT ben.cotton@jpmorgan.com ben.cotton@alumni.rutgers.edu Jan 27, 2015
  • 2. For real-time Java deployments (with the strictest SLAs) the problem of JVM “Stop the World” GC activity (on medium-lived on- Heap objects) is a MONSTROUS problem. 2
  • 3. Simple Remedy? Design Java developments and deployments so that medium-lived Collections (e.g. that “old dog” HashMap) object instance(s) are taught a “new trick” …. That “new trick” is simple: take HashMap completely Off-Heap. The Heap Good Boy! Off-Heap you go … 3
  • 4. But What kind of HashMap are we putting Off-Heap? • java.util.HashMap ? • Collections.synchronizedMap( java.util.HashMap ); ? • java.util.concurrent.ConcurrentHashMap ? • something entirely different ? ANSWER: something very different (indeed)! • OpenHFT’s Chronicle Map SOLUTION • net.openhft.chronicle.map.ChronicleMap 4
  • 5. What exactly is OpenHFT? • 100% Open Source • Designed to empower Higher Frequency Trading (HFT) • https://github.com/OpenHFT (developer source repo) • http://www.openhft.net (Products. Services. Training) • Provides modules that empower ultra low latency Java deployments to achieve REAL-TIME compliance (with even their strictest of SLAs) • Java-Lang (Marshalling / GC Free De-Marshalling / Thread-SAFE / IPC-SAFE / Off-Heap/ 64-bit ByteBuffers) • Chronicle-Queue (persisted low-latency Queue messaging and Logging) • Chroncile-Map (ChronicleMap, Thread-SAFE/IPC-SAFE/Off-Heap) • Chronicle-Engine Fast Data Framework. • Java-Runtime-Compiler (builds OpenHFT native impl classes – in process – of user supplied JBI interfaces) • Java-Thread-Affinity (allows JVM Threads to be pinned by affinity to specific OS cpus) • TransFIX (ultra low latency FIX engine) 5
  • 6. What really is OpenHFT? OpenHFT is a 100% OSS solution that empowers Java developers to deliver the highest performing and most flexible • Data Locality (Optimised memory layout) And • Data IPC Transport (waaay faster than UDP/TCP) Capabilities. 6
  • 7. PART 1 OpenHFT as an Advanced Java Data Locality Provider (That’s right folks! We’re going Off-Heap) 7
  • 10. 10
  • 11. 11
  • 12. Java Heap Layout: Through the Generations View 12
  • 13. OpenHFT: Off-Heap ChronicleMap … an Architectural View 13
  • 14. OpenHFT : Step #1 (PID 1) 14
  • 15. OpenHFT : Step #2 (PID 1) – thread safe write to off heap 15
  • 16. OpenHFT : Step #3 (PID 1) 16
  • 17. OpenHFT : Step #4 (PID 2) – thread safe read (concurrent) 17
  • 18. OpenHFT : Step #5 (PID 2) update an existing entry (thread safe) 18
  • 19. OpenHFT : Step #6 (PID 2) 19
  • 20. OpenHFT : Step #6 (PID 2) S OpenHFT code sample demo Summary: - MT-SAFE operations - IPC-SAFE operations - IPC-ATOMIC operations - ZERO-COPY (*) - GC-Free Marshalling/De-Marshalling - Ambition to provide the symmetry of java.util.concurrent.* API support across native Linux processes (not just Threads!) - Nanosecond transport latency (stay tuned for details) * (note on Map<K,V > type domain support status). 20
  • 21. Performance Results: CHM vs. SHM On Linux 14.04, dual E5-2650 v2 @ 2.60GHz, 128 GB memory, each entry updated 32 times. ConcurrentHashMap -Xmx110g -Xms110g -verbose:gc 21
  • 22. Performance Results: CHM vs. SHM On Linux 14.04, dual E5-2650 v2 @ 2.60GHz, 128 GB memory, each entry updated 32 times. 22
  • 23. OpenHFT as an Off-Heap JCACHE Provider (e.g. RedHat JDG Infinispan) 23
  • 24. OpenHFT empowers developers to use OpenJDK and Native Linux OS to 100% protect their medium-lived Java Collections (ChronicleMap) from being impacted by STW GC pauses. 24
  • 25. PART 2 OpenHFT as an Advanced Java IPC Transport Provider (That’s right folks! UDP/TCP now joined by native Linux /dev/shm IPC) 25
  • 26. OSI Model of Networking Layers: 26
  • 27. Java 7 Sockets Direct Protocol: Delivering SDP/IB as a Transport 27
  • 28. Java 7 Sockets Direct Protocol: Delivering to Java its first RDMA capability 28
  • 29. Intel iWARP: potential to empower Java 9 with SDP/10gE as a Transport With SDP/10gE Java 9 will be able to deliver RDMA to the Java Ethernet masses! 29
  • 30. OpenHFT as a /dev/shm IPC Transport Provider: peter.lawrey@higherfrequencytrading.com “I want to be disruptive rather than rehash or just slightly improve existing products.” 08/14/2014 Ah, the glory! 30
  • 31. OpenHFT as a /dev/shm IPC Transport Provider: ZERO COPY capability Advanced BytesMarshallable impl of Externalizable – for CBV Copy tolerant parts of Liquidity Risk AE. ZERO GC CAPACITY LIMITED ONLY BY PHYSICAL RAM CONSISTENTLY 438% Faster than On JVM Heap Cache<K,V> like operands JPM Tests show= Mean 350 nano-second /dev/shm latency (ZC Entry<K,V> transport, RDR_DIM Mock) DOES NOT SUPPORT FULLY-TRANSITIVE GENERIC V=Object Graph as Cache<K,V> Operand. Currently {String, primitive} for ZC. NO immediate Plug-N-Play w/ RDR_DIM Operands used by Liquidity Risk AE NOT YET ADAPTED w/in RedHat JDG as JSR-107 compliant Cache<K,V> Operand. 31
  • 32. PROOF IS IN THE TEST RESULTS: What do we get using OpenHFT vs. RedHat JDG? OpenHFT /dev/shm/SharedHashMap<K,V> as operand provider: To try , run the following command in 2 separated terminals ( (rm /dev/shm/*) Left player must be started first!): java org.junit.runner.JUnitCore net.openhft.collections.fromdocs.com.jpmorgan.pingpong_latency.PingPongPlayerLeft java org.junit.runner.JUnitCore net.openhft.collections.fromdocs.com.jpmorgan.pingpong_latency.PingPongPlayerRigh t 32424: 1 x _bondEntryV.getCoupon() (last _couponL=[5.00 %]) in 37.0 nanos 32425: 1 x _bondEntryV.getCoupon() (last _couponL=[5.00 %]) in 37.5 nanos 32423: 1 x _bondEntryV.getCoupon() (last _couponR=[4.00 %]) in 37.0 nanos 32424: 1 x _bondEntryV.getCoupon() (last _couponR=[4.00 %]) in 31.0 nanos Full results at https://github.com/Cotton- Ben/HugeCollections/tree/master/collections/src/test/java/net/openhft/collect ions/fromdocs/com/jpmorgan/pingpong_latency 32
  • 34. PROOF IS IN THE TEST RESULTS: What do we get using OpenHFT vs. RedHat JDG? RedHat JDG and JCACHE<K,V> as operand provider: To try with a distributed cache, run the following command in separated terminals: java -cp "target/classes:target/dependency/*“ org.infinispan.quickstart.clusteredcache.Node -d LEFT java -cp "target/classes:target/dependency/*“ org.infinispan.quickstart.clusteredcache.Node -d RIGHT counter=[217924] cache.put('369604103',3.000%); took 92,599 nanos counter=[217925] cache.put('369604103',6.000%); took 90,062 nanos counter=[42529] fl=[5%] = cache.get('369604103'); took 52,624 nanos counter=[42530] fl=[6%] = cache.get('369604103'); took 47,981 nanos ( full results at https://github.com/Cotton-Ben/infinispan- quickstart/tree/master/clustered-cache ) 34
  • 35. RedHat JDG and JCACHE<K,V> as operand provider (1,000x slower) 35
  • 36. Bottom Line = Tests by Real-Time Liquidity Risk Technology AggEng team imperically demonstrate that OpenHFT off-heap over /dev/shm IPC transport is 1,000x faster than RedHat JDG on-heap over UDP OSI-Loopback IPC transport. IMMEDIATE NEXT STEPS: NO DOUBT ABOUT IT = We need the OpenHFT off heap capability made available to us via the RedHat JDG product and its JCACHE API! Explicit commits from Mircea re: adapting Peter’s OpenHFT SHM as RedHat JDG interoperable JSR-107 Cache<K,V>. RedHat customer support case? Explicit commits from Bela re: “short circuiting” all node  node transport resolution to use /dev/shm IPC as transport (instead of TCP/UDP) whenever possible … RedHat customer support case? Explicit commits from Peter re: supporting above with OpenHFT as the Off-Heap provider. JPM retain OpenHFT via support subscription? Continued commits/time planning re: Ben, Dmitry, Xiao efforts to maintained Fork’d repo and build sound/complete/confirming tests. 36
  • 37. THE END Note: For all things re OpenHFT Please contact: Peter.Lawrey@higherfrequencytrading.com www.openhft.net Peter.Lawrey@higherfrequencytrading.com www.openhft.net 37