OnixS C++ CME MDP Premium Market Data Handler  5.8.3
API Documentation
Hardware timestamps

By default, a feed engine assigns the timestamp to the incoming multicast packet as soon as it is received. The application code can use this timestamp to measure the latency of market data processing by the handler.

The handler also supports timestamps assigned by the network adapter (so-called hardware timestamps). Hardware timestamps allow measuring the time the network packet spent in the kernel/adapter before the Handle received and processed it. Hardware timestamps also allow evaluating the benefits of using kernel-bypass solutions like Solarflare `ef_vi` and OpenOnload ones.

The support of hardware timestamps is limited to Linux only.

Enabling hardware timestamps

Hardware timestamps are enabled by assigning an OnixS::CME::MDH::NicWatch instance.

For example:

SocketFeedEngineSettings settings;
SocketFeedEngine feedEngine(settings);

Enabling hardware timestamps on a network adaptor

The hardware timestamps must also be enabled for the network interface. Otherwise, a feed engine will raise a warning or report an error, depending on the implementation.

Enabling hardware timestamps on a NIC affects all applications and requires additional (root) privileges.

Also, a network adapter may require clock synchronization manipulations before using the hardware timestamping feature.

Benchmarking the handler using a Solarflare network adaptor

The Benchmark Sample from the distribution packet has the --hardwareTimestamps parameter to enable hardware timestamping.

Before running the sample, it's necessary to enable hardware timestamps for a network interface and to synchronise both adapter and system clocks.

The best way to complete both preparation steps is to run the Solarflare PTP daemon. Please follow the Solarflare documentation on configuring and running the daemon.

Once the Solarflare PTP daemon is started, use the Benchmarking sample to measure latency.

The Solarflare PTP daemon requires some time to synchronise an adapter and system clock. Therefore, please, wait until the daemon reports clocks are synced before benchmarking market data processing.

OnixS::CME::MDH::SocketFeedEngine can also be used in combination with the Solarflare OpenOnload tools. The EF_RX_TIMESTAMPING environment variable must be set to 1 before benchmarking under the Solarflare OpenOnload. This environment variable activates hardware timestamping for the Solarflare OpenOnload tools.

The hardware timestamping activation using the ioctl function has no effect when the Solarflare OpenOnload is used.