CPC G06F 9/5027 (2013.01) [G06F 9/5016 (2013.01)] | 9 Claims |
1. A method for recording Ethernet data stream, implemented at a high-speed data acquisition system, the high-speed data acquisition system being constructed from a Linux operating system, a plurality of 10-gigabit network cards and a high-speed NVMe solid state drive, comprising:
step S100, isolating a preset number of CPU cores after the Linux operating system is booted;
step S200, uninstalling a kernel network card driver of the Linux operating system by an sysfs file system and creating a hugepage memory pool; for each 10-gigabit network card, allocating a corresponding data-receiving buffer pool and a corresponding lock-free FIFO buffer by a hugetlbfs file system, and initializing a PCIE register of each of the plurality of 10-gigabit network cards by the sysfs file system based on a corresponding PCIE address such that each 10-gigabit network card enters into an acquisition state;
wherein the uninstalling of the kernel network card driver of the Linux operating system by an sysfs file system and creating a hugepage memory pool in step S200 comprises performing the uninstalling by an unbind node in a driver directory of a pci device in the sysfs file system, setting the number of hugepages in an nr_hugepages node after the uninstalling is completed, and creating the hugepage memory pool;
step S300, creating a plurality of worker threads and binding the plurality of worker threads to the CPU core, and continuously receiving packets acquired by each 10-gigabit network card in a driving manner of user-space polling and performing disk recording on the packets acquired by each 10-gigabit network card, wherein the worker threads include a data receiving thread and a disk recording thread.
|