SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
INTER-PROCESS COMMUNICATION
ON STEROIDS
Roberto A.Vitillo (LBNL)
ATLAS SOFTWARE & COMPUTING WORKSHOP
OCTOBER 2012
1
CONTEXT
• AthenaMP communications
‣ reader process sends events to workers
• Coprocessor communications
‣ Athena[MP] jobs interacting with a GPU server process
• Available IPC mechanisms
‣ shared memory with explicit synchronization
‣ message passing with implicit synchronization
2
MESSAGE PASSING MODEL
• One of the most successful models for providing concurrency
‣ data and synchronization in a single unit
• Actor Model
‣ processes have an identity
‣ communicate by sending messages to mailing addresses
‣ Erlang, Scala
• Process calculi
‣ processes are anonymous
‣ communicate by sending messages through named channels
‣ Go Programming Language
3
PATTERNS
• Producer & Consumer
‣ producer pushes messages
‣ consumer pulls messages
• Client & Server
‣ client makes a request
‣ server replies to a request
4
CHANNELS
• Properties of a channels:
‣ name
‣ context (thread, local-process, distributed-process)
‣ asynchronous(k)
‣ topology
one-to-one
one-to-many many-to-many
5
SOCKETS
• Each end of a channel is attached to a Socket
• Different patterns have different Sockets,
‣ e.g. ProducerSocket, ConsumerSocket
• A Socket allows to:
‣ send() buffers of data to its peers (buffer-blocking)
‣ receive() buffers of data from its peers (blocking)
client
server
6
SOCKETS
Channel channel("service", ONE_TO_ONE)
ISocket *socket = factory->createClientSocket(channel);
socket->send("ping", 5);
socket->receive(&buffer);
Channel channel("service", ONE_TO_ONE);
ISocket *socket = factory->createServerSocket(channel);
while(true){
socket->receive(&buffer);
socket->send("pong");
}
client
server
7
DATATRANSFERTECHNIQUES
• Zero-Copy
‣ page table entries are transferred from the source to the
destination process
‣ requires the buffers to have the same alignment
• Double copy in shared memory
‣ double buffering allows the sender and receiver to transfer data in
parallel
• Delegate the copy to a NIC
‣ avoids cache pollution
8
DATATRANSFERTECHNIQUES
• Single Copy with ptrace()
‣ debugging facility, sender processes is stopped
‣ receiver process accesses the sender’s process address space and
performs a copy
• Single Copy through a Kernel facility
‣ vmsplice (Kernel 2.6.17)
‣ KNEM (Kernel 2.6.15, requires module)
‣ Cross Memory Attach (Kernel 3.2)
9
IMPLEMENTATION
• The API is currently implemented with ZeroMQ
‣ provides a default fall back implementation
‣ lock-free queues for threads
‣ AF_UNIX sockets for local processes
‣ TCP sockets for distributed processes
• The implementation switches according to the channel configuration
‣ many-to-many channel triggers the creation of a broker process that handles all
communications
‣ one-to-one, producer-consumer uses a UNIX pipe with vmsplice()
10
BENCHMARK: LATENCY
Ivy Bridge, ZMQ 2.2, OpenMPI 1.6.2 without KNEM
0 μs
25 μs
50 μs
75 μs
100 μs
Latency on SLC6
pipe vmsplice OpenMPI ZMQ
• Test: 1 Byte Ping Pong
• MPI is using shared memory
• double copy
• avoids expensive system call which
dominates for small messages
• The pipe implementations are
dominated by the system call overhead
11
BENCHMARK: BANDWIDTH
0 GB/s
4 GB/s
8 GB/s
11 GB/s
15 GB/s
Bandwidth on SLC 6
pipe vmsplice ZMQ OpenMPI
• Benchmark: 1 Megabyte Ping Pong
• Pipe performs 2 copies (U-K-U)
• Spliced pipe performs a single copy (K-U)
• OpenMPI is using shared memory as buffer and
performs 2 copies
‣ copies are performed in parallel on both ends
‣ consumes more CPU
‣ pollutes the caches
• ZMQ uses AF_UNIX sockets, i.e. two copies are
performed
(U-K-U)
‣ all sorts of buffers in between
‣ optimized for distributed environments
12
BENCHMARK: BANDWIDTH
0 GB/s
4 GB/s
8 GB/s
11 GB/s
15 GB/s
Bandwidth on Linux 3.6
pipe vmsplice ZMQ OpenMPI
• Benchmark: 1 Megabyte Ping Pong
• Pipe performs 2 copies (U-K-U)
• Spliced pipe performs a single copy (K-U)
• OpenMPI is using shared memory as buffer and
performs 2 copies
‣ copies are performed in parallel on both ends
‣ consumes more CPU
‣ pollutes the caches
• ZMQ uses AF_UNIX sockets, i.e. two copies are
performed
(U-K-U)
‣ all sorts of buffers in between
‣ optimized for distributed environments
13
while(event){
...
socket->receive(&ready_notification);
socket->send(event, event_size);
...
}
IN ACTION:ATHENAMP
reader
worker worker
while(true){
...
socket->send(ready_notification, size);
socket->receive(&event);
...
}
while(true){
...
socket->send(ready_notification, size);
socket->receive(&event);
...
}
• SeeVakho’s talk
• Temporary hybrid approach
‣ metadata in shared memory
• Benefits:
‣ load balancing
‣ synchronization
14
CONCLUSION
• Library provides an uniform message-passing abstraction for inter-process communication
• Data and synchronization in a single unit
• Communication patterns and topologies allow to
‣ reduce latency
‣ increase bandwidth
‣ express parallelism
• More implementations will be considered
‣ shared memory segment for small messages (<10K, low latency)
‣ MPI? Doesn’t behave well with forking processes...
15
QUESTIONS?
16

Contenu connexe

Tendances

ODP IPsec lookaside API Demo
ODP IPsec lookaside API DemoODP IPsec lookaside API Demo
ODP IPsec lookaside API DemoLinaro
 
Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?ScyllaDB
 
OpenZFS code repository
OpenZFS code repositoryOpenZFS code repository
OpenZFS code repositoryMatthew Ahrens
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustScyllaDB
 
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor Borodin
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor BorodinDive into DevOps | March, Traefik as kubernetes ingress controller, Ihor Borodin
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor BorodinProvectus
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...ScyllaDB
 
Baker: Scaling OVN with Kubernetes API Server
Baker: Scaling OVN with Kubernetes API ServerBaker: Scaling OVN with Kubernetes API Server
Baker: Scaling OVN with Kubernetes API ServerHan Zhou
 
OVN DBs HA with scale test
OVN DBs HA with scale testOVN DBs HA with scale test
OVN DBs HA with scale testAliasgar Ginwala
 
OVN Controller Incremental Processing
OVN Controller Incremental ProcessingOVN Controller Incremental Processing
OVN Controller Incremental ProcessingHan Zhou
 
Containerize ovs ovn components
Containerize ovs ovn componentsContainerize ovs ovn components
Containerize ovs ovn componentsAliasgar Ginwala
 
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...QNIB Solutions
 
LF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OpenvSwitch
 
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...Fluence Labs
 
[POSS 2019] OVirt and Ceph: Perfect Combination.?
[POSS 2019] OVirt and  Ceph: Perfect Combination.?[POSS 2019] OVirt and  Ceph: Perfect Combination.?
[POSS 2019] OVirt and Ceph: Perfect Combination.?Worteks
 
Openvz booth
Openvz boothOpenvz booth
Openvz boothOpenVZ
 
Rust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency SystemsRust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency SystemsScyllaDB
 
Open vSwitch Implementation Options
Open vSwitch Implementation Options Open vSwitch Implementation Options
Open vSwitch Implementation Options Netronome
 
Toolchain Independent Distributed Compilation
Toolchain Independent Distributed CompilationToolchain Independent Distributed Compilation
Toolchain Independent Distributed CompilationDietmar Hauser
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep diveTrinath Somanchi
 
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OpenvSwitch
 

Tendances (20)

ODP IPsec lookaside API Demo
ODP IPsec lookaside API DemoODP IPsec lookaside API Demo
ODP IPsec lookaside API Demo
 
Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?Rust Is Safe. But Is It Fast?
Rust Is Safe. But Is It Fast?
 
OpenZFS code repository
OpenZFS code repositoryOpenZFS code repository
OpenZFS code repository
 
Whoops! I Rewrote It in Rust
Whoops! I Rewrote It in RustWhoops! I Rewrote It in Rust
Whoops! I Rewrote It in Rust
 
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor Borodin
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor BorodinDive into DevOps | March, Traefik as kubernetes ingress controller, Ihor Borodin
Dive into DevOps | March, Traefik as kubernetes ingress controller, Ihor Borodin
 
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
OSv Unikernel — Optimizing Guest OS to Run Stateless and Serverless Apps in t...
 
Baker: Scaling OVN with Kubernetes API Server
Baker: Scaling OVN with Kubernetes API ServerBaker: Scaling OVN with Kubernetes API Server
Baker: Scaling OVN with Kubernetes API Server
 
OVN DBs HA with scale test
OVN DBs HA with scale testOVN DBs HA with scale test
OVN DBs HA with scale test
 
OVN Controller Incremental Processing
OVN Controller Incremental ProcessingOVN Controller Incremental Processing
OVN Controller Incremental Processing
 
Containerize ovs ovn components
Containerize ovs ovn componentsContainerize ovs ovn components
Containerize ovs ovn components
 
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...QNIBTerminal: Understand your datacenter by overlaying multiple information l...
QNIBTerminal: Understand your datacenter by overlaying multiple information l...
 
LF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitchLF_OVS_17_LXC Linux Containers over Open vSwitch
LF_OVS_17_LXC Linux Containers over Open vSwitch
 
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...
Fast, deterministic, and verifiable computations with WebAssembly. WASM on th...
 
[POSS 2019] OVirt and Ceph: Perfect Combination.?
[POSS 2019] OVirt and  Ceph: Perfect Combination.?[POSS 2019] OVirt and  Ceph: Perfect Combination.?
[POSS 2019] OVirt and Ceph: Perfect Combination.?
 
Openvz booth
Openvz boothOpenvz booth
Openvz booth
 
Rust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency SystemsRust, Wright's Law, and the Future of Low-Latency Systems
Rust, Wright's Law, and the Future of Low-Latency Systems
 
Open vSwitch Implementation Options
Open vSwitch Implementation Options Open vSwitch Implementation Options
Open vSwitch Implementation Options
 
Toolchain Independent Distributed Compilation
Toolchain Independent Distributed CompilationToolchain Independent Distributed Compilation
Toolchain Independent Distributed Compilation
 
OVN - Basics and deep dive
OVN - Basics and deep diveOVN - Basics and deep dive
OVN - Basics and deep dive
 
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream KernelLF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
LF_OVS_17_Open vSwitch Offload: Conntrack and the Upstream Kernel
 

Similaire à Inter-process communication on steroids

SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)Yuuki Takano
 
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
 A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ... A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...HostedbyConfluent
 
Coherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureCoherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureUniversity of Pisa
 
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...John Holmen
 
Building zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafkaBuilding zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafkaAvinash Ramineni
 
High performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHigh performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHungWei Chiu
 
Disaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFDisaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFShapeBlue
 
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulBetter Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulHostedbyConfluent
 
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulBetter Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulHostedbyConfluent
 
Theta and the Future of Accelerator Programming
Theta and the Future of Accelerator ProgrammingTheta and the Future of Accelerator Programming
Theta and the Future of Accelerator Programminginside-BigData.com
 
Application Profiling at the HPCAC High Performance Center
Application Profiling at the HPCAC High Performance CenterApplication Profiling at the HPCAC High Performance Center
Application Profiling at the HPCAC High Performance Centerinside-BigData.com
 
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache KafkaBuilding Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache KafkaGuozhang Wang
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kevin Lynch
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDKKernel TLV
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationBigstep
 
DPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles ShiflettDPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles ShiflettJim St. Leger
 

Similaire à Inter-process communication on steroids (20)

The Google file system
The Google file systemThe Google file system
The Google file system
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
 
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
 A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ... A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
A Hitchhiker's Guide to Apache Kafka Geo-Replication with Sanjana Kaundinya ...
 
Coherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architectureCoherence and consistency models in multiprocessor architecture
Coherence and consistency models in multiprocessor architecture
 
module4.ppt
module4.pptmodule4.ppt
module4.ppt
 
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...
PEARC17: Improving Uintah's Scalability Through the Use of Portable Kokkos-Ba...
 
Building zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafkaBuilding zero data loss pipelines with apache kafka
Building zero data loss pipelines with apache kafka
 
High performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User GroupHigh performace network of Cloud Native Taiwan User Group
High performace network of Cloud Native Taiwan User Group
 
Disaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoFDisaggregating Ceph using NVMeoF
Disaggregating Ceph using NVMeoF
 
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulBetter Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
 
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, AzulBetter Kafka Performance Without Changing Any Code | Simon Ritter, Azul
Better Kafka Performance Without Changing Any Code | Simon Ritter, Azul
 
General Purpose GPU Computing
General Purpose GPU ComputingGeneral Purpose GPU Computing
General Purpose GPU Computing
 
Theta and the Future of Accelerator Programming
Theta and the Future of Accelerator ProgrammingTheta and the Future of Accelerator Programming
Theta and the Future of Accelerator Programming
 
Application Profiling at the HPCAC High Performance Center
Application Profiling at the HPCAC High Performance CenterApplication Profiling at the HPCAC High Performance Center
Application Profiling at the HPCAC High Performance Center
 
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache KafkaBuilding Stream Infrastructure across Multiple Data Centers with Apache Kafka
Building Stream Infrastructure across Multiple Data Centers with Apache Kafka
 
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
Memory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and VirtualizationMemory, Big Data, NoSQL and Virtualization
Memory, Big Data, NoSQL and Virtualization
 
Containers > VMs
Containers > VMsContainers > VMs
Containers > VMs
 
DPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles ShiflettDPDK Summit 2015 - Aspera - Charles Shiflett
DPDK Summit 2015 - Aspera - Charles Shiflett
 

Plus de Roberto Agostino Vitillo (14)

Telemetry Onboarding
Telemetry OnboardingTelemetry Onboarding
Telemetry Onboarding
 
Growing a Data Pipeline for Analytics
Growing a Data Pipeline for AnalyticsGrowing a Data Pipeline for Analytics
Growing a Data Pipeline for Analytics
 
Telemetry Datasets
Telemetry DatasetsTelemetry Datasets
Telemetry Datasets
 
Growing a SQL Query
Growing a SQL QueryGrowing a SQL Query
Growing a SQL Query
 
Telemetry Onboarding
Telemetry OnboardingTelemetry Onboarding
Telemetry Onboarding
 
All you need to know about Statistics
All you need to know about StatisticsAll you need to know about Statistics
All you need to know about Statistics
 
Spark meets Telemetry
Spark meets TelemetrySpark meets Telemetry
Spark meets Telemetry
 
Vectorization on x86: all you need to know
Vectorization on x86: all you need to knowVectorization on x86: all you need to know
Vectorization on x86: all you need to know
 
Sharing C++ objects in Linux
Sharing C++ objects in LinuxSharing C++ objects in Linux
Sharing C++ objects in Linux
 
Performance tools developments
Performance tools developmentsPerformance tools developments
Performance tools developments
 
Exploiting vectorization with ISPC
Exploiting vectorization with ISPCExploiting vectorization with ISPC
Exploiting vectorization with ISPC
 
GOoDA tutorial
GOoDA tutorialGOoDA tutorial
GOoDA tutorial
 
Callgraph analysis
Callgraph analysisCallgraph analysis
Callgraph analysis
 
Vectorization in ATLAS
Vectorization in ATLASVectorization in ATLAS
Vectorization in ATLAS
 

Dernier

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 

Dernier (20)

Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Inter-process communication on steroids

  • 1. INTER-PROCESS COMMUNICATION ON STEROIDS Roberto A.Vitillo (LBNL) ATLAS SOFTWARE & COMPUTING WORKSHOP OCTOBER 2012 1
  • 2. CONTEXT • AthenaMP communications ‣ reader process sends events to workers • Coprocessor communications ‣ Athena[MP] jobs interacting with a GPU server process • Available IPC mechanisms ‣ shared memory with explicit synchronization ‣ message passing with implicit synchronization 2
  • 3. MESSAGE PASSING MODEL • One of the most successful models for providing concurrency ‣ data and synchronization in a single unit • Actor Model ‣ processes have an identity ‣ communicate by sending messages to mailing addresses ‣ Erlang, Scala • Process calculi ‣ processes are anonymous ‣ communicate by sending messages through named channels ‣ Go Programming Language 3
  • 4. PATTERNS • Producer & Consumer ‣ producer pushes messages ‣ consumer pulls messages • Client & Server ‣ client makes a request ‣ server replies to a request 4
  • 5. CHANNELS • Properties of a channels: ‣ name ‣ context (thread, local-process, distributed-process) ‣ asynchronous(k) ‣ topology one-to-one one-to-many many-to-many 5
  • 6. SOCKETS • Each end of a channel is attached to a Socket • Different patterns have different Sockets, ‣ e.g. ProducerSocket, ConsumerSocket • A Socket allows to: ‣ send() buffers of data to its peers (buffer-blocking) ‣ receive() buffers of data from its peers (blocking) client server 6
  • 7. SOCKETS Channel channel("service", ONE_TO_ONE) ISocket *socket = factory->createClientSocket(channel); socket->send("ping", 5); socket->receive(&buffer); Channel channel("service", ONE_TO_ONE); ISocket *socket = factory->createServerSocket(channel); while(true){ socket->receive(&buffer); socket->send("pong"); } client server 7
  • 8. DATATRANSFERTECHNIQUES • Zero-Copy ‣ page table entries are transferred from the source to the destination process ‣ requires the buffers to have the same alignment • Double copy in shared memory ‣ double buffering allows the sender and receiver to transfer data in parallel • Delegate the copy to a NIC ‣ avoids cache pollution 8
  • 9. DATATRANSFERTECHNIQUES • Single Copy with ptrace() ‣ debugging facility, sender processes is stopped ‣ receiver process accesses the sender’s process address space and performs a copy • Single Copy through a Kernel facility ‣ vmsplice (Kernel 2.6.17) ‣ KNEM (Kernel 2.6.15, requires module) ‣ Cross Memory Attach (Kernel 3.2) 9
  • 10. IMPLEMENTATION • The API is currently implemented with ZeroMQ ‣ provides a default fall back implementation ‣ lock-free queues for threads ‣ AF_UNIX sockets for local processes ‣ TCP sockets for distributed processes • The implementation switches according to the channel configuration ‣ many-to-many channel triggers the creation of a broker process that handles all communications ‣ one-to-one, producer-consumer uses a UNIX pipe with vmsplice() 10
  • 11. BENCHMARK: LATENCY Ivy Bridge, ZMQ 2.2, OpenMPI 1.6.2 without KNEM 0 μs 25 μs 50 μs 75 μs 100 μs Latency on SLC6 pipe vmsplice OpenMPI ZMQ • Test: 1 Byte Ping Pong • MPI is using shared memory • double copy • avoids expensive system call which dominates for small messages • The pipe implementations are dominated by the system call overhead 11
  • 12. BENCHMARK: BANDWIDTH 0 GB/s 4 GB/s 8 GB/s 11 GB/s 15 GB/s Bandwidth on SLC 6 pipe vmsplice ZMQ OpenMPI • Benchmark: 1 Megabyte Ping Pong • Pipe performs 2 copies (U-K-U) • Spliced pipe performs a single copy (K-U) • OpenMPI is using shared memory as buffer and performs 2 copies ‣ copies are performed in parallel on both ends ‣ consumes more CPU ‣ pollutes the caches • ZMQ uses AF_UNIX sockets, i.e. two copies are performed (U-K-U) ‣ all sorts of buffers in between ‣ optimized for distributed environments 12
  • 13. BENCHMARK: BANDWIDTH 0 GB/s 4 GB/s 8 GB/s 11 GB/s 15 GB/s Bandwidth on Linux 3.6 pipe vmsplice ZMQ OpenMPI • Benchmark: 1 Megabyte Ping Pong • Pipe performs 2 copies (U-K-U) • Spliced pipe performs a single copy (K-U) • OpenMPI is using shared memory as buffer and performs 2 copies ‣ copies are performed in parallel on both ends ‣ consumes more CPU ‣ pollutes the caches • ZMQ uses AF_UNIX sockets, i.e. two copies are performed (U-K-U) ‣ all sorts of buffers in between ‣ optimized for distributed environments 13
  • 14. while(event){ ... socket->receive(&ready_notification); socket->send(event, event_size); ... } IN ACTION:ATHENAMP reader worker worker while(true){ ... socket->send(ready_notification, size); socket->receive(&event); ... } while(true){ ... socket->send(ready_notification, size); socket->receive(&event); ... } • SeeVakho’s talk • Temporary hybrid approach ‣ metadata in shared memory • Benefits: ‣ load balancing ‣ synchronization 14
  • 15. CONCLUSION • Library provides an uniform message-passing abstraction for inter-process communication • Data and synchronization in a single unit • Communication patterns and topologies allow to ‣ reduce latency ‣ increase bandwidth ‣ express parallelism • More implementations will be considered ‣ shared memory segment for small messages (<10K, low latency) ‣ MPI? Doesn’t behave well with forking processes... 15