How can the system be measured precisely?

HOME COMPANY NEWS How can the system be measured precisely?

The competition among high-frequency traders in the system latency has reached the level of less than 10 microseconds, and what is more, the pursuit of time saved by message packets has also reached the nanosecond level. When you wrote/designed the system, you have completed an exciting masterpiece and are ready to show your skills on the battlefield. Have you ever wondered for a while whether the ‘weapons’ you designed can really withstand the hardening of the market? The truth is, most of time, the battlefield would knock you down for the lack of understanding what ‘weapon’ are holding in your hand, and what is it really like. This is not what a trained programmer would like to see at the end.

 

How to make sure that the system you designed is working functionally and efficiently before it’s rolled out to production? How to confirm that the weapon you made is trustworthy. It's not difficult. What you need is a set of accurate test frameworks and test methods.

The problems the HFT firms that commonly meet on latency measure are:

  • The measurement unit is not accurate enough.
  • How to measure without disturbing the resources of the main system?
  • How to choose test tools?

 

To calculate latency by inserting log in the code to record Timestamp is quite usual.

This method is feasible in the initial stage of development and can help developers to evaluate the effectiveness on their code, but however, it is not a good way to achieve accurate measurement because of the accuracy of timestamping in OS is open to question, furthermore, if the timestamping information is inserted into the software program, it is bound to share resources with the software to affect the performance of the main program, such as CPU caches.

 

Timestamping at the OS level is likely to be inaccurate due to various factors, such as system jitter or program bugs or the accuracy of the OS itself. To achieve an accurate and precise measurement, there are several key points that you could follows:

  • Make good use of hardware timestamping, many brand network cards provide this function, such as Solarflare, Exablaze ExaNIC[1].
  • In order not to affect the resources of the main program, an independent host for collecting timestamp packets and calculate the latency from the packets it received.
  • The test behavior, even the length of packets ought to be conform to the production environment as much as possible.

 

How to build an environment for measuring latency?

 

Case1 :Measure the time spent on packet IN/OUT in the host.

 

As shown in Figure 1, the fiber splitter is used to send incoming and outgoing packets to the test subject and the TS analysis host (Timestamp Analyzer). The fiber splitter will not cause delay on its performance, so the packet received by the TS host is nearly same as the testee's IN/OUT packets which TS host could calculate the time difference from the packets it captured.

 

The TS host must be equipped with a network card that provide the function of timestamping. Generally, programmers usually use the program to record Timestamp, this is not recommended here, because it is distorted and the measure unit is not enough. This structure introduced here can exactly avoiding interference to the object under test.

Measure the time spent on packet IN/OUT in the host

Case2 : Measurement of NIC Performance from the same structure.

 

A similar architecture can be derived into the performance test of the network card. The OS under this architecture does almost nothing, at most, it sends the received packets to the destination. The tested network card have to be installed in the tested host.

Measurement of NIC Performance from the same structure

Case3 : What brand equipment do HFT operators generally use?

NIC[2]: Solarflare, Exablaze ExaNIC, Mellanox

Switch: Cisco N3K, ExaLINK Fusion, Arista7130 L1 Switch


[1] [1] Exablaze is now part of Cisco, the produce name are: Nexus X10,Nexus X25, Nexus X40, Nexus X100.

[2] Some HFT firms use FPGA on latency measurement cause FPGA can perform the best precision, however, it is more higher threshold in FPGA design, that’s why we use NIC in our case in this article.

米特有全方位的完整高頻解決方案,我們在全球多個國家提供優質服務,協助您的企業進行系統升級,達到效率升倍的目的,以擁有更好的獲利與競爭表現。

Copyright © 2020 HyperShark Technologies Corp. All Rights Reserved.

網站法律聲明   |  網站隱私權保護政策

HyperShark has a full range of high-frequency solutions. We provide high-quality services in many countries around the world to assist your enterprise in system upgrading. To achieve the purpose of increasing efficiency which provides more profitability and competitive performance..

Copyright © 2020 HyperShark Technologies Corp. All Rights Reserved.

Legal Statement of the Website   |  Website Privacy Policy