Article

Benchmarking Throughput and Latency Using EMA C++ Non-Interactive Provider and Consumer Performance Tools

Author

    Jirapongse Phuriphanvichai
    Developer Advocate

The EMA C++ Performance Tools provide a comprehensive framework for benchmarking real-time data systems by measuring throughput, latency, and system resource usage. These tools simulate realistic workloads and embed timestamps into messages to evaluate performance under different conditions. These are the same tools the product team uses to produce the Performance Report, with a summary provided in the Real-Time SDKs Performance Test Summary article. 

This document describes how to use the following tools together:

  • EMACppNIProvPerf (Non Interactive Provider)
  • EMACppConsPerf (Consumer)

In this setup, the non-interactive provider publishes data into the LSEG Real-Time Distribution System (RTDS), and the consumer retrieves data through RTDS components.

Note: For the EMA C++ Interactive Provider and Consumer performance tools, please refer to this Benchmarking Throughput and Latency Using EMA C++ Interactive Provider and Consumer Performance Tools article. 

EMA Performance Tools

The Real-time C/C++ SDK contains the following three EMA performance tools, EMACppIProvPerf, EMACppNIProvPerf, and EMACppConsPerf.

1.     EMACppIProvPerf (Interactive Provider Performance Tool)

It is an interactive provider that accepts consumer connections—either directly or through the LSEG Real‑Time Distribution System—and supplies refresh, update, and optional generic messages. It simulates high‑volume publishing by generating data internally, handling login and directory requests, and sending configurable bursts of updates. The tool embeds timestamps in outgoing messages for latency measurement and supports multi‑threading to distribute consumer connections evenly across processing threads.

To run EmaCppIProvPerf, the user needs to provide the EMA configuration file (EmaConfig.xml), the message template file (MsgData.xml), and the data dictionary files (RDMFieldDictionary and enumtype.def). During execution, the tool produces a summary output (ProvSummary.out), a statistics file (ProvStats), and, if latency options are configured, an optional latency output file.

EMACppIProvPerf

2.     EMACppNIProvPerf (Non‑Interactive Provider Performance Tool)

It is a non‑interactive provider that publishes real‑time content directly into an LSEG Real‑Time Advanced Distribution Hub without requiring consumer requests. After logging in and publishing its service directory, it continually sends images and high‑rate updates for configured items, using timestamps to support latency measurement. The tool supports multi‑threaded publishing—where each thread opens its own ADH connection—and erecords statistics such as updates sent, CPU usage, and memory consumption to help assess system performance under sustained publishing loads.

To run EmaCppNIProvPerf, the user needs to provide the EMA configuration file (EmaConfig.xml), the message template file (MsgData.xml), the item list file (350k.xml) and the data dictionary files (RDMFieldDictionary and enumtype.def). During execution, the tool produces a summary output (NIProvSummary.out), and a statistics file (NIProvStats). EMACppNIProvPerf does not generate a latency file.

EMACppNIProvPerf

3.     EMACppConsPerf (Consumer Performance Tool)

It is a high‑performance Open Message Model (OMM) consumer that measures how efficiently a system can request, receive, and process real‑time market data. It issues large, configurable sets of item requests, processes refresh and update messages, and gathers detailed statistics such as update rates, image retrieval time, and latency. The tool embeds and detects timestamps to calculate both update and posting latency and supports multi‑threaded scaling, allowing multiple consumer connections for realistic workload simulation.

To run EmaCppConsPerf, the user needs to provide the EMA configuration file (EmaConfig.xml), the message template file (MsgData.xml) ), the item list file (350k.xml), and the data dictionary files (RDMFieldDictionary and enumtype.def). During execution, the tool produces a summary output (ConsSummary.out), a statistics file (ConsStats), and, if latency options are configured, an optional latency output file.

EMACppConsPerf

Note: The EMA configuration file (EmaConfig.xml), the message template file (MsgData.xml), the item list file (350k.xml), and the data dictionary files (RDMFieldDictionary and enumtype.def) are available in the Real-Time SDK C/C++ package.

This article will focus on the EMACppNIProvPerf and EMACppConsPerf tools. 

Architecture Overview

Unlike the interactive provider model, the non interactive provider does not accept item requests. Instead, it continuously publishes data to the Advanced Distribution Hub (ADH), which distributes the data through RTDS.

Non-Interactive Provide connects to RTDS
  • NI Provider: Publishes data directly to ADH
  • Real-Time Distribution System (RTDS): Acts as data cache and serves data to consumers
  • Consumer: Requests and processes data

The non‑interactive provider publishes content without requiring consumer requests, making RTDS a mandatory component in this setup.

API Throughput

API throughput measures how many messages a system can process per second under load. It is typically evaluated using EMA performance tools, which simulate realistic traffic by sending update, and request messages at controlled rates governed by a configurable tick rate. The tools collect metrics such as message rates, image retrieval time, and per-thread processing statistics, storing results in summary and statistics files. Throughput depends on factors including CPU and thread configuration, buffering behavior, message packing, and network tuning (such as disabling Nagle’s algorithm). Tests may be conducted on a single machine to isolate API performance or across multiple machines to include network effects.

API Latency

API latency is the time a message takes to travel from sender to receiver.  It is measured by embedding high-resolution timestamps in specific fields—TIM_TRK_1 when update messages are encoded by the non-interactive provider. Upon receipt, the application extracts the timestamp and compares it with the current time to calculate end-to-end latency. Messages are sent in bursts based on a configured tick rate, with one message per burst randomly selected for latency tracking to ensure representative sampling. Accurate one-way latency measurement requires both applications to run on the same host due to clock synchronization constraints.

Latency results typically include average, minimum, maximum, and standard deviation values, with optional logging of individual measurements for deeper analysis. Together, throughput and latency measurements provide a comprehensive view of system performance, enabling developers to identify bottlenecks and optimize real-time data delivery.

The followings are steps to run EMACppNIProvPerf and EMACppConsPerf tools. 

Run EMACppNIProvPerf Tool

The Real-Time Distribution System (RTDS) environment must be properly configured to support non‑interactive providers and the services they publish. Follow the steps below to run the EMACppNIProvPerf tool and establish a connection to RTDS.

1. Copy EmaConfig.xml, MsgData.xml, 350k.xml, RDMFieldDictionary, and enumtype.def files from the RTSDK package into the current EMACppNIProvPerf tool directory.

2. Configure the EMA configurations. The EmaConfig.xml file contains the Perf_NIProvider_1 configuration for the non-interactive provider performance tool. 

This non-interactive provider configuration uses the Perf_NIP_Channel_1 channel configuration to establish a connection to RTDS and uses the Perf_Directory_1 directory configurations that publish the NI_PUB service which in turn uses the Dictionary_3 configuration to load dictionaries from local files in the current directory.

Note: Change the value of the Host configuration in the Perf_NIP_Channel_1 channel to the hostname or IP address of RTDS and configure RTDS to support the NI_PUB service.

3. Run the EMACPPNIProvPerf by specifying the Perf_NIProvider_1 to the providerName parameter and the NI_PUB to the serviceName parameter.

The application will run using the Perf_NIProvider_1 non-provider’s configuration, with all other settings remaining at their defaults.

The default settings can be changed via the corresponding application’s parameters. For more information regarding these parameters, please refer to the EMA C++ OPEN SOURCE PERFORMANCE TOOLS GUIDE in the Real-Time SDK C/C++ package. 

With these parameters and configurations, the EMACppNIProvPerf tool will connect to RTDS and publish 100,000 items to the NI_PUB service at a rate of 100,000 updates per second, with the timestamps embedded in the TIM_TRK_1 (3902) field. The tool also generates a summary file (NIProvSummary.out) and a statistics file (NIProvstats.csv).

You can check from the RTDS monitor tool that the NI_PUB service is up with the 100,000 items in its cache. 

Run EMACppConsPerf Tool

After the NI_PUB service in RTDS is up, you can configure and run the EMACppConsPerf to connect to RTDS and consume data from the NI_PUB service. 

Follow these steps to run the EMACppConsPerf tool. 

1. Copy EmaConfig.xml, MsgData.xml, 350k.xml, RDMFieldDictionary, and enumtype.def files from the RTSDK package into the current EMACppConsPerf tool directory.

2. Configure the EMA configurations. The EmaConfig.xml file contains the Perf_Consumer_2 configuration for the consumer performance tool.

This consumer configuration uses the Perf_Channel_1 channel, which connects to RTDS on TCP port 14002. It also uses Dictionary_2, which loads dictionary files from the current directory. If required, you can modify the Host setting in the Perf_Channel_1 channel to specify the IP address or hostname of the RTDS.

3. Run the EMACPPConsPerf by specifying the Perf_Consumer_2 to the consumerName parameter and the NI_PUB to the serviceName parameter

The application will run using the Perf_Consumer_2 consumer’s configuration, with all other settings remaining at their defaults.

With these parameters and configurations, the application will connect to RTDS, subscribe to 100,000 items from the NI_PIB service, compute statistical data, and write the results to a statistics file (ConsStats.csv).

The default settings can be changed via the corresponding application’s parameters. For more information regarding these parameters, please refer to the EMA C++ OPEN SOURCE PERFORMANCE TOOLS GUIDE in the Real-Time SDK C/C++ package. 

API Performance Benchmark

The performance results can be determined from the statistic files.

Throughput

The thoughput can be determined from the messages sent and received per interval (-writeStatsInterval).

For the EMACppNIProvPerf tool, the following fields can be used to determine the API throughput.

Field Name

Description

Requests received

The number of item request messages received per interval

Images sent

The number of item refresh messages sent per interval

Updates sent

The number of item update messages sent per interval

 

For the EMACppConsPerf tool, the following fields can be used to determine the API throughput.

Field Name

Description

Images

The number of item refresh messages received per interval

Update rate (msg/sec)

The number of item update messages received per second

 

Latency

Latency values are derived from the timestamps embedded in the retrieved messages.

The EMACppNIProvPerf tool only publishes item refresh and update messages to the Real-Time Distribution System and does not receive any messages from other components. Therefore, it does not generate latency statistics data.

For the EMACppConsPerf tool, the following fields can be used to determine the API latency.

Field Name

Description

Latency updates

The number of update messages containing timestamps received per interval.

Latency avg (usec)

The average latency, in microseconds, calculated from update messages containing timestamps received during each interval.

Latency std dev (usec)

The standard deviation of latency, in microseconds, calculated from update messages containing timestamps received during each interval.

Latency max (usec)

The maximum latency, in microseconds, observed from update messages containing timestamps during each interval.

Latency min (usec)

The minimum latency, in microseconds, observed from update messages containing timestamps during each interval.

 

Latency File

The latency file is an output file generated by the EMACppConsPerf tool that record individual latency measurements for messages processed during a performance test. It stores per-message latency values rather than aggregated statistics. It is primarily used for detailed analysis, troubleshooting, and visualization.

To create this latency file, the -latencyFile parameter must be specified with a latency file name.

Note: The EMACppNIProvPerf tool does not produce a latency file.

Sample Output

EMACppNIProvPerf Statistics File

EMACppConsPerf Statistic File

EMACppConsPerf Latency File

Summary

The EMA C++ Performance Tools provide a comprehensive framework for benchmarking real-time data systems by measuring key metrics such as throughput, latency, and resource utilization. By simulating realistic workloads and embedding timestamps into messages, the tools enable accurate evaluation of system performance and help identify bottlenecks under various operating conditions.

This document focuses specifically on the EMACppNIProvPerf (Non-Interactive Provider) and EMACppConsPerf (Consumer) tools, which are commonly used together to measure end-to-end performance. These tools support configurable message rates, burst-based processing via tick rates, and multi-threaded scaling.

Through detailed outputs such as summary, statistics, and optional latency files, developers can analyze both aggregated metrics and individual message timings. This enables informed optimization of applications to achieve low latency, high throughput, and efficient resource usage in real-time data delivery systems.

Request Free Trial

Help & Support

Already a customer?

Office locations

Contact LSEG near you