Wondering how to configure dds? OpenSplice DDS configuration is easy to do. Configuring DDS allows you to choose the perfect set up for your use case.
How do you configure OpenSplice DDS?
Configuration of OpenSplice DDS is done with an xml file. This file allows you to specify which architectural mode OpenSplice will use. It also allows you to specify which of the OpenSplice DDS services you want to start when OpenSplice starts.
Where is the xml configuration file?
When you install OpenSplice DDS the xml configuration files are in the etc/config directory of the OpenSplice installation. By default OpenSplice will use the ospl.xml file.
OpenSplice uses the OSPL_URI environment variable to find out which xml configuration file is in use. This points to xml file. It uses the URI format which takes the form:
file://host/path
- host is the fully qualified domain name of the system on which the path is accessible
- path is the path to the xml file. The default value is localhost so it is not necessary to set this.
An example of the OSPL_URI environment variable is:
OSPL_URI=file://C:\ZettaScale\OpenSplice\7.0.0\HDE\x86_64.win64\etc\config\ospl.xml
What are the different xml files for?
If you look in the etc/config directory you will find a number of configuration files. These are examples of configuration files showing you how to use different architectural modes and different DDS services.
In OpenSplice DDS 6.8.1 the following files are available:
- ospl.xml – the default configuration file. This uses stand-alone ‘single-process’ deployment and standard DDSI networking.
- ospl-shmem-ddsi.xml – An example of configuration for federated deployment using shared-memory and standard DDSI networking.
- ospl_shmem_ddsi2e.xml – this configuration is for federated deployment using shared-memory and extended DDSI networking.
- ospl_shmem_nativeRT – Federated deployment using shared-memory and RTNetworking.
- ospl_shmem_nativeRT_ddsi_bridge.xml – Federated deployment for extending an RTNetworking-based domain into a DDSI network.
- ospl_shmem_no_network.xml – an example of federated deployment using shared-memory only i.e. without networking.
- ospl_shmem_secure_nativeRT.xml – Federated deployment using shared-memory and secure RTNetworking.
- ospl_sp_ddsi.xml – Stand-alone ‘single-process’ deployment and standard DDSI networking.
- ospl_sp_ddsi_10gbps.xml – Stand-alone ‘single-process’ deployment and standard DDSI networking on 10gbps network. For Linux systems a large-enough (at least 4MB) UDP-receive-buffer size needs to be available, which can be set by setting /proc/sys/net/core/rmem_max to 8MB (8388608).
- ospl_sp_ddsi_1gbps.xml – Stand-alone ‘single-process’ deployment and standard DDSI networking on 1gbps network. For Linux systems a large-enough (at least 4MB) UDP-receive-buffer size needs to be available, which can be set by setting /proc/sys/net/core/rmem_max to 8MB (8388608).
- ospl_sp_ddsi_nativeRT_cohabitation.xml – Stand-alone ‘single-process’ deployment using DDSI and RTNetworking in cohabitation mode.
- ospl_sp_ddsi_statistics – Stand-alone ‘single-process’ deployment with DDSI networking and enabled statistics.
- ospl_sp_nativeRT.xml – Stand-alone ‘single-process’ deployment using RTNetworking.
- ospl_sp_no_network.xml – Stand-alone ‘single-process’ deployment without networking connectivity.
- ospl_winsvc_default.xml – Federated deployment using shared-memory and standard DDSI networking. ReportPlugin writes all OpenSplice system log events to the Windows Application EventLog.
How can I change between configuration files easily?
The OpenSplice launcher makes it really easy to change OpenSplice DDS configuration files. To start the launcher use the command:
ospllauncher
from the command line. On windows you can use the icon in the start menu. The OpenSplice DDS launcher GUI will start.
To change the configuration click on the Configurations button on the left hand side. This shows a list of the different configuration files available. Choose the one you want and then select the tick box on the bottom right to select it.
How do I modify the configuration file?
There may be occasions where you want to modify the default configuration file to tailor the configuration to suit your use case. When modifying your configuration file we advise that you use the OpenSplice DDS configuration tool. This can be started from the command line using the command
osplconf
You can also start it from the launcher by pressing the pencil icon on the bottom right of the configuration window shown above. The OpenSplice configuration tool provides a GUI interface to let you modify the xml file. It also provides checking to ensure that the xml file you save is valid.
There is a video that shows you how to use the OpenSplice configuration editor in depth.
What is the difference between single process and federated mode?
OpenSplice has two different architectural modes for deploying DDS. You can choose to run in single process deployment mode or federated memory mode. Should I use single process or shared memory mode gives more information about choosing the one best mode for your deployment.
Single Process or Stand Alone Deployment Mode
This is the mode that OpenSplice DDS uses by default. Features of this mode are:
- Simplest to run and get started with.
- Each DDS application process contains the entire DDS infrastructure.
- Uses in-process heap memory for the DDS database.
- OpenSplice DDS services run as threads within the application process.
- When there are multiple DDS application processes on a single machine, the communication between them must be done via a networking service. This introduces additional overhead so performance in this scenario is not optimal.
xml configuration for single process mode
To enable single process deployment the configuration xml file must contain a <SingleProcess> “TRUE” attribute. For example:
<Domain>
<SingleProcess>true</SingleProcess>
</Domain>
Example configuration files for single process mode contain sp in their name.
Shared Memory or Federated Memory Mode
Features of this mode are:
- The DDS infrastructure is started once per machine.
- Uses shared memory for the DDS database.
- Each DDS application process interfaces with the shared memory rather than creating the DDS infrastructure itself.
- Allows the data to be physically present only once on any machine.
- Reading and writing directly to locally-mapped memory is far more efficient than having to actually move the data via a networking service, allowing for improved performance and scalability.
- OpenSplice DDS services are able to arbitrate over all of the DDS data on the node. This allows them to make smart decisions with respect to data delivery so that priority QoS values (for example) are respected. This is not possible when there are multiple standalone deployments on a machine.
Using OpenSplice DDS in shared memory mode can provide greater performance, smaller footprint and better scalability when there are multiple DDS applications on a single computing node.
xml configuration for federated memory mode
To enable federated memory mode in the xml file you need to add the <Database> attribute to the xml file. For example:
<Domain>
<Database>
<Size>10485760</Size>
</Database>
</Domain>
Examples of xml files that use federated memory mode have shmem in their name.
What are the different OpenSplice DDS Networking options?
OpenSplice DDS provides a number of different networking options for the delivery of data between nodes. The networking service is transparent to the user. Differences may be seen in the CPU consumption, networking load, and how fast and efficiently the data is delivered between the nodes.
OpenSplice DDS provides three different networking options. These are:
- OpenSplice DDSI – this is the DDS industry standard protocol which provides vendor interoperability.
- OpenSplice DDSI2E – is an enhanced version of the industry standard. DDSI2E offers the benefits of DDSI but also has some performance features.
- OpenSplice RTNetworking is an alternative to the DDSI service. This networking service offers prioritisation of network traffic via channels, portioning of dataflows and compression for low bandwidth environments.
By default OpenSplice uses the DDSI networking service. You may want to read more about what the differences are between the different OpenSplice DDS networking services.
xml configuration for the DDSI service
Examples of xml configuration files using the DDSI service have ddsi in the xml file name. To enable the ddsi service in the xml file you need to add the following:
<DDSI2Service name=”ddsi2″>
<General>
<NetworkInterfaceAddress>AUTO</NetworkInterfaceAddress>
<AllowMulticast>true</AllowMulticast>
<EnableMulticastLoopback>true</EnableMulticastLoopback>
<CoexistWithNativeNetworking>false</CoexistWithNativeNetworking>
</General>
<Compatibility>
<!– see the release notes and/or the OpenSplice configurator on DDSI interoperability –>
<StandardsConformance>lax</StandardsConformance>
<!– the following one is necessary only for TwinOaks CoreDX DDS compatibility –>
<!– <ExplicitlyPublishQosSetToDefault>true</ExplicitlyPublishQosSetToDefault> –>
</Compatibility>
</DDSI2Service>
These are the default values. The Deployment Guide linked here, OpenSplice DDS documentation, provides more information on changing these values.
xml configuration for the DDSI2e service
Examples of xml configuration files using the DDSI2e service have ddsi2e in the xml file name. To enable the ddsi2e service in the xml file you need to add the following:
<DDSI2EService name=”ddsi2e”>
<General>
<NetworkInterfaceAddress>AUTO</NetworkInterfaceAddress>
<AllowMulticast>true</AllowMulticast>
<EnableMulticastLoopback>true</EnableMulticastLoopback>
<CoexistWithNativeNetworking>false</CoexistWithNativeNetworking>
</General>
<Compatibility>
<!– see the release notes and/or the OpenSplice configurator on DDSI interoperability –>
<StandardsConformance>lax</StandardsConformance>
<!– the following one is necessary only for TwinOaks CoreDX DDS compatibility –>
<!– <ExplicitlyPublishQosSetToDefault>true</ExplicitlyPublishQosSetToDefault> –>
</Compatibility>
</DDSI2EService>
These are the default values. The Deployment Guide linked here, OpenSplice DDS documentation, provides more information on changing these values.
xml configuration for the OpenSplice RT Networking
Examples of xml configuration files using the RT Networking service have nativeRT in the xml file name. To enable the native RTnetworking service in the xml file you need to add the following:
<NetworkService name=”networking”>
<Partitioning>
<GlobalPartition Address=”broadcast”/>
</Partitioning>
<Channels>
<Channel default=”true” enabled=”true” name=”BestEffort” reliable=”false”>
<PortNr>54400</PortNr>
</Channel>
<Channel enabled=”true” name=”Reliable” reliable=”true”>
<PortNr>54410</PortNr>
</Channel>
</Channels>
<Discovery enabled=”true”>
<PortNr>54420</PortNr>
</Discovery>
</NetworkService>
These are the default values. The Deployment Guide linked here, OpenSplice DDS documentation, provides more information on changing these values.