LAONURI BLOG

라온우리 블로그


The Onilne Disrtibutor of Electronic Component

Peer-to-Peer Streaming

Learn how peer-to-peer (P2P) streaming helps significantly improve digitizer system's performance. P2P streaming side-tracks the host PC by enabling direct data transfers between the digitizer and graphics processing units (GPUs) or to storage. This is a huge advantage compared to conventional solutions which require data to be copied via the RAM of the host PC. With peer-to-peer, both the CPU and RAM can instead be used for other tasks. Watch the videos and above and read more below.

P2P 스트리밍이 디지타이저 시스템의 성능을 크게 향상시키는 방법을 알아보세요. P2P 스트리밍은 디지타이저와 그래픽 처리 장치(GPU) 간 또는 스토리지 간의 직접 데이터 전송을 가능하게 하여 호스트 PC를 측면 추적합니다. 이는 호스트 PC의 RAM을 통해 데이터를 복사해야 하는 기존 솔루션에 비해 큰 장점입니다. peer-to-peer를 사용하면 CPU와 RAM을 모두 다른 작업에 사용할 수 있습니다. 아래에 자세한 내용과 동영상이 있습니다.


Pre-processing using field-programmable gate array (FPGA)



High-performance digitizers with combined high resolution and sampling rate produce massive amounts of data. For example, the ADQ7 combines 14 bits resolution with a 10 GSPS sampling rate resulting in 20 Gbyte of data per second! This exceeds the capacity of the data link (interface) to the host PC, and data reduction is therefore crucial (fig. 1). Onboard field-programmable gate arrays (FPGAs) help address this problem. These powerful computational resources enable real-time signal processing to reduce the data rate so that it matches the link capacity.


고해상도와 샘플링 속도가 결합된 고성능 디지타이저는 엄청난 양의 데이터를 생성합니다. 예를 들어, ADQ7은 14비트 해상도와 10 GSPS 샘플링 속도를 결합하여 초당 20Gby의 데이터를 생성합니다! 이는 호스트 PC에 대한 데이터 링크(인터페이스)의 용량을 초과하므로 데이터 감소가 매우 중요합니다(그림 1). 온보드 필드 프로그래머블 게이트 어레이(FPGA)는 이 문제를 해결하는 데 도움이 됩니다. 이러한 강력한 컴퓨팅 리소스는 실시간 신호 처리를 통해 링크 용량과 일치하도록 데이터 속도를 줄일 수 있습니다.

Figure 1. The onboard FPGA helps reduce the data rate so that it matches the link capacity without loss of signal information.

 그림 1. 온보드 FPGA는 신호 정보 손실 없이 링크 용량과 일치하도록 데이터 전송 속도를 줄이는 데 도움이 됩니다.


The data reduction can be achieved in many ways, for example:

  1. Triggered acquisition of a user-defined number of consecutive samples (so-called records). Data reduction is achieved by only transferring the records while the rest of the data is discarded. This functionality is supported by our firmware options FWDAQ, FWPD, FW2DDC and FWSDR.
  2. In frequency-domain applications, it is common with digital down conversion that combines filtering and decimation to achieve data reduction. This is supported by FWSDR (for ADQ14) and FW2DDC (for ADQ7).
  3. Application-specific data reduction based on known information about the acquired signal. For example real-time averaging of known repetitive signals, or extracting signal characteristics from time-domain pulses. This is supported by the firmware options above as well as FWATD.
  4. Custom data reduction can be implemented using the firmware development kit. This offers full flexibility and can either be implemented by the customer or by utilizing design services offered to OEM customers.

Massive data reduction can be achieved via the FPGA pre-processing. One such example is the use of real-time waveform averaging on ADQ7 using FWATD. This combination has been used by for example mass spectrometry customers to reduce the output rate from 20 Gbyte/s to 40 Mbyte/s - a reduction of 500 times without loss of signal properties/characteristics!

FPGA pre-processing, therefore, allows for maximum flexibility in the mechanical design. Form factors such as USB 3.0 with seemingly limiting data transfer rates of a few hundred Mbyte/s can still be fully utilized due to the data reduction. This in turn offers additional benefits such as locating the digitizer close to the detector in order to minimize reflections.


데이터 감소는 예를 들어 여러 가지 방법으로 달성할 수 있습니다:


  1. 사용자가 정의한 연속 샘플 수(소위 레코드)를 트리거로 수집합니다. 데이터 감소는 레코드만 전송하고 나머지 데이터는 폐기함으로써 이루어집니다. 이 기능은 펌웨어 옵션인 FWDAQ, FWPD, FW2DDC 및 FWSDR에 의해 지원됩니다.
  2. 주파수 도메인 애플리케이션에서는 필터링과 데시메이션을 결합하여 데이터 감소를 달성하는 디지털 다운 변환이 일반적입니다. 이는 FWSDR(ADQ14의 경우)과 FW2DDC(ADQ7의 경우)에서 지원됩니다.
  3. 획득한 신호에 대한 알려진 정보를 기반으로 한 애플리케이션별 데이터 축소. 예를 들어, 알려진 반복 신호의 실시간 평균화 또는 시간 도메인 펄스에서 신호 특성을 추출하는 것입니다. 이는 위의 펌웨어 옵션과 FWATD에 의해 지원됩니다.
  4. 펌웨어 개발 키트를 사용하여 맞춤형 데이터 축소를 구현할 수 있습니다. 이는 완전한 유연성을 제공하며 고객이 구현하거나 OEM 고객에게 제공하는 디자인 서비스를 활용하여 구현할 수 있습니다.


FPGA 전처리를 통해 대규모 데이터 감소를 달성할 수 있습니다. 이러한 예 중 하나는 FWATD를 사용하여 ADQ7에서 실시간 파형 평균화를 사용하는 것입니다. 이 조합은 예를 들어 질량 분석 고객들이 출력 속도를 20 Gbyte/s에서 40 Mbyte/s로 줄이는 데 사용되었습니다. 이는 신호 특성/특성 손실 없이 500배의 감소입니다.


따라서 FPGA 전처리는 기계 설계에서 최대한의 유연성을 제공합니다. 데이터 전송 속도가 수백 Mbyte/s로 제한되는 것처럼 보이는 USB 3.0과 같은 폼 팩터는 데이터 감소로 인해 여전히 충분히 활용될 수 있습니다. 이는 반사를 최소화하기 위해 디지타이저를 검출기 근처에 위치시키는 등의 추가적인 이점을 제공합니다.



Peer-to-peer streaming



Peer-to-peer streaming means that the data is sent to a computational node (for example graphics processing unit (GPU) or disk storage) with little or no involvement of the central processing unit (CPU) or dynamic random-access memory (DRAM) on the host PC. There are three types/levels of data transfer:

peer-to-peer 스트리밍은 데이터가 호스트 PC의 중앙 처리 장치(CPU)나 동적 랜덤 액세스 메모리(DRAM)를 거의 또는 전혀 사용하지 않고 계산 노드(예: 그래픽 처리 장치(GPU) 또는 디스크 스토리지)로 전송되는 것을 의미합니다. 데이터 전송에는 세 가지 유형/수준이 있습니다:

  1. In a conventional setup, each piece of hardware in the system has a separate driver which connects to the user’s application. The drivers are assigned       separate memory spaces in PC DRAM, and therefore data transfer between the hardware units requires significant copying. This results in a heavy load on both CPU and DRAM in the host PC. For example, streaming data in 14 Gbytes/s means 56 Gbytes/s load on the PC DRAM (fig. 2).                                             기존 설정에서는 시스템의 각 하드웨어에 사용자 애플리케이션에 연결되는 별도의 드라이버가 있습니다. 드라이버는 PC DRAM에서 별도의 메모리 공간을 할당받으므로 하드웨어 장치 간의 데이터 전송에는 상당한 복사가 필요합니다. 이로 인해 호스트 PC에서 CPU와 DRAM 모두에 큰 부하가 발생합니다. 예를 들어, 14Gbytes/s의 스트리밍 데이터는 PC DRAM에서 56Gbytes/s의 부하를 의미합니다(그림 2). Figure 2. Conventional streaming involves writing digitizer data to memory segment S1 in the PC's DRAM (arrows marked "a"), reading from segment S1 to CPU (arrow "b"), writing to segment S2 (arrow "c") and reading from S2 to GPU DRAM (arrows "d"). In total 4 read/write operations which will require 4 x 14 = 56 GByte/s DRAM capability.

그림 2. 기존 스트리밍은 PC의 DRAM에서 메모리 세그먼트 S1에 디지타이저 데이터를 쓰고(arrows "a"로 표시됨), 세그먼트 S1에서 CPU까지 읽고(arrow "b"), 세그먼트 S2에 쓰고(arrow "c"), S2에서 GPU DRAM까지 읽고(arrows "d")를 포함합니다. 총 4번의 읽기/쓰기 작업을 수행하며, 이 작업에는 4 x 14 = 56 GByte/s DRAM 기능이 필요합니다.

 

  1. One way of improving the performance is to share the memory between the drivers. This method is called pinned buffer, and it effectively reduces the required copying to half so that for example streaming of 14 Gbytes/s results in 28 Gbytes/s load on the PC DRAM (fig. 3). This method can be sufficient given that the PC provides sufficient memory bandwidth. However, a drawback is that all the hardware drivers (including third-party drivers) need to support shared memory and that is not always the case.                                                                                                                                                                  성능을 향상시키는 한 가지 방법은 드라이버 간에 메모리를 공유하는 것입니다. 이 방법을 고정 버퍼라고 하며, 필요한 복사를 효과적으로 절반으로 줄여 예를 들어 14Gbytes/s의 스트리밍을 통해 PC DRAM에 28Gbytes/s의 부하를 발생시킵니다(그림 3). 이 방법은 PC가 충분한 메모리 대역폭을 제공한다는 점을 고려할 때 충분할 수 있습니다. 그러나 단점은 모든 하드웨어 드라이버(서드파티 드라이버 포함)가 공유 메모리를 지원해야 한다는 점이며, 항상 그런 것은 아닙니다. 

Figure 3. With pinned buffer there is only a single memory segment in PC DRAM (denoted "S" above). This solution requires only one write and one read operation and hence 2 x 14 = 28 GByte/s DRAM capability.


그림 3. 고정 버퍼를 사용하면 PC DRAM에는 단일 메모리 세그먼트만 존재합니다(위에 "S"로 표시됨). 이 솔루션은 쓰기와 읽기 작업이 하나만 필요하므로 2 x 14 = 28 GByte/s DRAM 기능을 제공합니다. 

  1. The best performance is achieved using peer-to-peer (P2P) streaming. With this method, the data is sent directly between the digitizer and endpoints via a PCIe switch (or root complex) with little or no involvement of the CPU or DRAM on the host PC (fig. 4). This significantly reduces the workload on the CPU and DRAM. P2P streaming is currently supported on both Windows and Linux for ADQ7 and ADQ3-series and Windows only for ADQ14.                                최고의 성능은 peer-to-peer(P2P) 스트리밍을 사용하여 달성됩니다. 이 방법을 사용하면 데이터는 호스트 PC의 CPU나 DRAM이 거의 또는 전혀 관여하지 않고 PCIe 스위치(또는 루트 콤플렉스)를 통해 디지타이저와 엔드포인트 간에 직접 전송됩니다(그림 4). 이렇게 하면 CPU와 DRAM의 작업 부하가 크게 줄어듭니다. P2P 스트리밍은 현재 ADQ7 및 ADQ3 시리즈의 경우 Windows와 Linux에서 모두 지원되며, ADQ14의 경우 Windows에서만 지원됩니다.  


Figure 4. Best performance is achieved using peer-to-peer streaming.

One advantage of PXIe is that it supports a large number of hardware units in a single chassis. Multiple high-speed data streams can be set up via the backplane, for example between several ADQ7 units and ADQDSU disk storage units. This ensures optimal performance without loading the PXIe controller (host PC). 

그림 4. 최고의 성능은 P2P 스트리밍을 사용하여 달성됩니다.


PXIe의 한 가지 장점은 단일 섀시에서 많은 수의 하드웨어 유닛을 지원한다는 점입니다. 예를 들어 여러 ADQ7 유닛과 ADQDSU 디스크 저장 장치 사이에서 백플레인을 통해 여러 고속 데이터 스트림을 설정할 수 있습니다. 이렇게 하면 PXIe 컨트롤러(호스트 PC)를 로드하지 않고도 최적의 성능을 보장할 수 있습니다.

Streaming to GPU

FPGAs and GPUs are powerful computational platforms with distinct architectures and programming methods.

FPGAs operate on raw data streams, performing vital pre-processing and data reduction. They offer high parallelism but have finite computational resources, such as multiply-accumulate (MAC) units. Implementing long FFTs can be challenging. FPGAs are programmed using HDLs like VHDL or Verilog, or high-level synthesis (HLS). They adjust raw data rates to fit the data link capacity to the host PC, making pre-processing and data reduction crucial.

GPUs are programmed with frameworks like CUDA or OpenCL, offering higher abstraction and easier programming compared to FPGAs. They use high-level data types like floating-point numbers, while FPGAs use fixed-point. GPUs provide shorter development/testing cycles and extensive tutorials. Debugging FPGA designs is more complex and time-consuming, requiring detailed simulation and hardware-in-the-loop verification.

Applications: GPUs excel in AI and machine learning algorithms, such as medical imaging (e.g., single-cell flow cytometry, SS-OCT). Post-processing in GPUs handles reduced data sets from FPGAs, with data rates up to 14 Gbyte/s via peer-to-peer streaming.

FPGA와 GPU는 서로 다른 아키텍처와 프로그래밍 방식을 갖춘 강력한 컴퓨팅 플랫폼입니다.

FPGA는 원시 데이터 스트림에서 작동하여 중요한 전처리 및 데이터 감소를 수행합니다. FPGA는 높은 병렬성을 제공하지만 다중 누적(MAC) 단위와 같은 유한한 계산 자원을 가지고 있습니다. 긴 FFT를 구현하는 것은 어려울 수 있습니다. FPGA는 VHDL 또는 Verilog와 같은 HDL 또는 고수준 합성(HLS)을 사용하여 프로그래밍됩니다. 호스트 PC에 대한 데이터 링크 용량에 맞게 원시 데이터 속도를 조정하므로 전처리 및 데이터 감소가 중요합니다.

GPU는 CUDA 또는 OpenCL과 같은 프레임워크로 프로그래밍되어 있으며, FPGA에 비해 더 높은 추상화와 더 쉬운 프로그래밍을 제공합니다. GPU는 부동 소수점 숫자와 같은 고수준 데이터 유형을 사용하는 반면, FPGA는 고정 소수점을 사용합니다. GPU는 더 짧은 개발/테스트 주기와 광범위한 튜토리얼을 제공합니다. FPGA 설계를 디버깅하는 것은 더 복잡하고 시간이 많이 소요되므로 상세한 시뮬레이션과 하드웨어 인 더 루프 검증이 필요합니다.

응용 분야: GPU는 의료 영상(예: 단일 세포 유세포 분석, SS-OCT)과 같은 AI 및 머신 러닝 알고리즘에서 뛰어난 성능을 발휘합니다. GPU에서의 후처리는 FPGA에서 데이터 세트를 줄여주며, 피어 투 피어 스트리밍을 통해 최대 14 Gbyte/s의 데이터 속도를 제공합니다.


Streaming to CPU

High-speed streaming to a CPU is possible, but these devices do not offer the same level of parallelism and computational power as GPUs. This type of streaming is therefore typically only a complement to GPU streaming. The CPU is instead better utilized for tasks with lower computational complexity such as system-level control, data display, etc. The ADQ3-Series enables the simultaneous streaming of metadata to the CPU while data goes to the GPU. This configuration provides access to a range of advanced features, including timestamping and synchronization calculation.


CPU로 고속 스트리밍이 가능하지만, 이러한 장치는 GPU와 동일한 수준의 병렬 처리와 연산 능력을 제공하지 않습니다. 따라서 이러한 유형의 스트리밍은 일반적으로 GPU 스트리밍을 보완하는 역할만 합니다. 대신 CPU는 시스템 수준 제어, 데이터 디스플레이 등 계산 복잡성이 낮은 작업에 더 잘 활용됩니다. ADQ3 시리즈는 데이터가 GPU로 이동하는 동안 메타데이터를 CPU로 동시에 스트리밍할 수 있게 합니다. 이 구성은 타임스탬프 및 동기화 계산을 포함한 다양한 고급 기능에 대한 액세스를 제공합니다.



Streaming to Solid-State Disk (SSD)

Not all systems benefit from real-time/fast data processing. One such example is airborne lidar or radar systems where long flights are conducted to cover large geographical areas. In these systems, it is not crucial to perform computations in real-time, and instead, the data is recorded to storage for subsequent offline processing and analysis.

High-speed storage/recording can be implemented without peer-to-peer technology, but achievable performance depends very much on the system and the workload of the host PC. The transfer rates are may vary significantly and the solution is therefore not very robust. For this type of system, the rates are normally limited to between 1 to 4 GByte/s.

Teledyne SP Devices offer turnkey SSD storage solutions that support peer-to-peer streaming. These systems offer more robust operation with stable transfer rates for reliable uptime and performance. Please contact us for further information.


모든 시스템이 실시간/빠른 데이터 처리의 이점을 누리는 것은 아닙니다. 이러한 예로는 넓은 지리적 영역을 커버하기 위해 장거리 비행이 수행되는 공중 라이다 또는 레이더 시스템이 있습니다. 이러한 시스템에서는 실시간으로 계산을 수행하는 것이 중요하지 않으며, 대신 데이터를 저장하여 오프라인 처리 및 분석을 수행합니다.

고속 저장/기록은 피어 투 피어 기술 없이도 구현할 수 있지만, 달성 가능한 성능은 시스템과 호스트 PC의 워크로드에 크게 좌우됩니다. 전송 속도는 크게 다를 수 있으므로 솔루션이 그다지 견고하지 않습니다. 이러한 유형의 시스템의 경우 일반적으로 속도는 1GB에서 4GByte/s 사이로 제한됩니다.

텔레다인 SP 디바이스는 피어 투 피어 스트리밍을 지원하는 턴키 SSD 스토리지 솔루션을 제공합니다. 이러한 시스템은 안정적인 전송 속도로 안정적인 작동을 제공하여 안정적인 가동 시간과 성능을 제공합니다. 자세한 내용은 저희에게 문의 말씀해 주세요.


VIDEO


How P2P streaming to GPU can make your life faster

Learn how peer-to-peer (P2P) streaming helps significantly improve digitizer system's performance.


GPU로 P2P 스트리밍을 통해 삶을 더 빠르게 만드는 방법

peer-to-peer (P2P) 스트리밍이 디지타이저 시스템의 성능을 크게 향상시키는 방법을 알아보세요.

VIDEO


Streaming to CPU, GPU or Disk

The benefits and drawbacks of streaming to CPU, GPU and DISK.


CPU, GPU 또는 디스크로 스트리밍

CPU, GPU 및 DISK로 스트리밍하는 것의 장단점.


궁금하신 점은 언제든 댓글 또는 이메일(info@laonuri.com)을 통해 말씀해 주세요!