SlideShare a Scribd company logo
1 of 14
Download to read offline
Understanding and Designing Ultra Low
Latency Systems
TrainingContents
☛ Description
☛ Intended Audience
☛ Key Skills
☛ Prerequisites
☛ Instructional Method
☛ course contents
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
Understanding and Designing Ultra Low
Latency Systems
Course Contents
☛ CPU Day1
☛ File Systems
☛ Disks Day2
☛ Memory
☛ Network
☛ Observability Tools Day3
☛ Benchmarking
☛ Low Latency and High
Performance Libraries and Classes
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
Description:
■ Traditional models of concurrent programming have been around for some time.They
work well and have matured quite a bit over the last couple of years. However,
every once in a while there low latency and high throughput requirements that
cannot be met by traditional models of concurrency and application design. How
about handling 800-900 million operations/second per core of a system. When
designing such systems one has to throw away the traditional models of application
design and think different. In this seminar we discuss some of the approaches that
can make this possible. This approach is hardware friendly and a re-look at data
from a hardware perspective. It requires logical understanding of how modern
hardware works. It also requires the knowledge of tools that can help track down a
particular stall and possibly the reason behind it. This may provide pointers for a
redesign if required. In the balance then, this training is about an architectures that
are Hardware friendly. It also about very specialized data structures that fully
exploits the underlying architecture of the processor, cache, memory, disk,
filesystem, and network. The design of this training is like a series of understand-
hardware/OS-concept, apply-it-to-design, measure-it-with-tool.
Intended Audience:
■
■
■
■
Software Architects
JVM Tuners
Technology Officers
Senior Software Engineers
Key Skills:
■
■
■
■
■
■
■
■
Understand the cache coherency protocol
Architectural understanding of disruptor.
Processor Micro-architecture refresher
Understand and measure the effect of thread
affinity Understand Off heap techniques
Understand and measure the effect of various levels of
caches Understand how ultra low latency designs are done.
Understand and measure the effect of prefetches
Prerequisites:
■
■
■
■
A very good knowledge of java
Very experienced in software design and architecture.
A working knowledge of C/C++ will be helpful
Knowledge of existing data structures in Java
Instructional Method:
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
■
■
■
Slides with pictures to represent concepts
Instructor Led
Hand-on Session to gauge the effect of hardware
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
Understanding and Designing Ultra Low
Latency Systems
■ CPU
• Branch mispredictions, Wasted Work, Misprediction Penalties
and UOP Flow
• Intel® Xeon™,Sandybridge™,Ivybridge™,Haswell™ Processor
• Uncore Memory Subsystem
• Performance Analysis
• processor Performance Events: Overview
• Performance Analysis and the Intel® Core™ i Processor and
Intel® Xeon™
• Basic Intel® Core™ i Processor and Intel® Xeon™
Processor Architecture and
• Core Out of Order Pipeline
• Core Performance Monitoring Unit (PMU)
• Core Memory Subsystem
• Uncore Performance Monitoring Unit (PMU)
• Core Performance Monitoring Unit (PMU)
■ CPU Internals
• CPU Run Queues
• Saturation
• Software
• Priority Inversion
• Terminology
• Word Size
• Concepts
• Instruction Pipeline
• CPU Memory Caches
• Microcode and Exceptions
• Models
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• Clock Rate
• Branch Mispredictions
• Front End Events
• Hardware
• User-Time/Kernel-Time
• Compiler Optimization
• CPU Architecture
• Utilization
• Instruction Width
• Multiprocess, Multithreading
• Preemption
• FE Code Generation Metrics
• CPI, IPC
• Architecture
■ Factoring in CPU specifics into Design
• Lock effects
• Ordering Effects
• Branch Prediction effects
• Cache Line effcts
• Cache effects
• Thread Affinity
• Multi-Core effects
• Prefetcher effects
■ File Systems
• Second-Level Cache
• Random versus Sequential I/O
• Models
• Terminology
• Concepts
• Caching
• File System Interfaces
• File System Latency
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• Prefetch
• File System Cache
■ Factoring in FileSystem specifics into Design
• Configuring Write ahead
• Configuring Read ahead
• Ramfs and tmpfs
• File System latency
■ File Systems Internals
• Volumes and Pools
• Access Timestamps
• Memory-Mapped Files
• Synchronous Writes
• Random versus Sequential I/O
• Metadata
• Second-Level Cache
• Write-Back Caching
• Non-Blocking I/O
• Prefetch
• File System I/O Stack
• Logical versus Physical I/O
• File System Interfaces
• VFS
• File System Latency
• Special File Systems
• File System Types
• Terminology
• Caching
• Read-Ahead
• Raw and Direct I/O
• File System Features
• File System Caches
• File System Cache
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• Models
■ Disks
• Models
• Terminology
• Caching Disk
• Simple Disk
• Controller
■ Disk Internals
• IOPS Are Not Equal
• Caching
• I/O Size
• I/O Wait
• Concepts
• Storage Type
• Disk Types
• Utilization
• Time Scales
• Synchronous versus Asynchronous
• Read/Write Ratio
• Measuring Time
• Non-Data-Transfer Disk Commands
• Operating System Disk I/O Stack
• Saturation
• Random versus Sequential I/O
■ Factoring in Disk specifics into Design
• Scaling
• Micro-Benchmarking
• Event Tracing
• Latency Analysis
• Cache Tuning
• Resource Controls
• Static Performance Tuning
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
■ Memory
• Virtual Memory
• Concepts
• Terminology
■ Memory Internals
• File System Cache Usage
• Swapping
• Utilization and Saturation
• Overcommit
• Allocators
• Process Address Space
• Demand Paging
• Paging
• 9 Word Size
■ JVM Memory
• Ordering fields of DataValueClasses
• Write with Direct Reference
• Off-Heap Data Structures
• Off-Heap Queues
• Write with Direct Instance
• Off-Heap Maps
• Read with Direct Reference
■ Network
• Network Interface
• Terminology
• Models
■ Factoring in Network specifics into Design
• Replication How it works
• Zero copy/Send file
• TCP/IP Throttling
• Multiple Processes on the same server with Replication
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• How to setup UDP Replication
• TCP / UDP Background
• TCP / UDP Replication
• Identifier for Replication
■ Network Internals
• Software
• Latency
• Controller
• Encapsulation
• Protocols
• Buffering
• Packet Size
• Protocol Stack
• Connection Backlog
• Networks and Routing
• Hardware
• Interface Negotiation
• Utilization
■ Observability Tools
• DTrace
• Perf
• Profiling
• Observability Sources
• Solaris Analyzer
• /sys
• Ftrace
• kstat
• Tracing
• SystemTap
• /proc
• JMH
• Tool Types
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• Delay Accounting
• Microstate Accounting
• Counters
• Monitoring
■ Benchmarking
• Passive Benchmarking
• Sanity Check
• Ramping Load
• Activities
• Replay
• Active Benchmarking
• Workload Characterization
• Micro-Benchmarking
• Background
• Statistical Analysis
• Benchmarking Types
• Custom Benchmarks
• Effective Benchmarking
• Methodology
• CPU Profiling
• Industry Standards
• Simulation
• Benchmarking Sins
■ Low Latency and High Performance Libraries and Classes
■ OpenHFT Architecture
■ Compiler
• Generating Off heap classes for on heap interfaces
■ Java Affinity
• Affinity Thread Factory
• isolcpus
• using perf and likwid to measure L1, L2 and, L3 cache
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
performance
• PosixJNA Affinity
• Write Buffer
• Lock Inventory
• How much does thread Affinity Matters
• using likwid to measure prefetchers
• Non Forging Affinity Lock
• Affinity Strategies
• Affinity Support
• Cache Architecture
• using mpstat to measure and verify
• Read Buffers
• CPU Layout
■ Chronicle
• Consumer insensitive
• How does it collect garbage
• Messaging between processes via shared memory
• Synchronous text logging
• High throughput trading systems
• Messaging across systems
• Low latency, high frequency trading
• Supports recording micro-second timestamps across the
systems
• Synchronous binary data logging
• Cache friendly
• Functionality is simple and low level by design
• Very fast embedded persistence for Java.
• Replay for production data in test
• Introduction to Chronicle
■ Chronicle:Modes of use
• Lock-less
• Supports thread affinity
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
• Shared memory
• Text or binary
• GC free
• Replicated over TCP
■ Huge Collection
• Advanced Off Heap IPC in Java
• Low latency, high throughput software
• OpenHFT Chronicle, low latency logging, event store and
IPC. (record / log everything)
• Micro-second latency.
• OpenHFT Collections, cross process embedded persisted
data stores. (only need the latest)
• Millions of operations per second.
• HugeHashMap
• SharedHashMap
■ How is off heap memory used?
• Around 8x faster than System V IPC.
• Memory mapped files
• Durable on application restart
• One copy in memory.
• Can be used without serialization / deserialization.
• Thread safe operations across processes
■ Lang
• serializable and deserialization of data
• writing and reading enumerable types with object pooling
• writing and read primitive types in binary and text without any
garbage.
• random access to memory in native space (off heap)
• provide the low level functionality used by Java Chronicle
• writing and reading String without creating an object (if it has
been pooled).
• Small messages serialization and deserialization in under a
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com
micro-second.
■ The Disruptor Architecture
• Data structure and work flow with no contention.
• Very fast message passing
• Overview of the Disruptor
• Allows you to go truly parallel
• Create your own
■ Hardware aware data structures in java
• Magical ring buffers
• Single writer principle
• DoubleAdder
• DoubleAccumulator
• LongAdder
• Measuring incremental tangible benefits of hardware aware
structures
• ConcurrentAutoTable
• LongAccumulator
Mobile:+91 7719882295;9730463630
Email:anand@anikatechnologies.com
www.anikatechnologies.com

More Related Content

What's hot

OpenTelemetry For Developers
OpenTelemetry For DevelopersOpenTelemetry For Developers
OpenTelemetry For DevelopersKevin Brockhoff
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and TellE. Camden Fisher
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github ActionsKnoldus Inc.
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucketMedhat Dawoud
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101Hazzim Anaya
 
Présentation de git
Présentation de gitPrésentation de git
Présentation de gitJulien Blin
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Weaveworks
 
A Kafka-based platform to process medical prescriptions of Germany’s health i...
A Kafka-based platform to process medical prescriptions of Germany’s health i...A Kafka-based platform to process medical prescriptions of Germany’s health i...
A Kafka-based platform to process medical prescriptions of Germany’s health i...HostedbyConfluent
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsGlobalLogic Ukraine
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaEdureka!
 
The Juniper SDN Landscape
The Juniper SDN LandscapeThe Juniper SDN Landscape
The Juniper SDN LandscapeChris Jones
 
Clean code & design patterns
Clean code & design patternsClean code & design patterns
Clean code & design patternsPascal Larocque
 
iSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architectsiSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architectsBert Jan Schrijver
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Deepu K Sasidharan
 

What's hot (20)

OpenTelemetry For Developers
OpenTelemetry For DevelopersOpenTelemetry For Developers
OpenTelemetry For Developers
 
Yale Jenkins Show and Tell
Yale Jenkins Show and TellYale Jenkins Show and Tell
Yale Jenkins Show and Tell
 
Introduction to Github Actions
Introduction to Github ActionsIntroduction to Github Actions
Introduction to Github Actions
 
Jenkins tutorial
Jenkins tutorialJenkins tutorial
Jenkins tutorial
 
Using Git and BitBucket
Using Git and BitBucketUsing Git and BitBucket
Using Git and BitBucket
 
Introduction to CI/CD
Introduction to CI/CDIntroduction to CI/CD
Introduction to CI/CD
 
Jenkins
JenkinsJenkins
Jenkins
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
kubernetes, pourquoi et comment
kubernetes, pourquoi et commentkubernetes, pourquoi et comment
kubernetes, pourquoi et comment
 
Présentation de git
Présentation de gitPrésentation de git
Présentation de git
 
Cloud Native Apps with GitOps
Cloud Native Apps with GitOps Cloud Native Apps with GitOps
Cloud Native Apps with GitOps
 
A Kafka-based platform to process medical prescriptions of Germany’s health i...
A Kafka-based platform to process medical prescriptions of Germany’s health i...A Kafka-based platform to process medical prescriptions of Germany’s health i...
A Kafka-based platform to process medical prescriptions of Germany’s health i...
 
CI/CD with Github Actions
CI/CD with Github ActionsCI/CD with Github Actions
CI/CD with Github Actions
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOps
 
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | EdurekaWhat is Jenkins | Jenkins Tutorial for Beginners | Edureka
What is Jenkins | Jenkins Tutorial for Beginners | Edureka
 
The Juniper SDN Landscape
The Juniper SDN LandscapeThe Juniper SDN Landscape
The Juniper SDN Landscape
 
Clean code & design patterns
Clean code & design patternsClean code & design patterns
Clean code & design patterns
 
iSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architectsiSAQB Software Architecture Gathering 2022 - Do we still need architects
iSAQB Software Architecture Gathering 2022 - Do we still need architects
 
Jenkins Pipelines
Jenkins PipelinesJenkins Pipelines
Jenkins Pipelines
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017
 

Similar to Understanding and Designing Ultra low latency systems | Low Latency | Ultra Low Latency

Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyserAlex Moskvin
 
Hpc lunch and learn
Hpc lunch and learnHpc lunch and learn
Hpc lunch and learnJohn D Almon
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 
Architectural tricks to maximize memory bandwidth
Architectural tricks to maximize memory bandwidthArchitectural tricks to maximize memory bandwidth
Architectural tricks to maximize memory bandwidthDeepak Shankar
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...KRamasamy2
 
Event Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaEvent Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaDataWorks Summit
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...VAISHNAVI MADHAN
 
Principles of High Load - Vilnius January 2015
Principles of High Load - Vilnius January 2015Principles of High Load - Vilnius January 2015
Principles of High Load - Vilnius January 2015Peter Milne
 
How AI and ML are driving Memory Architecture changes
How AI and ML are driving Memory Architecture changesHow AI and ML are driving Memory Architecture changes
How AI and ML are driving Memory Architecture changesDanny Sabour
 
Fields in computer science
Fields in computer scienceFields in computer science
Fields in computer scienceUC San Diego
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applicationsAmit Kejriwal
 
Sizing Your Scylla Cluster
Sizing Your Scylla ClusterSizing Your Scylla Cluster
Sizing Your Scylla ClusterScyllaDB
 
A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networksinside-BigData.com
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and DesignRa'Fat Al-Msie'deen
 
SoC Solutions Enabling Server-Based Networking
SoC Solutions Enabling Server-Based NetworkingSoC Solutions Enabling Server-Based Networking
SoC Solutions Enabling Server-Based NetworkingNetronome
 
Computer system organization
Computer system organizationComputer system organization
Computer system organizationSyed Zaid Irshad
 

Similar to Understanding and Designing Ultra low latency systems | Low Latency | Ultra Low Latency (20)

Realtime traffic analyser
Realtime traffic analyserRealtime traffic analyser
Realtime traffic analyser
 
Hpc lunch and learn
Hpc lunch and learnHpc lunch and learn
Hpc lunch and learn
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 
Server Tips
Server TipsServer Tips
Server Tips
 
Architectural tricks to maximize memory bandwidth
Architectural tricks to maximize memory bandwidthArchitectural tricks to maximize memory bandwidth
Architectural tricks to maximize memory bandwidth
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
 
archintro.pdf
archintro.pdfarchintro.pdf
archintro.pdf
 
Event Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache KafkaEvent Detection Pipelines with Apache Kafka
Event Detection Pipelines with Apache Kafka
 
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
Floating Point Operations , Memory Chip Organization , Serial Bus Architectur...
 
aca mod1.pptx
aca mod1.pptxaca mod1.pptx
aca mod1.pptx
 
Principles of High Load - Vilnius January 2015
Principles of High Load - Vilnius January 2015Principles of High Load - Vilnius January 2015
Principles of High Load - Vilnius January 2015
 
High performance computing
High performance computingHigh performance computing
High performance computing
 
How AI and ML are driving Memory Architecture changes
How AI and ML are driving Memory Architecture changesHow AI and ML are driving Memory Architecture changes
How AI and ML are driving Memory Architecture changes
 
Fields in computer science
Fields in computer scienceFields in computer science
Fields in computer science
 
Building data intensive applications
Building data intensive applicationsBuilding data intensive applications
Building data intensive applications
 
Sizing Your Scylla Cluster
Sizing Your Scylla ClusterSizing Your Scylla Cluster
Sizing Your Scylla Cluster
 
A Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural NetworksA Dataflow Processing Chip for Training Deep Neural Networks
A Dataflow Processing Chip for Training Deep Neural Networks
 
Computer Organization and Design
Computer Organization and DesignComputer Organization and Design
Computer Organization and Design
 
SoC Solutions Enabling Server-Based Networking
SoC Solutions Enabling Server-Based NetworkingSoC Solutions Enabling Server-Based Networking
SoC Solutions Enabling Server-Based Networking
 
Computer system organization
Computer system organizationComputer system organization
Computer system organization
 

More from Anand Narayanan

Scrum Foundation Training by Anika Technologies
Scrum Foundation Training by Anika TechnologiesScrum Foundation Training by Anika Technologies
Scrum Foundation Training by Anika TechnologiesAnand Narayanan
 
Agile Essentials Training by Anika Technologies
Agile Essentials Training by Anika TechnologiesAgile Essentials Training by Anika Technologies
Agile Essentials Training by Anika TechnologiesAnand Narayanan
 
Smart Staffing using Regression Analysis Model
Smart Staffing using Regression Analysis ModelSmart Staffing using Regression Analysis Model
Smart Staffing using Regression Analysis ModelAnand Narayanan
 
Sentiment analysis using nlp
Sentiment analysis using nlpSentiment analysis using nlp
Sentiment analysis using nlpAnand Narayanan
 
Deep learning with_computer_vision
Deep learning with_computer_visionDeep learning with_computer_vision
Deep learning with_computer_visionAnand Narayanan
 
Spark Internals Training | Apache Spark | Spark | Anika Technologies
Spark Internals Training | Apache Spark | Spark | Anika TechnologiesSpark Internals Training | Apache Spark | Spark | Anika Technologies
Spark Internals Training | Apache Spark | Spark | Anika TechnologiesAnand Narayanan
 
Advanced Elastic Search | Elastic Search | Kibana | Logstash
Advanced Elastic Search | Elastic Search | Kibana | LogstashAdvanced Elastic Search | Elastic Search | Kibana | Logstash
Advanced Elastic Search | Elastic Search | Kibana | LogstashAnand Narayanan
 
JVM and Java Performance Tuning | JVM Tuning | Java Performance
JVM and Java Performance Tuning | JVM Tuning | Java PerformanceJVM and Java Performance Tuning | JVM Tuning | Java Performance
JVM and Java Performance Tuning | JVM Tuning | Java PerformanceAnand Narayanan
 
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...Anand Narayanan
 
Big Data Analytics and Artifical Intelligence
Big Data Analytics and Artifical IntelligenceBig Data Analytics and Artifical Intelligence
Big Data Analytics and Artifical IntelligenceAnand Narayanan
 
SynopsisLowLatencySeminar.PDF
SynopsisLowLatencySeminar.PDFSynopsisLowLatencySeminar.PDF
SynopsisLowLatencySeminar.PDFAnand Narayanan
 

More from Anand Narayanan (12)

Scrum Foundation Training by Anika Technologies
Scrum Foundation Training by Anika TechnologiesScrum Foundation Training by Anika Technologies
Scrum Foundation Training by Anika Technologies
 
Agile Essentials Training by Anika Technologies
Agile Essentials Training by Anika TechnologiesAgile Essentials Training by Anika Technologies
Agile Essentials Training by Anika Technologies
 
Smart Staffing using Regression Analysis Model
Smart Staffing using Regression Analysis ModelSmart Staffing using Regression Analysis Model
Smart Staffing using Regression Analysis Model
 
Sentiment analysis using nlp
Sentiment analysis using nlpSentiment analysis using nlp
Sentiment analysis using nlp
 
Deep learning with_computer_vision
Deep learning with_computer_visionDeep learning with_computer_vision
Deep learning with_computer_vision
 
Spark Internals Training | Apache Spark | Spark | Anika Technologies
Spark Internals Training | Apache Spark | Spark | Anika TechnologiesSpark Internals Training | Apache Spark | Spark | Anika Technologies
Spark Internals Training | Apache Spark | Spark | Anika Technologies
 
Advanced Elastic Search | Elastic Search | Kibana | Logstash
Advanced Elastic Search | Elastic Search | Kibana | LogstashAdvanced Elastic Search | Elastic Search | Kibana | Logstash
Advanced Elastic Search | Elastic Search | Kibana | Logstash
 
Deep learning internals
Deep learning internalsDeep learning internals
Deep learning internals
 
JVM and Java Performance Tuning | JVM Tuning | Java Performance
JVM and Java Performance Tuning | JVM Tuning | Java PerformanceJVM and Java Performance Tuning | JVM Tuning | Java Performance
JVM and Java Performance Tuning | JVM Tuning | Java Performance
 
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...Java Concurrency and Performance | Multi Threading  | Concurrency | Java Conc...
Java Concurrency and Performance | Multi Threading | Concurrency | Java Conc...
 
Big Data Analytics and Artifical Intelligence
Big Data Analytics and Artifical IntelligenceBig Data Analytics and Artifical Intelligence
Big Data Analytics and Artifical Intelligence
 
SynopsisLowLatencySeminar.PDF
SynopsisLowLatencySeminar.PDFSynopsisLowLatencySeminar.PDF
SynopsisLowLatencySeminar.PDF
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Understanding and Designing Ultra low latency systems | Low Latency | Ultra Low Latency

  • 1. Understanding and Designing Ultra Low Latency Systems TrainingContents ☛ Description ☛ Intended Audience ☛ Key Skills ☛ Prerequisites ☛ Instructional Method ☛ course contents Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 2. Understanding and Designing Ultra Low Latency Systems Course Contents ☛ CPU Day1 ☛ File Systems ☛ Disks Day2 ☛ Memory ☛ Network ☛ Observability Tools Day3 ☛ Benchmarking ☛ Low Latency and High Performance Libraries and Classes Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 3. Description: ■ Traditional models of concurrent programming have been around for some time.They work well and have matured quite a bit over the last couple of years. However, every once in a while there low latency and high throughput requirements that cannot be met by traditional models of concurrency and application design. How about handling 800-900 million operations/second per core of a system. When designing such systems one has to throw away the traditional models of application design and think different. In this seminar we discuss some of the approaches that can make this possible. This approach is hardware friendly and a re-look at data from a hardware perspective. It requires logical understanding of how modern hardware works. It also requires the knowledge of tools that can help track down a particular stall and possibly the reason behind it. This may provide pointers for a redesign if required. In the balance then, this training is about an architectures that are Hardware friendly. It also about very specialized data structures that fully exploits the underlying architecture of the processor, cache, memory, disk, filesystem, and network. The design of this training is like a series of understand- hardware/OS-concept, apply-it-to-design, measure-it-with-tool. Intended Audience: ■ ■ ■ ■ Software Architects JVM Tuners Technology Officers Senior Software Engineers Key Skills: ■ ■ ■ ■ ■ ■ ■ ■ Understand the cache coherency protocol Architectural understanding of disruptor. Processor Micro-architecture refresher Understand and measure the effect of thread affinity Understand Off heap techniques Understand and measure the effect of various levels of caches Understand how ultra low latency designs are done. Understand and measure the effect of prefetches Prerequisites: ■ ■ ■ ■ A very good knowledge of java Very experienced in software design and architecture. A working knowledge of C/C++ will be helpful Knowledge of existing data structures in Java Instructional Method: Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 4. ■ ■ ■ Slides with pictures to represent concepts Instructor Led Hand-on Session to gauge the effect of hardware Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 5. Understanding and Designing Ultra Low Latency Systems ■ CPU • Branch mispredictions, Wasted Work, Misprediction Penalties and UOP Flow • Intel® Xeon™,Sandybridge™,Ivybridge™,Haswell™ Processor • Uncore Memory Subsystem • Performance Analysis • processor Performance Events: Overview • Performance Analysis and the Intel® Core™ i Processor and Intel® Xeon™ • Basic Intel® Core™ i Processor and Intel® Xeon™ Processor Architecture and • Core Out of Order Pipeline • Core Performance Monitoring Unit (PMU) • Core Memory Subsystem • Uncore Performance Monitoring Unit (PMU) • Core Performance Monitoring Unit (PMU) ■ CPU Internals • CPU Run Queues • Saturation • Software • Priority Inversion • Terminology • Word Size • Concepts • Instruction Pipeline • CPU Memory Caches • Microcode and Exceptions • Models Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 6. • Clock Rate • Branch Mispredictions • Front End Events • Hardware • User-Time/Kernel-Time • Compiler Optimization • CPU Architecture • Utilization • Instruction Width • Multiprocess, Multithreading • Preemption • FE Code Generation Metrics • CPI, IPC • Architecture ■ Factoring in CPU specifics into Design • Lock effects • Ordering Effects • Branch Prediction effects • Cache Line effcts • Cache effects • Thread Affinity • Multi-Core effects • Prefetcher effects ■ File Systems • Second-Level Cache • Random versus Sequential I/O • Models • Terminology • Concepts • Caching • File System Interfaces • File System Latency Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 7. • Prefetch • File System Cache ■ Factoring in FileSystem specifics into Design • Configuring Write ahead • Configuring Read ahead • Ramfs and tmpfs • File System latency ■ File Systems Internals • Volumes and Pools • Access Timestamps • Memory-Mapped Files • Synchronous Writes • Random versus Sequential I/O • Metadata • Second-Level Cache • Write-Back Caching • Non-Blocking I/O • Prefetch • File System I/O Stack • Logical versus Physical I/O • File System Interfaces • VFS • File System Latency • Special File Systems • File System Types • Terminology • Caching • Read-Ahead • Raw and Direct I/O • File System Features • File System Caches • File System Cache Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 8. • Models ■ Disks • Models • Terminology • Caching Disk • Simple Disk • Controller ■ Disk Internals • IOPS Are Not Equal • Caching • I/O Size • I/O Wait • Concepts • Storage Type • Disk Types • Utilization • Time Scales • Synchronous versus Asynchronous • Read/Write Ratio • Measuring Time • Non-Data-Transfer Disk Commands • Operating System Disk I/O Stack • Saturation • Random versus Sequential I/O ■ Factoring in Disk specifics into Design • Scaling • Micro-Benchmarking • Event Tracing • Latency Analysis • Cache Tuning • Resource Controls • Static Performance Tuning Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 9. ■ Memory • Virtual Memory • Concepts • Terminology ■ Memory Internals • File System Cache Usage • Swapping • Utilization and Saturation • Overcommit • Allocators • Process Address Space • Demand Paging • Paging • 9 Word Size ■ JVM Memory • Ordering fields of DataValueClasses • Write with Direct Reference • Off-Heap Data Structures • Off-Heap Queues • Write with Direct Instance • Off-Heap Maps • Read with Direct Reference ■ Network • Network Interface • Terminology • Models ■ Factoring in Network specifics into Design • Replication How it works • Zero copy/Send file • TCP/IP Throttling • Multiple Processes on the same server with Replication Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 10. • How to setup UDP Replication • TCP / UDP Background • TCP / UDP Replication • Identifier for Replication ■ Network Internals • Software • Latency • Controller • Encapsulation • Protocols • Buffering • Packet Size • Protocol Stack • Connection Backlog • Networks and Routing • Hardware • Interface Negotiation • Utilization ■ Observability Tools • DTrace • Perf • Profiling • Observability Sources • Solaris Analyzer • /sys • Ftrace • kstat • Tracing • SystemTap • /proc • JMH • Tool Types Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 11. • Delay Accounting • Microstate Accounting • Counters • Monitoring ■ Benchmarking • Passive Benchmarking • Sanity Check • Ramping Load • Activities • Replay • Active Benchmarking • Workload Characterization • Micro-Benchmarking • Background • Statistical Analysis • Benchmarking Types • Custom Benchmarks • Effective Benchmarking • Methodology • CPU Profiling • Industry Standards • Simulation • Benchmarking Sins ■ Low Latency and High Performance Libraries and Classes ■ OpenHFT Architecture ■ Compiler • Generating Off heap classes for on heap interfaces ■ Java Affinity • Affinity Thread Factory • isolcpus • using perf and likwid to measure L1, L2 and, L3 cache Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 12. performance • PosixJNA Affinity • Write Buffer • Lock Inventory • How much does thread Affinity Matters • using likwid to measure prefetchers • Non Forging Affinity Lock • Affinity Strategies • Affinity Support • Cache Architecture • using mpstat to measure and verify • Read Buffers • CPU Layout ■ Chronicle • Consumer insensitive • How does it collect garbage • Messaging between processes via shared memory • Synchronous text logging • High throughput trading systems • Messaging across systems • Low latency, high frequency trading • Supports recording micro-second timestamps across the systems • Synchronous binary data logging • Cache friendly • Functionality is simple and low level by design • Very fast embedded persistence for Java. • Replay for production data in test • Introduction to Chronicle ■ Chronicle:Modes of use • Lock-less • Supports thread affinity Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 13. • Shared memory • Text or binary • GC free • Replicated over TCP ■ Huge Collection • Advanced Off Heap IPC in Java • Low latency, high throughput software • OpenHFT Chronicle, low latency logging, event store and IPC. (record / log everything) • Micro-second latency. • OpenHFT Collections, cross process embedded persisted data stores. (only need the latest) • Millions of operations per second. • HugeHashMap • SharedHashMap ■ How is off heap memory used? • Around 8x faster than System V IPC. • Memory mapped files • Durable on application restart • One copy in memory. • Can be used without serialization / deserialization. • Thread safe operations across processes ■ Lang • serializable and deserialization of data • writing and reading enumerable types with object pooling • writing and read primitive types in binary and text without any garbage. • random access to memory in native space (off heap) • provide the low level functionality used by Java Chronicle • writing and reading String without creating an object (if it has been pooled). • Small messages serialization and deserialization in under a Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com
  • 14. micro-second. ■ The Disruptor Architecture • Data structure and work flow with no contention. • Very fast message passing • Overview of the Disruptor • Allows you to go truly parallel • Create your own ■ Hardware aware data structures in java • Magical ring buffers • Single writer principle • DoubleAdder • DoubleAccumulator • LongAdder • Measuring incremental tangible benefits of hardware aware structures • ConcurrentAutoTable • LongAccumulator Mobile:+91 7719882295;9730463630 Email:anand@anikatechnologies.com www.anikatechnologies.com