[Paper Review] The ngdp framework for data acquisition systems
The ngdp framework is a lightweight, modular, and high-performance data acquisition (DAQ) system framework designed for distributed high-energy physics experiments. It leverages kernel threads and netgraph(4) in a UNIX-like environment to minimize memory copying and eliminate slow intermediate storage, achieving high throughput (>1 GB/s) by enabling direct kernel-to-user memory mapping via ng_mm(4) and efficient packet filtering through loadable filter modules.
The ngdp framework is intended to provide a base for the data acquisition (DAQ) system software. The ngdp's design key features are: high modularity and scalability; usage of the kernel context (particularly kernel threads) of the operating systems (OS), which allows to avoid preemptive scheduling and unnecessary memory--to--memory copying between contexts; elimination of intermediate data storages on the media slower than the operating memory like hard disks, etc. The ngdp, having the above properties, is suitable to organize and manage data transportation and processing for needs of essentially distributed DAQ systems. The investigation has been performed at the Veksler and Baldin Laboratory of High Energy Physics, JINR.
Motivation & Objective
- To design a lightweight, scalable, and modular DAQ software framework for distributed high-energy physics experiments.
- To eliminate performance bottlenecks caused by slow storage and excessive memory copying between user and kernel contexts.
- To achieve data throughput exceeding 1 GB/sec using standard hardware and operating systems.
- To enable dynamic loading and unloading of filtering functions at runtime via kernel loadable modules (KLDs).
- To support efficient, low-overhead data exchange between kernel and user space using mmap(2) and netgraph(4) nodes.
Proposed method
- The framework uses netgraph(4) as the core data transport and processing engine, enabling modular, hierarchical data flow routing.
- Kernel threads are used to execute data processing in kernel context, avoiding preemptive scheduling and reducing context-switching overhead.
- The ng_mm(4) node provides shared memory mapping between kernel and user space, allowing direct access to packet buffers via mmap(2), eliminating socket I/O layers.
- Filtering is implemented via loadable KLD modules that register dynamically through control messages (addflt/delflt), enabling runtime plug-in functionality.
- The ng_filter(4) node manages packet streams by applying filter functions sequentially in a chain, with each function returning 0 to pass the packet or non-zero to free it.
- User-space utilities ngget(1) and ngput(1) support data exchange using both ng_socket(4) and ng_mm(4), with ng_mm(4) preferred for performance.
Experimental results
Research questions
- RQ1How can a DAQ system achieve high throughput (>1 GB/sec) while minimizing resource consumption on standard hardware?
- RQ2What architectural patterns enable efficient, low-latency data transport between kernel and user space in a distributed DAQ system?
- RQ3How can dynamic filtering and modular processing be achieved at runtime without sacrificing performance?
- RQ4What mechanisms can eliminate intermediate storage on slow media like hard disks in high-speed data acquisition?
- RQ5How can kernel and user space components be efficiently synchronized and communicate with minimal copying?
Key findings
- The ngdp framework achieves high throughput (>1 GB/sec) by avoiding memory-to-memory copying between user and kernel contexts through direct kernel-to-user memory mapping via ng_mm(4).
- The use of kernel threads for data processing eliminates preemptive scheduling overhead and reduces latency in data flow management.
- Dynamic filter loading and unloading via KLD modules and control messages (addflt/delflt) enable runtime reconfiguration of data processing pipelines.
- The ng_filter(4) node successfully manages packet streams by applying filter functions in sequence, with early termination on non-zero return, reducing unnecessary processing.
- The ngget(1) and ngput(1) utilities demonstrate effective data exchange using both ng_socket(4) and ng_mm(4), with the latter providing superior performance due to direct memory access.
- The framework successfully eliminates intermediate storage on slow media, such as hard disks, by keeping data in main memory throughout processing.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.