Intel Application 应用设备队列(ApplicationDevice Queues,ADQ) 与 动态设备个性化(Dynamic DevicePersonalization,DDP)

应用设备队列(ApplicationDevice Queues,ADQ)

Learn more at intel.com/ADQ

20年发布的x810系列网卡具备此功能

netdev2020

https://legacy.netdevconf.info/0x14/session.html?talk-ADQ-for-system-level-network-io-performance-improvements

Description

ADQ technology enables application-specific data steering, isolation, signaling, and rate limiting using scalable device queues and an optimized application thread to a device queue data path. ADQ goals are to increase predictability by reducing response time jitter, lower latency and improve throughput for applications using standard Linux networking stack and interfaces. This talk will describe ADQ performance benefits, how ADQ works and how developers can implement for applications which may benefit from this technology using an application example.
ADQ技术使用可扩展的设备队列和优化的设备队列数据路径的应用程序线程,实现特定于应用程序的数据控制、隔离、信令和速率限制。
ADQ的目标是通过减少响应时间抖动、降低延迟和提高使用标准Linux网络堆栈和接口的应用程序的吞吐量来提高可预测性。
这次演讲将通过一个应用程序的例子来描述ADQ的性能优势,ADQ是如何工作的,以及开发人员如何为应用程序实现这一技术。

ADQ improves performance by:
1)Isolating application traffic to its own dedicated queues.
2)Affinitizing an application thread to a hardware device queue, in conjunction with event polling interfaces like epoll, that creates a single producer consumer data flow, avoiding costly synchronizations/contentions.
3)Symmetric queuing ensuring egress/ingress traffic traverses symmetrically through a pre-configured Tx/Rx queue pair.
4)Rate limiting egress data traffic per application.
5)Reducing the number of context switches/second.
ADQ通过以下方式提高性能:
1)将应用程序流量隔离到自己的专用队列。
2)将应用程序线程绑定到硬件设备队列,结合事件轮询接口(如epoll),创建单个生产者消费者数据流,避免昂贵的同步/争用。
3)对称排队,确保出口/入口流量通过预先配置的Tx/Rx队列对对称穿越。
4)速率限制每个应用程序的出口数据流量。
5)减少每秒上下文切换的次数。

How does ADQ work?

ADQ provides applications with customizable ranges of dedicated hardware queues (can be viewed as queue groups). The TC MQPRIO interface is extended for this effect. The TC MQPRIO scheduler configures the traffic classes, queue layout and bandwidth rate limits and offloads these to the hardware. Hardware channels (VSIs) are created for the queue groups. Isolation of traffic to RX queues is achieved using a hardware switch filter (tc-flower based) redirecting flows to the queue group based on the application identifier. The hardware then selects the queue within queue group using RSS/Flow Director.

ADQ为应用程序提供了可定制的专用硬件队列范围(可以看作队列组)。为此,扩展了TC MQPRIO接口。TC MQPRIO调度器配置流量类、队列布局和带宽速率限制,并将它们卸载给硬件。为队列组创建硬件通道(VSIs)。通过使用硬件交换机过滤器(基于tc-flower)根据应用程序标识符将流重定向到队列组来实现对RX队列的流量隔离。然后,硬件使用RSS/Flow Director在队列组中选择队列。

For ADQ application specific queuing model to work in an optimized way, a synchronization-free, single producer consumer model is desirable. To accomplish this abstraction, a unique pipe is established between application thread and device queue using the following:
为了使特定于ADQ应用程序的队列模型以优化的方式工作,一个无同步的、单一生产者消费者模型是可取的。为了完成这个抽象,在应用程序线程和设备队列之间建立了一个唯一的管道,方法如下:

  1. Aligning application thread to queue which allows packet processing in application thread context while the thread is free to move across cores (yet, hardware queue does not change). The socket option SO_INCOMING_NAPI_ID was introduced so the applications could use this information to split the incoming flows among the threads based on the receive queue (aka NAPI_ID). Event polling (epoll) with busy polling device queues was also enabled in the kernel to accomplish this.
    对齐应用程序线程到队列,允许在应用程序线程上下文中进行包处理,同时线程可以自由地跨内核移动(然而,硬件队列不会改变)。引入了套接字选项SO_INCOMING_NAPI_ID,因此应用程序可以使用此信息在基于接收队列(aka NAPI_ID)的线程之间分割传入流。内核中还启用了使用繁忙轮询设备队列的事件轮询(epoll)来实现这一点。

  2. A symmetric queuing model was then implemented to align transmit queue with receive queue. Thus, transmit completion work is locked into the same queue-association that a given application is polling on avoiding overhead of triggering an interrupt on another CPU. When the application cleans up the receive packets during the busy poll, transmit completion may be processed along with it in the same thread context resulting in reduced latency.
    实现了一个对称队列模型,实现了发送队列和接收队列的对齐。因此,传输完成工作被锁定在同一个队列关联中,给定的应用程序为了避免在另一个CPU上触发中断而轮询该队列关联。当应用程序在繁忙轮询期间清理接收包时,可能会在同一个线程上下文中一起处理传输完成,从而减少延迟。

ADQ avoids resource starvation by allowing bandwidth management per application. This is done using TC MQPRIO for configuring the bandwidth rates per traffic class and offloading them to hardware. The hardware scheduler guarantees the specified transmit bandwidth for a given VSI.

ADQ通过允许对每个应用程序进行带宽管理来避免资源短缺。这是使用TC MQPRIO完成的,用于配置每个流量类的带宽速率并将它们卸载到硬件。硬件调度程序保证给定VSI的指定传输带宽。

ADQ also enables assigning RSS enabled set of queues to AF_XDP sockets. Enabling busy polling on AF_XDP sockets is being planned by associating NAPI_ID to an AF_XDP socket at the time of bind.
ADQ还允许将启用RSS的队列集分配给AF_XDP套接字。通过在绑定时将NAPI_ID关联到AF_XDP套接字,正在规划对AF_XDP套接字启用繁忙轮询。

ADQ is supported on next generation Intel 1/10/25/50/100Gbps NICs.

Slides:https://legacy.netdevconf.info/0x14/pub/slides/28/Application%20Device%20Queues%20for%20system-level%20network%20IO%20performance%20improvements.pdf
已转成PPT
Application Device Queues for system-level network IO performance improvements.pptx

Video:
https://www.youtube.com/watch?v=NWgXJwyKrqs

高优先级应用程序值得可预测的高性能
撰稿帕特里夏·库姆罗| 2019 年 5 月 9 日
https://itpeernetwork.intel.com/connectivity-adq/#gs.8ydqpj
2019 年 4 月 2 日,英特尔发布了下一代基础网络技术英特尔® 以太网 800 系列,其速度高达 100GbE,并具有许多新的创新功能。使新的英特尔以太网 800 系列与众不同的一项高级功能是应用设备队列 (ADQ)。ADQ 使管理员能够为优先网络服务指定某些应用程序,以确保特定的响应时间。这就像为拼车预留了一条快速车道。ADQ 以具有成本效益的方式提供快速且可预测的数据传输性能,应用程序开发人员和网络运营商可以依赖并相应地优化他们的应用程序。

传统上,连接性能是通过延迟和吞吐量来衡量的,即平均响应时间和数据移动量。然而,随着数据中心的扩展,可预测性变得同样重要,并根据延迟可变性或“抖动”来衡量。当添加更多服务器以支持不断增长的网络需求时,抖动将成为可扩展性的限制因素,并可能导致较差的最终用户体验。ADQ 的目标是通过大幅降低抖动确保高优先级应用程序不仅获得高性能,而且获得可预测的高性能。在云规模上,延迟和高吞吐量必须与可预测性相结合,以便公司满足服务水平协议 (SLA)。

ADQ 的数据中心应用
在这里插入图片描述
ADQ 的初始部署针对数据中心的不同层级(图 1. ADQ 在数据中心的初始应用
)。Aerospike *、Redis Labs * 和NGINX *等独立软件供应商 (ISV)对 ADQ 感到兴奋,英特尔正与这些公司密切合作,为英特尔® 以太网 800 系列优化 ADQ。

网络应用的加速数据包处理
AF Express 数据路径 (AF_XDP) 支持云原生解决方案的数据包处理。英特尔架构师观察到在基于第二代英特尔® 至强® 可扩展处理器的平台上的英特尔以太网 800 系列上使用 AF_XDP 和 ADQ 时加速数据包处理的初步结果。与不使用 ADQ 加速1 相比,使用 ADQ 加速 AF_XDP 使用的 CPU 内核数量大约减少了一半,从而释放了用于数据包处理的处理器内核,用于其他更重要的任务。随着内核的添加,数据包处理呈现出近乎线性的扩展性,从而使跨多个内核的聚合性能具有高度可扩展性。

网络可预测性的下一步
ADQ 通过更高的响应可预测性、更低的延迟和更好的吞吐量来提高应用程序性能。随着数据中心在新的以数据为中心的时代扩展,网络可预测性的重要性继续增长。使用 ADQ 的初始应用程序已经展示了很好的结果,并且得到了 ISV 社区的大力支持。最重要的是,新的英特尔以太网 800 系列上的 ADQ 有望成为更好、更一致地为最终用户服务的重要一步。

关于Patricia Kummrow
Patty Kummrow 是网络和边缘事业部的副总裁,也是英特尔公司以太网产品事业部的总经理。她领导英特尔® 以太网网络适配器、控制器和 IPU 的战略、架构、开发、制造和营销,以支持用于加速数据中心网络、存储和网络安全的下一代解决方案。Kummrow 在 CPU 设计和技术领导方面拥有二十年的经验。她曾领导多个团队为数据中心、网络、存储和自动驾驶应用开发英特尔处理器。她拥有德克萨斯大学电气工程学士学位和瓦尔登大学技术管理硕士学位。

技术文档:application-device-queues-technology-brief.pdf
已翻译 很重要

使用 ADQ 提高 Aerospike 的吞吐量和可预测性
https://www.intel.com/content/www/us/en/architecture-and-technology/ethernet/performance-testing-application-device-queues-with-aerospike.html
请添加图片描述

动态设备个性化(Dynamic DevicePersonalization,DDP)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
如果你的Spring Boot版本较低,或者不支持`@RabbitListener`注解和通配符`*`、`#`,你可以通过编程方式实现动态监听以特定前缀开头的队列。 以下是一个示例代码,实现了监听以`myQueue.`开头的队列: 首先,在你的配置类中注入`RabbitListenerEndpointRegistry`: ```java @Configuration public class RabbitMQConfig { @Autowired private RabbitListenerEndpointRegistry registry; // ... } ``` 然后,编写一个方法来动态添加监听器: ```java public void addListeners(String prefix) { SimpleRabbitListenerEndpoint endpoint = new SimpleRabbitListenerEndpoint(); endpoint.setMessageListener(new MyMessageListener()); String queueName = prefix + UUID.randomUUID().toString(); endpoint.setQueueNames(queueName); // 注册监听器 registry.registerListenerContainer(endpoint, new MyRabbitListenerContainerFactory(), true); // 启动监听器 registry.getListenerContainer(endpoint).start(); } ``` 这个方法会创建一个`SimpleRabbitListenerEndpoint`实例,设置消息监听器和队列名称。然后,使用`RabbitListenerEndpointRegistry`注册监听器,使用自定义的`MyRabbitListenerContainerFactory`创建监听器容器,并启动监听器。 最后,你需要编写一个消息监听器来处理消息,例如: ```java public class MyMessageListener implements MessageListener { @Override public void onMessage(Message message) { // 处理消息 } } ``` 当要监听以`myQueue.`开头的队列时,只需要调用`addListeners("myQueue.")`方法即可。这将会创建一个以`myQueue.`开头的随机队列,并启动一个监听器来监听这个队列

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值