Which Queue Pair type to use?

    
5.00 avg. rating (98% score) - 3 votes

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:

      1. Reliability by the fabric is needed
    1. 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:

      1. 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)
      1. Fabric size isn't big or the cluster size is big, but not all nodes send traffic to the same node (one victim)
    1. 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:

      1. 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)
      1. 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.
    1. 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?的更多相关文章

  1. Queue Pair in RDMA (zz)

    Queue Pair in RDMA 首页分类标签留言关于订阅2018-03-21 | 分类 Network  | 标签 RDMA 一个CA(Channel Adapter)可以包含多个QP,QP相当 ...

  2. C++的队列和pair

    C++队列的成员函数: back()返回最后一个元素 empty()如果队列空则返回真 front()返回第一个元素 pop()删除第一个元素 push()在末尾加入一个元素 size()返回队列中元 ...

  3. 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 ...

  4. jQuery.queue源码分析

    作者:禅楼望月(http://www.cnblogs.com/yaoyinglong ) 队列是一种特殊的线性表,它的特殊之处在于他只允许在头部进行删除,在尾部进行插入.常用来表示先进先出的操作(FI ...

  5. jQuery源代码学习之七—队列模块queue

    一.jQuery种的队列模块 jQuery的队列模块主要是为动画模块EFFECTS提供支持,(不过到现在为了支持动画队列的inprogress的出入队还是搞不太清楚),单独抽取出一个命名空间是为了使程 ...

  6. jquery源码学习之queue方法

    队列模块的代码结构 静态方法jQuery下有queue,dequeue,_queueHooks这三种方法:静态方法不建议直接在外部调用: 实例方法.queue,.dequeue,.clearQueue ...

  7. QUEUE——队列(procedure)

    #include <stdio.h> #include <stdlib.h> #include "queue.h" int main() {  int i; ...

  8. Objective-C priority queue

    http://stackoverflow.com/questions/17684170/objective-c-priority-queue PriorityQueue.h // // Priorit ...

  9. 找最大重复次数的数和重复次数(C++ Pair)

    Problem A: 第一集 你好,世界冠军 Time Limit: 10 Sec  Memory Limit: 128 MBSubmit: 265  Solved: 50[Submit][Statu ...

随机推荐

  1. git 推送远程仓库和删除远程仓库文件

    提交到远程仓库需要现在GitHub或gitlab上创建项目,然后才能连接到远程仓库 1.连接远程仓库 # git remote add origin https://github.com/xxxxx ...

  2. Android开发 ViewConfiguration 用法

    ViewConfiguration 实例获取 ViewConfiguration viewConfiguration = ViewConfiguration.get(Context); 常用对象方法 ...

  3. sql 查询语句的练习

    --1.使用基本查询语句. --(1)查询DEPT表显示所有部门名称. select * from dept; --(2)查询EMP表显示所有雇员名及其全年收入(月收入=工资+补助),处理NULL行, ...

  4. [UNITY 5.4 UGUI] 模态对话框

    1.建立两个画布 a.背景界面 b.置顶界面(添加一个 panel 控件) 2.修改置顶界面中 panel ,添加属性 [Canvas Group] 3.根据界面设计情况修改透明度,色彩,图片

  5. loadrunner-关联

    1.什么是关联? 将服务器动态返回的值,保存成一个参数,供后面需要使用到 此参数的地方使用 PS:1.一定是服务器返回的 2.动态变化的,静态不需要关联 3.服务器需要校验的 4.保存成一个参数 5. ...

  6. 关于Float.parseFloat()的一点探讨

    最近在解决线上的bug时,遇到一个问题. 第三方传过来的课程编码时4214410000,然而我们存进数据库的值却变成了4214409980.查遍了所有的代码都查不到有对这个值修改的代码.最后,通过打印 ...

  7. python3 十六进制字符串进行分割并累加

    最近忘性大,记录一下 需求: ‘80 11 F1 01 1A’字符串需要把每一个十六进制字符加起来,即80+11+F1+01+1A=? 很简单,不解释,直接上 hex(sum([int(i,16) f ...

  8. rownum用法

    对于rownum来说它是oracle系统顺序分配为从查询返回的行的编号,返回的第一行分配的是1,第二行是2,依此类推,这个伪字段可以用于限制查询返回的总行数,且rownum不能以任何表的名称作为前缀. ...

  9. Git 切换本地分支 切换远程分支

    切换本地分支 git checkout work1 切换到新的分支工作(不存在则会创建) 将本地已有的分支(已经存在) 和 远程分支连接 git branch --set-upstream-to=or ...

  10. mysql for循环存储过程

    DROP PROCEDURE IF EXISTS test_insert; DELIMITER ;; CREATE PROCEDURE test_insert () BEGIN DECLARE i i ...