SlideShare a Scribd company logo
1 of 24
Download to read offline
Senior Software Developer
martijn.reicher@zettascale.tech
Martijn Reicher, PhD
Shared Memory
Local Data Transfers Without Copying!
Quick Recap
DDS concepts
• Shared Dataspace
• Data-centric
• Publish-Subscribe model
• Only receive data of interest
• Dynamic discovery
• No input from user necessary
Why use Shared Memory?
Normal Data Flow
• Data is Copied at (fat arrow):
• Modification
• Handing over to DDS
• Serialization
• Write to Network
• Read from Network (times number of instances)
• Deserialization
• Access
• Assign a pool of memory "shared" by instances of CycloneDDS
• Have writers "take" a block of memory from the pool
• Notify readers of written blocks
• Readers present data to user
• User signals when block is no longer in use
• Block is returned to the pool
System Level
Shared memory Flow
• Data is copied at (fat arrow):
• Modification
• Serialization (dependent on data
model)
• Deserialization (dependent on data
model)
• Access
• Skip network stack
• No copying into/out of buffers from network
• Lower latency
• If samples in same layout & no indirections:
• No serialization necessary
• Negligible overhead from multiple readers
Performance gains
When should we use Shared Memory?
Indicators for SHM Exchange
• Large Volumes of Intra-Node Data Traffic:
• Frequency (samples/sec)
• Size (bytes/sample)
• Number of Readers
• Low History depth:
• Required size of memory pool scales with history
• Simple Data Structures:
• No indirections (sequences/strings/etc.):
• No serialization necessary
• Same data layout (no mixing of programming languages)
Typical Use cases
• LIDAR pointclouds / Hi-res Camera Images
• 10MB, 30 times per second
• Usually unachievable using naïve copy implementations
• Dynamic scalable pipeline architecture
• Samples being passed through different types of analyses
• No copying, so no scaling with data throughput/number of steps
• Analysis is done only once and distributed without copying
• Dynamic addition of producers/consumers
• Different security levels for processes
How to use Shared Memory
Software
• Install iceoryx (https://github.com/eclipse-iceoryx/iceoryx)
• iceoryx is a sister project of CycloneDDS and the current Shared Memory
service for CycloneDDS
• Add to Path
• Install CycloneDDS (https://github.com/eclipse-cyclonedds/cyclonedds)
• Compile with shared memory support: -DENABLE_SHM=On
• Add to Path
• Compile Program
• Start iceoryx service iox-roudi
Configuring CycloneDDS
• CycloneDDS configuration files:
• Set config Domain(id) >
SharedMemory > Enable to true
• Optionally set LogLevel to the
desired level for shared memory
• Environment variable:
CYCLONEDDS_URI
<CycloneDDS>
<Domain id="any">
<SharedMemory>
<Enable>true</Enable>
<LogLevel>info</LogLevel>
</SharedMemory>
</Domain>
</CycloneDDS>
Configuring iceoryx
• iceoryx configuration files:
• Determine memory pool layout
• Size of mempool segments:
• 64 bytes larger than maximum
sample size
• Number depends on use case
• iox-roudi –c config_file.toml
[general]
version = 1
[[segment]]
[[segment.mempool]]
size = 1048640
count = 500
Data Model
• You can optimize your Data Model for Shared Memory Exchange
• Shared Memory Exchange works best when there are no indirections
• Indirections cause CycloneDDS to serialize the data
• Indirections are:
• Strings, Sequences: replace with fixed size arrays of chars
• Other Containers: Optionals, Externals: Do not use
• Only final types
Loan mechanism
• Using Loaned Samples increases performance:
• Loaned samples are pre-assigned by the reader/writer handling the
samples
• Removes a copy step in transferring data
• Writers: request a loan: dds_loan_sample
• Sample is returned on call to dds_write
• Implementation in progress for Readers
Limitations
• Inter-node communication
• Adding non-local nodes removes many performance gains
• Simple data structures
• Cannot use indirections for best performance
• Memory pool
• History is limited by memory available
• Reliance on iceoryx
• Unavailable on certain OSes
Typical Performance Gains 1w1r
Real Life Demo
Demo setup
• Throughput vs ShmThroughput examples
• 1MB samples
• Compare performance
• iceoryx introspection client
• Explore what's happening
Demonstration
Questions?
Patience, persistence and perspiration
make an unbeatable combination for
success.
Thank
You

More Related Content

Similar to Cyclone DDS Unleashed: Reasons for Choosing Cyclone DDS Shared Memory

Data Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCData Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCAbhijit Kumar
 
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...raghdooosh
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresmkorremans
 
Applications of Distributed Systems
Applications of Distributed SystemsApplications of Distributed Systems
Applications of Distributed Systemssandra sukarieh
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inRahulBhole12
 
Introduction to Data Storage and Cloud Computing
Introduction to Data Storage and Cloud ComputingIntroduction to Data Storage and Cloud Computing
Introduction to Data Storage and Cloud ComputingRutuja751147
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in CloudHoward Marks
 
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...Sri Ambati
 
ME_Snowflake_Introduction_for new students.pptx
ME_Snowflake_Introduction_for new students.pptxME_Snowflake_Introduction_for new students.pptx
ME_Snowflake_Introduction_for new students.pptxSamuel168738
 
Building a Turbo-fast Data Warehousing Platform with Databricks
Building a Turbo-fast Data Warehousing Platform with DatabricksBuilding a Turbo-fast Data Warehousing Platform with Databricks
Building a Turbo-fast Data Warehousing Platform with DatabricksDatabricks
 
Cloud and Windows Azure
Cloud and Windows AzureCloud and Windows Azure
Cloud and Windows AzureRadu Vunvulea
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?Nathan Van Gheem
 
Azure IaaS Tanıtım - Kısa Anlatım
Azure IaaS Tanıtım - Kısa Anlatım Azure IaaS Tanıtım - Kısa Anlatım
Azure IaaS Tanıtım - Kısa Anlatım Mustafa
 
Scaling Your Database In The Cloud
Scaling Your Database In The CloudScaling Your Database In The Cloud
Scaling Your Database In The CloudCory Isaacson
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storageZhou Weitao
 
Supporting architecture office 365 on windows azure
Supporting architecture office 365 on windows azure  Supporting architecture office 365 on windows azure
Supporting architecture office 365 on windows azure Jethro Seghers
 

Similar to Cyclone DDS Unleashed: Reasons for Choosing Cyclone DDS Shared Memory (20)

Data Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDCData Stream Processing for Beginners with Kafka and CDC
Data Stream Processing for Beginners with Kafka and CDC
 
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
Big Data Storage Concepts from the "Big Data concepts Technology and Architec...
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-features
 
Applications of Distributed Systems
Applications of Distributed SystemsApplications of Distributed Systems
Applications of Distributed Systems
 
Cloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation inCloud computing UNIT 2.1 presentation in
Cloud computing UNIT 2.1 presentation in
 
Introduction to Data Storage and Cloud Computing
Introduction to Data Storage and Cloud ComputingIntroduction to Data Storage and Cloud Computing
Introduction to Data Storage and Cloud Computing
 
Cloud slide
Cloud slideCloud slide
Cloud slide
 
Managing storage on Prem and in Cloud
Managing storage on Prem and in CloudManaging storage on Prem and in Cloud
Managing storage on Prem and in Cloud
 
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...
Nanda Vijaydev, BlueData - Deploying H2O in Large Scale Distributed Environme...
 
ME_Snowflake_Introduction_for new students.pptx
ME_Snowflake_Introduction_for new students.pptxME_Snowflake_Introduction_for new students.pptx
ME_Snowflake_Introduction_for new students.pptx
 
Building a Turbo-fast Data Warehousing Platform with Databricks
Building a Turbo-fast Data Warehousing Platform with DatabricksBuilding a Turbo-fast Data Warehousing Platform with Databricks
Building a Turbo-fast Data Warehousing Platform with Databricks
 
Cloud and Windows Azure
Cloud and Windows AzureCloud and Windows Azure
Cloud and Windows Azure
 
cloudcomputing.pptx
cloudcomputing.pptxcloudcomputing.pptx
cloudcomputing.pptx
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
Security for devs
Security for devsSecurity for devs
Security for devs
 
Azure IaaS Tanıtım - Kısa Anlatım
Azure IaaS Tanıtım - Kısa Anlatım Azure IaaS Tanıtım - Kısa Anlatım
Azure IaaS Tanıtım - Kısa Anlatım
 
Scaling Your Database In The Cloud
Scaling Your Database In The CloudScaling Your Database In The Cloud
Scaling Your Database In The Cloud
 
Introduction of mesos persistent storage
Introduction of mesos persistent storageIntroduction of mesos persistent storage
Introduction of mesos persistent storage
 
A to z for sql azure databases
A to z for sql azure databasesA to z for sql azure databases
A to z for sql azure databases
 
Supporting architecture office 365 on windows azure
Supporting architecture office 365 on windows azure  Supporting architecture office 365 on windows azure
Supporting architecture office 365 on windows azure
 

More from ZettaScaleTechnology

Cyclone DDS Unleashed: ROS & Cyclone DDS.pdf
Cyclone DDS Unleashed: ROS & Cyclone DDS.pdfCyclone DDS Unleashed: ROS & Cyclone DDS.pdf
Cyclone DDS Unleashed: ROS & Cyclone DDS.pdfZettaScaleTechnology
 
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large Systems
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large SystemsCyclone DDS Unleashed: Scalability in DDS and Dealing with Large Systems
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large SystemsZettaScaleTechnology
 
Cyclone DDS Unleashed: The Origins
Cyclone DDS Unleashed: The OriginsCyclone DDS Unleashed: The Origins
Cyclone DDS Unleashed: The OriginsZettaScaleTechnology
 
"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-FlowZettaScaleTechnology
 
"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks
"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks
"Taming the Dragon": Zenoh on Microcontrollers and Low Power NetworksZettaScaleTechnology
 
"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh
"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh
"Taming the Dragon": ROS2 Robot-to-Anything with ZenohZettaScaleTechnology
 
"Taming the Dragon": Get Started with Zenoh
"Taming the Dragon": Get Started with Zenoh"Taming the Dragon": Get Started with Zenoh
"Taming the Dragon": Get Started with ZenohZettaScaleTechnology
 
"Taming the Dragon": Zenoh's Genesis
"Taming the Dragon": Zenoh's Genesis "Taming the Dragon": Zenoh's Genesis
"Taming the Dragon": Zenoh's Genesis ZettaScaleTechnology
 

More from ZettaScaleTechnology (8)

Cyclone DDS Unleashed: ROS & Cyclone DDS.pdf
Cyclone DDS Unleashed: ROS & Cyclone DDS.pdfCyclone DDS Unleashed: ROS & Cyclone DDS.pdf
Cyclone DDS Unleashed: ROS & Cyclone DDS.pdf
 
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large Systems
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large SystemsCyclone DDS Unleashed: Scalability in DDS and Dealing with Large Systems
Cyclone DDS Unleashed: Scalability in DDS and Dealing with Large Systems
 
Cyclone DDS Unleashed: The Origins
Cyclone DDS Unleashed: The OriginsCyclone DDS Unleashed: The Origins
Cyclone DDS Unleashed: The Origins
 
"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow"Taming the Dragon": Data Flow Programming with Zenoh-Flow
"Taming the Dragon": Data Flow Programming with Zenoh-Flow
 
"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks
"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks
"Taming the Dragon": Zenoh on Microcontrollers and Low Power Networks
 
"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh
"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh
"Taming the Dragon": ROS2 Robot-to-Anything with Zenoh
 
"Taming the Dragon": Get Started with Zenoh
"Taming the Dragon": Get Started with Zenoh"Taming the Dragon": Get Started with Zenoh
"Taming the Dragon": Get Started with Zenoh
 
"Taming the Dragon": Zenoh's Genesis
"Taming the Dragon": Zenoh's Genesis "Taming the Dragon": Zenoh's Genesis
"Taming the Dragon": Zenoh's Genesis
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Cyclone DDS Unleashed: Reasons for Choosing Cyclone DDS Shared Memory

  • 1. Senior Software Developer martijn.reicher@zettascale.tech Martijn Reicher, PhD Shared Memory Local Data Transfers Without Copying!
  • 3. DDS concepts • Shared Dataspace • Data-centric • Publish-Subscribe model • Only receive data of interest • Dynamic discovery • No input from user necessary
  • 4. Why use Shared Memory?
  • 5. Normal Data Flow • Data is Copied at (fat arrow): • Modification • Handing over to DDS • Serialization • Write to Network • Read from Network (times number of instances) • Deserialization • Access
  • 6. • Assign a pool of memory "shared" by instances of CycloneDDS • Have writers "take" a block of memory from the pool • Notify readers of written blocks • Readers present data to user • User signals when block is no longer in use • Block is returned to the pool System Level
  • 7. Shared memory Flow • Data is copied at (fat arrow): • Modification • Serialization (dependent on data model) • Deserialization (dependent on data model) • Access
  • 8. • Skip network stack • No copying into/out of buffers from network • Lower latency • If samples in same layout & no indirections: • No serialization necessary • Negligible overhead from multiple readers Performance gains
  • 9. When should we use Shared Memory?
  • 10. Indicators for SHM Exchange • Large Volumes of Intra-Node Data Traffic: • Frequency (samples/sec) • Size (bytes/sample) • Number of Readers • Low History depth: • Required size of memory pool scales with history • Simple Data Structures: • No indirections (sequences/strings/etc.): • No serialization necessary • Same data layout (no mixing of programming languages)
  • 11. Typical Use cases • LIDAR pointclouds / Hi-res Camera Images • 10MB, 30 times per second • Usually unachievable using naïve copy implementations • Dynamic scalable pipeline architecture • Samples being passed through different types of analyses • No copying, so no scaling with data throughput/number of steps • Analysis is done only once and distributed without copying • Dynamic addition of producers/consumers • Different security levels for processes
  • 12. How to use Shared Memory
  • 13. Software • Install iceoryx (https://github.com/eclipse-iceoryx/iceoryx) • iceoryx is a sister project of CycloneDDS and the current Shared Memory service for CycloneDDS • Add to Path • Install CycloneDDS (https://github.com/eclipse-cyclonedds/cyclonedds) • Compile with shared memory support: -DENABLE_SHM=On • Add to Path • Compile Program • Start iceoryx service iox-roudi
  • 14. Configuring CycloneDDS • CycloneDDS configuration files: • Set config Domain(id) > SharedMemory > Enable to true • Optionally set LogLevel to the desired level for shared memory • Environment variable: CYCLONEDDS_URI <CycloneDDS> <Domain id="any"> <SharedMemory> <Enable>true</Enable> <LogLevel>info</LogLevel> </SharedMemory> </Domain> </CycloneDDS>
  • 15. Configuring iceoryx • iceoryx configuration files: • Determine memory pool layout • Size of mempool segments: • 64 bytes larger than maximum sample size • Number depends on use case • iox-roudi –c config_file.toml [general] version = 1 [[segment]] [[segment.mempool]] size = 1048640 count = 500
  • 16. Data Model • You can optimize your Data Model for Shared Memory Exchange • Shared Memory Exchange works best when there are no indirections • Indirections cause CycloneDDS to serialize the data • Indirections are: • Strings, Sequences: replace with fixed size arrays of chars • Other Containers: Optionals, Externals: Do not use • Only final types
  • 17. Loan mechanism • Using Loaned Samples increases performance: • Loaned samples are pre-assigned by the reader/writer handling the samples • Removes a copy step in transferring data • Writers: request a loan: dds_loan_sample • Sample is returned on call to dds_write • Implementation in progress for Readers
  • 18. Limitations • Inter-node communication • Adding non-local nodes removes many performance gains • Simple data structures • Cannot use indirections for best performance • Memory pool • History is limited by memory available • Reliance on iceoryx • Unavailable on certain OSes
  • 21. Demo setup • Throughput vs ShmThroughput examples • 1MB samples • Compare performance • iceoryx introspection client • Explore what's happening
  • 24. Patience, persistence and perspiration make an unbeatable combination for success. Thank You