Which Queue Pair type to use?
Unconnected: one QP send/receive with any QP
The following mechanisms are being used in RDMA:
* CRC: The CRC field which validates that packets weren't corrupted along the path.
* PSN: The Pa
2024-10-16 13:25:48 原文Which Queue Pair type to use?
Contents [hide]
When writing a new RDMA application (just like when writing a new application over sockets), one should decide which QP type he should work with.
In this post, I will describe in detail the characteristics of each transport type.
In RDMA, there are several QP types. They can be represented by : XY
X can be:
Reliable: There is a guarantee that messages are delivered at most once, in order and without corruption.
Unreliable: There isn't any guarantee that the messages will be delivered or about the order of the packets.
In RDMA, every packet has a CRC and corrupted packets are being dropped (for any transport type). The Reliability of a QP transport type refers to the whole message reliability.
Y can be:
Connected: one QP send/receive with exactly one QP
Unconnected: one QP send/receive with any QP
The following mechanisms are being used in RDMA:
* CRC: The CRC field which validates that packets weren't corrupted along the path.
* PSN: The Packet Serial Number makes sure that packets are being received by the order. This helps detect missing packets and packet duplications.
* Acknowledgement: (only in RC QP) Only after a message is being written successfully on the responder side, an ack packet is being sent back to the requestor. If an ack isn't being sent by the requestor, it resend the message again according to the QP's attributes. If there won't be any ack (or nack) from a QP, it will report that there is an error (retry exceeded).
If there is any kind of error on the responder side (protection, resources, etc.) an ack will be sent to the requestor and it will report that there is an error.
Reliable Connected (RC) QP
One RC QP is being connected (i.e. send and receive messages) to exactly one RC QP in a reliable way. It is guaranteed that messages are delivered from a requester to a responder at most once, in order and without corruption. The maximum supported message size is up to 2GB (this value may be lower, depends on the supported RDMA device attributes). RC QP supports Send operations (w/o immediate), RDMA Write operations (w/o immediate), RDMA Read operations and Atomic operations (it depends on the RDMA device support level in atomic operations).
If a message size is bigger than the path MTU, it is being fragmented in the side that sends the data and being reassembled in the receiver side.
Requester considers a message operation complete once there is an ack from the responder side that the message was read/written to its memory.
Responder considers a message operation complete once the message was read/written to its (local) memory.
Unreliable Connected (UC) QP
One UC QP is being connected (i.e. send and receive messages) to exactly one UC QP in an unreliable way. There isn't any guaranteed that the messages will be received by the other side: corrupted or out of sequence packets are silently dropped. If a packet is being dropped, the whole message that it belongs to will be dropped. In this case, the responder won't stop, but continues to receive incoming packets. There isn't any guarantee about the packet ordering. The maximum supported message size is up to 2GB (this value may be lower, depends on the support RDMA device attributes). RC QP supports Send operations (w/o immediate) and RDMA Write operations (w/o immediate).
If a message size is bigger than the path MTU, it is being fragmented in the side that sends the data and being reassembled in the receiver side.
Requester considers a message operation complete once all of the message was sent to the fabric.
Responder considers a message operation complete once it received a complete message in correct sequence and it written the data to its (local) memory.
Unreliable Datagram (UD) QP
One QP can send and receive message to any other UD QP in either unicast (one to one) or multicast (one to many) way in an unreliable way. There isn't any guaranteed that the messages will be received by the other side: corrupted or out of sequence packets are silently dropped. There isn't any guarantee about the packet ordering. The maximum supported message size is the maximum path MTU. UD QP supports only Send operations.
Requester considers a message operation complete once the (one packet) message was sent to the fabric.
Responder considers a message operation complete once it received a complete message and it written the data to its (local) memory.
Choosing the right QP type
Choosing the right QP type is critical to the correction and scalability of an application.
RC QP should be chosen if:
- Reliability by the fabric is needed
- Fabric size isn't big or the cluster size is big, but not all nodes send traffic to the same node (one victim)
Several uses for a RC QP can be: FTP over RDMA or file system over RDMA.
UC QP should be chosen if:
- Reliability by the fabric isn't needed (i.e. reliability isn't important at all or it is being taken care of by the application)
- Fabric size isn't big or the cluster size is big, but not all nodes send traffic to the same node (one victim)
- Big messages (more than the path MTU) are being sent
One use for an UC QP can be: video over RDMA.
UD QP should be chosen if:
- Reliability by the fabric isn't needed (i.e. reliability isn't important at all or it is being taken care of by the application)
- Fabric size is big and all nodes and every node send messages to any other node in the fabric. UD is one of the best solutions for scalability problems.
- Multicast messages are needed
One use for an UD QP can be: voice over RDMA.
Summary
The following table describes the characteristics of each QP Transport Service Type:
| Metric | UD | UC | RC |
|---|---|---|---|
| Opcode: SEND (w/o immediate) | Supported | Supported | Supported |
| Opcode: RDMA Write (w/o immediate) | Not supported | Supported | Supported |
| Opcode: RDMA Read | Not supported | Not supported | Supported |
| Opcode: Atomic operations | Not supported | Not supported | Supported |
| Reliability | No | No | Yes |
| Connection type | Datagram (One to any/many) | Connected (one to one) | Connected (one to one) |
| Maximum message size | Maximum path MTU | 2 GB | 2 GB |
| Multicast | supported | Not supported | Not supported |
Share:
Written by: Dotan Barak on June 1, 2013.on January 11, 2019.
Related
Which Queue Pair type to use?的更多相关文章
- Queue Pair in RDMA (zz)
Queue Pair in RDMA 首页分类标签留言关于订阅2018-03-21 | 分类 Network | 标签 RDMA 一个CA(Channel Adapter)可以包含多个QP,QP相当 ...
- C++的队列和pair
C++队列的成员函数: back()返回最后一个元素 empty()如果队列空则返回真 front()返回第一个元素 pop()删除第一个元素 push()在末尾加入一个元素 size()返回队列中元 ...
- AMQP 0-9-1 Model Explained Why does the queue memory grow and shrink when publishing/consuming? AMQP和AMQP Protocol的是整体和部分的关系 RabbitMQ speaks multiple protocols.
AMQP 0-9-1 Model Explained — RabbitMQ http://next.rabbitmq.com/tutorials/amqp-concepts.html AMQP 0-9 ...
- jQuery.queue源码分析
作者:禅楼望月(http://www.cnblogs.com/yaoyinglong ) 队列是一种特殊的线性表,它的特殊之处在于他只允许在头部进行删除,在尾部进行插入.常用来表示先进先出的操作(FI ...
- jQuery源代码学习之七—队列模块queue
一.jQuery种的队列模块 jQuery的队列模块主要是为动画模块EFFECTS提供支持,(不过到现在为了支持动画队列的inprogress的出入队还是搞不太清楚),单独抽取出一个命名空间是为了使程 ...
- jquery源码学习之queue方法
队列模块的代码结构 静态方法jQuery下有queue,dequeue,_queueHooks这三种方法:静态方法不建议直接在外部调用: 实例方法.queue,.dequeue,.clearQueue ...
- QUEUE——队列(procedure)
#include <stdio.h> #include <stdlib.h> #include "queue.h" int main() { int i; ...
- Objective-C priority queue
http://stackoverflow.com/questions/17684170/objective-c-priority-queue PriorityQueue.h // // Priorit ...
- 找最大重复次数的数和重复次数(C++ Pair)
Problem A: 第一集 你好,世界冠军 Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 265 Solved: 50[Submit][Statu ...
随机推荐
- ubuntu10.04 搭建海思开发环境
(1)Ubuntu 10.04.4 LTS (Lucid Lynx) 下载地址:http://old-releases.ubuntu.com/releases/lucid/ (2)passwd roo ...
- Linux 添加新分区和 移动 /home到新挂载分区
https://blog.csdn.net/lyd135364/article/details/78623119 https://www.cnblogs.com/saszhuqing/p/871664 ...
- SQLserver登陆报错
https://blog.csdn.net/captain618/article/details/52331372 今天也不知道sql server抽了什么风,无论是windows登录还是sa登录,登 ...
- 数据库分库分表(sharding)系列
数据库分库分表(sharding)系列 目录; (一) 拆分实施策略和示例演示 (二) 全局主键生成策略 (三) 关于使用框架还是自主开发以及sharding实现层面的考量 (四) 多数据源的 ...
- dubbo . dubbo Please check registry access list (whitelist/blacklist) 错误
dubbo Please check registry access list (whitelist/blacklist) dubbo服务调用provider失败.解决办法: 再consumer的服务 ...
- Java使用BigDecimal计算保留位数不对问题定位
在项目中使用BigDecimal计算将单位从B换成TB时,算出来的结果总是整数,而没有保留设置的2位小数: 计算代码如下: db.divide(oneTB, ROUND_HALF_UP).setSca ...
- Juc中Atomic原子类总结
1 Atomic原子类介绍 2 基本类型原子类 3 数组类型原子类 4 引用类型原子类 5 对象的属性修改类型原子类
- 自定义编写js格式化数字的函数
在处理网页的时候,有时候会需要显示很长的数字,但是当数字的长度比较长的时候,就很难看一个数字到底是多大.这种情况下,一些网站在处理数字的时候,当数字的长度大于3个时,就用逗号把他们分开,这是一个比较常 ...
- python运行时参数m的作用
不加m时,当前目录是py文件的所在目录 加m时,当前目录就是当前目录
- 【转】WPS word 文档中的插入对象 为什么打不开
点击桌面左下角开始按钮--所有程序,找到wps office文件夹--wps office工具--配置工具--高级--兼容设置,否选兼容第三方软件.