美文网首页
Tackling Parallelization Challen

Tackling Parallelization Challen

作者: LucasHao | 来源:发表于2020-10-18 17:23 被阅读0次

关键词:容器 覆盖网络 性能瓶颈

1. NetWork Packet Processing in Linux

NICs - kernel space - user space

  • 到达NICs: 包被copy到 kernel ring buffer 并触发一个硬件中断 (Interrupt ReQuest).

  • Kernel响应中断,并开始接收流程:接收过程被分为两步: top halfthe bottom half

    • top half在interrupt的context中运行:inserts the packet into the per-CPU packet queue

    • Bottom half以软件中断的形式运行:随后被kernel调度并且是在网络协议栈中处理的main routine

  • 经过多层的layer后,copied to userspace

2. Optimization for packet processing

#### Method1:packet process overhead optimization

*   Per-packet or Per-byte cost:*interrupt coalescing*(包合并来减少在内核网络栈处理的包数量) and *polling-based approaches*来减少中断次数,*user-space network stacks*等

#### Method 2:Parallelize processing

*   高速网络设备可以轻易使一个cpu内核饱和:NIC可以提供muti-queues,分别对不同的内核提供IRQ(也可以直接向不同的内核分发,不需要网卡支持RPS)

3. Some Evaluation

截屏2020-10-18 下午5.21.56.png

可以看到,开销增加最多的地方在于软中断(即一些对kernel的IO请求)
而CPU并行化的方案最小粒度是基于flow的,无法到packet的粒度
对于小流,上述问题会导致瓶颈更严重

相关文章

网友评论

      本文标题:Tackling Parallelization Challen

      本文链接:https://www.haomeiwen.com/subject/bwucmktx.html