当前位置:网站首页>Network equipment hard core technology insider router Chapter 17 dpdk and its prequel (II)
Network equipment hard core technology insider router Chapter 17 dpdk and its prequel (II)
2022-07-27 15:27:00 【User 8289326】
yesterday , We see , The emergence of multi-core processors has greatly improved the throughput of soft forwarding , But the optimization of cache has become the bottleneck of multi-core . In addition to the MBUF In addition to being optimized , There's another important thing —— Optimization of counters .
Whether it's a switch , Or routers , An important function is the interface counter .
You can see that in the picture , Each interface on the router has a count of the number of packets sent and received , And byte count . Because the data packets of each interface may be processed by any processor core , We need to think about : If each processor core operates on the counter ,CPU What happens inside ?
If the processor core A from RAM Read this counter , And add a number , meanwhile , Processor core B It is also necessary to accumulate this counter . therefore , The two processors collide . To solve this problem ,CPU Provides a locking mechanism , But in this way ……
All processor cores have to queue up when processing counters , Processing efficiency is conceivable .
therefore , Engineers assigned a set of counters to each core , Each core processes a packet , Are accumulated on their own counters , Accumulate when the check counter instruction is executed . such , It perfectly solves the problems mentioned above .
Of course , Because the network processor based on multi-core has some special acceleration coprocessors for network processing , Such as Parser( Message parser ), It can read the front of the packet 64 byte , And read the second layer address according to the preset register value 、 Third floor address 、TCP/UDP Port number and other information , hold CPU The core time is liberated from the repetitive parsing of packets , It also greatly accelerates the processing of data packets . Under the blessing of these factors ,8 nucleus 32 Threads do 10M The above pps It is not difficult to .
The words are divided into two parts , Each table a .
Intel To give up IXP NP After the product line , Witness MIPS/ARM stay 10Gbps To 100Gbps The network equipment market of , You can imagine the bitterness in your heart . however , Due to Intel led x86 The system has natural limitations ……
Let us Pull the timeline back to the little dark room of the Stanford professors and their wives .
be based on X86 The initial implementation of the router of the processor is shown in the figure above . as time goes on , Shared PCI The bus evolved into point-to-point PCI-E Bus .
actually , Because the network card has long supported DMA, All packets received by the network card can be written directly RAM in , The problem lies in the later process .
We know , stay DMA After completion , The network card will send CPU The core initiates the interrupt .CPU One of the core processing interrupts , Interrupt the original process , Go into kernel state , Access the packets received by the network card , And copy it to the user status , Back to the operating system . There are three questions :
- Interrupting the original process will cause instruction cache cacheline miss.
- Copying packets to user mode will waste a lot of time .
- Returning to the original operating system will cause instruction cache cacheline miss.
DPDK By solving these problems , Greatly improved Intel The processor is in Linux Packet processing performance under .
We mentioned repeatedly cache, So far , It is necessary to insert a special issue , Have a good chat about this thing , because , This concept will also be mentioned many times in the following hard core technology insider of computing and storage devices ……
边栏推荐
- JUC(JMM、Volatile)
- Google team launches new transformer to optimize panoramic segmentation scheme CVPR 2022
- Lua study notes
- Basic usage of kotlin
- DIY制作示波器的超详细教程:(一)我不是为了做一个示波器
- Unity最简洁的对象池实现
- Tools - common methods of markdown editor
- Reading notes of lifelong growth (I)
- Network equipment hard core technology insider router Chapter 9 Cisco asr9900 disassembly (II)
- Method of removing top navigation bar in Huawei Hongmeng simulator
猜你喜欢
随机推荐
网络设备硬核技术内幕 路由器篇 19 DPDK(四)
Sword finger offer cut rope
Dialog manager Chapter 3: create controls
2022-07-27日报:IJCAI 2022杰出论文公布,大陆作者中稿298篇拿下两项第一
CAN总线的EMC设计方案
Kubernetes CNI classification / operation mechanism
Inside router of network equipment hard core technology (10) disassembly of Cisco asr9900 (4)
Unity性能优化------DrawCall
魔塔项目中的问题解决
EMC design scheme of CAN bus
TCC
Principle of MOS tube to prevent reverse connection of power supply
STM32学习之CAN控制器简介
Google team launches new transformer to optimize panoramic segmentation scheme CVPR 2022
See "sense of security" in uncertainty Volvo asked in 2022
Unity 鼠标控制第一人称摄像机视角
仪表放大器和运算放大器优缺点对比
generic paradigm
AssetBundle如何打包
网络设备硬核技术内幕 路由器篇 15 从鹿由器到路由器 (下)








