{"id":3826,"date":"2013-11-22T17:34:25","date_gmt":"2013-11-22T15:34:25","guid":{"rendered":"http:\/\/www.cloudcomp.ch\/?p=3826"},"modified":"2014-08-05T16:10:05","modified_gmt":"2014-08-05T14:10:05","slug":"infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write","status":"publish","type":"post","link":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/","title":{"rendered":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write"},"content":{"rendered":"<p style=\"text-align: justify\">This blogpost aims to give you a short introduction to InfiniBand. At the end you should have a rough overview over the technology, much of its terminology and on how to program a very simple RDMA application with IB verbs.<\/p>\n<p style=\"text-align: justify\"><!--more--><\/p>\n<p style=\"text-align: justify\">The first part explains the basic characteristics\/properties of the InfiniBand technology and the physical parts that a network consists of. The second part takes a closer look at the logical parts of the technology that are needed for communication. In the third and last part I\u2019ll explain the structure of a simple IB verbs application. IB verbs are abstract representations of functions. You can think of IB verbs as functions\/methods that have to be offered by an (IB)-API.<\/p>\n<p style=\"text-align: justify\">You might wonder, why there is an article on InfiniBand on a cloud computing blog. The ICCLab is currently one of the members of the\u00a0<a title=\"FI-WARE Web-Portal\" href=\"http:\/\/http\/\/www.fi-ware.eu\/\" target=\"_blank\">FI-WARE<\/a>\u00a0open call project \u201cMiddleware for efficient and QoS\/Security-aware invocation of services and exchange of messages\u201d named\u00a0<a title=\"KIARA ICCLab Page\" href=\"http:\/\/www.cloudcomp.ch\/research\/foundation\/projects\/kiara\/\" target=\"_blank\">KIARA<\/a>. One of its features will be the support of InfiniBand in the transport layer.<\/p>\n<p style=\"text-align: justify\">This whole blogpost is a big compilation from various sources that I\u2019ve found while researching InfiniBand over the last couple of weeks. The same goes for the IB verbs example program. All those sources that were extremely helpful to me can be found at the end of this blogpost. For those who\u2019ll want to dive deeper into the subject this should give you a good starting point. A big \u2018thank you\u2019 to all those writers of introductions, summaries and tutorials.<\/p>\n<h2>Basics, Network and End Nodes<\/h2>\n<p style=\"text-align: justify\">InfiniBand (IB) is a networking technology developed by the InfiniBand Trade Association in 1999. It is used for high-performance computing and in enterprise data centers.\u00a0Its features include high throughput, low\u00a0latency,\u00a0quality of service\u00a0and\u00a0failover.<\/p>\n<p style=\"text-align: justify\">The smallest complete InfiniBand Architecture (IBA) unit is a subnet. A subnet consists of end nodes (e.g. servers), switches, copper or fibre links and a subnet manager. End nodes use so called Channel Adapters (CAs) to connect to links. There are Host Channel Adapters (HCAs) and Target Channel Adapters (TCAs). HCAs are accessible by user-applications, TCAs not. The subnet manager has an overview over and manages the whole subnet.<\/p>\n<dl id=\"attachment_3827\" class=\"wp-caption aligncenter\" style=\"width: 510px\">\n<dt class=\"wp-caption-dt\"><a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3827 \" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png\" alt=\"InfiniBand Subnet\" width=\"500\" height=\"486\" srcset=\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png 1024w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-300x291.png 300w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-308x300.png 308w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/dt>\n<dd class=\"wp-caption-dd\">InfiniBand Subnet<\/dd>\n<\/dl>\n<p style=\"text-align: justify\">InfiniBand allows an application to communicate <i>directly<\/i> with another application. This means that an application does not need to rely on the operating system to transfer messages.<\/p>\n<dl id=\"attachment_3832\" class=\"wp-caption aligncenter\" style=\"width: 510px\">\n<dt class=\"wp-caption-dt\"><a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_communication_channel.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3832 \" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_communication_channel-1024x643.png\" alt=\"InfiniBand creates a channel directly connecting an application in its virtual address space to an application in another virtual address space\" width=\"500\" height=\"314\" srcset=\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_communication_channel-1024x643.png 1024w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_communication_channel-300x188.png 300w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_communication_channel-477x300.png 477w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/dt>\n<dd class=\"wp-caption-dd\">InfiniBand creates a channel directly connecting an application in its virtual address space to an application in another virtual address space<\/dd>\n<\/dl>\n<p style=\"text-align: justify\">This was just a very basic and short overview of what InfiniBand is. The IB specification is 1500 pages long! The important points were to get a rough overview of how an IB network looks like, understand that the NICs are called Channel Adapters and that IB creates a channel between those CAs which allows applications to directly communicate with each other without involving the operating system.<\/p>\n<h2>Communication<\/h2>\n<p style=\"text-align: justify\">CAs communicate with each other using <i>work queues<\/i>. There are three types of work queues: Send, Receive and Completion. Send and Receive Queues are always used as <i>Queue Pairs <\/i>(QP). A particular QP in a CA is the destination or source of all messages. Each QP also has an associated port which is an abstraction of the connection of a CA to a link.<\/p>\n<dl id=\"attachment_3834\" class=\"wp-caption aligncenter\" style=\"width: 511px\">\n<dt class=\"wp-caption-dt\"><a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePairs_channelAdapters.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3834 \" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePairs_channelAdapters-1024x333.png\" alt=\"Queue Pairs (send\/receive) in the Channel Adapters\" width=\"501\" height=\"162\" srcset=\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePairs_channelAdapters-1024x333.png 1024w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePairs_channelAdapters-300x97.png 300w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePairs_channelAdapters-500x162.png 500w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/dt>\n<dd class=\"wp-caption-dd\">Queue Pairs (send\/receive) in the Channel Adapters<\/dd>\n<\/dl>\n<p style=\"text-align: justify\">To send or receive messages, W<i>ork Requests<\/i> (WRs) are placed onto a QP. There are send work requests and receive work requests. When processing is completed, a W<i>ork Completion<\/i> (WC) entry is optionally placed onto a C<i>ompletion Queue<\/i> (CQ) associated with the work queue.<\/p>\n<p style=\"text-align: center\">\u00a0<a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePair_completionQueue.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-3841\" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_queuePair_completionQueue-1024x370.png\" alt=\"infiniband_queuePair_completionQueue\" width=\"500\" height=\"162\" \/><\/a><\/p>\n<p style=\"text-align: justify\">To define what address in memory to write to or read from, <i>Scatter\/Gather Elements<\/i> (SGE) are used &#8211; and associated with a WR. An SGE is a pointer to a <i>Memory Region<\/i> (MR) which the HCA can read from or write to. A memory region is a contiguous set of memory buffers that has been registered with an HCA. Registration of a MR causes the operating system to provide the HCA with the virtual-to-physical mapping of that region and pin the memory (prohibit swapping it out in virtual memory operations). Memory registration also creates objects called <i>L_Key<\/i> and <i>R_Key<\/i> which need to be used &#8211; for authentication &#8211; when accessing MRs. With the L_Key (local Key) one can access local MRs. The R_Key (remote Key) can be sent to peers so they can directly access a local MR (RDMA Write, RDMA Read). A MR in turn is part of a <em>Protection Domain<\/em> (PD). PDs effectively glue QPs to memory regions and can be seen as a an aggregating entity. Both QPs and MRs must be defined in the context of a PD.<\/p>\n<dl id=\"attachment_3847\" class=\"wp-caption aligncenter\" style=\"width: 510px\">\n<dt class=\"wp-caption-dt\"><a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_wr_sge_mr_pd.png\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-3847 \" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_wr_sge_mr_pd-1024x697.png\" alt=\"Relation of Work Requests, Scatter\/Gather Elements, Memory, Memory Regions and Protection Domain\" width=\"500\" height=\"341\" srcset=\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_wr_sge_mr_pd-1024x697.png 1024w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_wr_sge_mr_pd-300x204.png 300w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_wr_sge_mr_pd-440x300.png 440w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/a><\/dt>\n<dd class=\"wp-caption-dd\">Relation of Work Requests, Scatter\/Gather Elements, Memory, Memory Regions and Protection Domain<\/dd>\n<\/dl>\n<p style=\"text-align: justify\">By now you should be quite fed up with all those new abbreviations. But especially when programming with the <i>ibverbs<\/i> library, it is more than helpful knowing these abbreviations. Therefore here a short recap and clearer overview of those InfiniBand concepts needed for communication.<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td width=\"35\">\n<p style=\"text-align: left\"><b>Abbr.<\/b><\/p>\n<\/td>\n<td width=\"165\"><b>Name<\/b><\/td>\n<td width=\"371\"><b>Function<\/b><\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">PD<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Protection Domain<\/p>\n<\/td>\n<td width=\"371\">Glues queue pairs and memory regions<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">MR<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Memory Region<\/p>\n<\/td>\n<td width=\"371\">Registered memory region that HCA can read from or write to. Contains R_Key and L_Key<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">QP<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Queue Pair<\/p>\n<\/td>\n<td width=\"371\">Send \/ Receive work queue. Send or receive work requests are placed onto a queue pair<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">CQ<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Completion Queue<\/p>\n<\/td>\n<td width=\"371\">Completion Queue. Completed work requests, so called work completions are placed onto a completion queue. Is associated with queue pair.<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">WR<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Work Request<\/p>\n<\/td>\n<td width=\"371\">Either send or receive work request. Specifies action to be processed and will be put onto send or receive queue (QP). References scatter\/gather element<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">SGE<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Scatter\/Gather Element<\/p>\n<\/td>\n<td width=\"371\">Defines address(es) in memory to read from or to write to. Must be given L_Key or R_Key to authenticate access to memory region<\/td>\n<\/tr>\n<tr>\n<td width=\"35\">\n<p align=\"center\">WC<\/p>\n<\/td>\n<td width=\"165\">\n<p style=\"text-align: left\" align=\"center\">\u00a0Work Completion<\/p>\n<\/td>\n<td width=\"371\">After a work request has been completed the work completion delivers result<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Simple IB verbs RDMA program<\/h2>\n<p style=\"text-align: justify\">The program &#8211; simply called <i>rdma<\/i> &#8211; described in this section is mainly based on the source code of the \u2018ib_rdma_bw\u2019 application. This application is part of the <i>perftest<\/i> package, available for various Linux distributions. The link to the source-code file can be found at the end of this blogpost. The code in the example program has been greatly simplified and stripped down. \u00a0Almost all the functions were renamed, some functions were put together and lots of code was just removed. Depending on the argument passed to the example you either are the server\/sender or the client\/receiver. At the moment the client connects to a server and then the server writes a string directly into a local buffer of the client which displays it. The source code of the example program can be downloaded at the end of this blogpost.<\/p>\n<p style=\"text-align: justify\">First a simplified description of what happens in the program. Most points are identical for the server and the client.<\/p>\n<ol>\n<li><strong>Initialize InfiniBand Context (Structures needed for communication and memory)<\/strong>\n<ol>\n<li>Get and open InfiniBand device. This will give you a \u2018context\u2019 which is used to create all the following structures<\/li>\n<li>Allocate a Protection Domain<\/li>\n<li>Register a Memory Region<\/li>\n<li>Create a Send and a Receive Completion Queue<\/li>\n<li>Create a Queue Pair<\/li>\n<\/ol>\n<\/li>\n<li><strong>Initialize the Queue Pair (change QP status to INIT)<\/strong><\/li>\n<li><strong>Exchange information to later be able to communicate with peer <strong>via IB<\/strong>.<\/strong> This is done via TCP in this example. Another possibility would be to use the RDMA Connection Manager which would need IPoIB enabled hosts. The following information is exchanged\n<ol>\n<li>LID &#8211; Local Identifier, 16 bit addr. assigned to end nodes by subnet manager<\/li>\n<li>QPN &#8211; Queue Pair Number, identifier assigned to QP by HCA<\/li>\n<li>PSN \u2013 Packet Sequence Number, used by HCA to verify correct order of packages \/ detect package loss<\/li>\n<li>R_Key<\/li>\n<li>VADDR, address of memory region for peer to write into<\/li>\n<\/ol>\n<\/li>\n<li><strong>Change the QP status to Ready to Receive (RTR)<\/strong><\/li>\n<li><b>* ONLY SERVER *<\/b><strong> &#8211; Change the QP status to Ready to Send (RTS)<\/strong><\/li>\n<li><strong>Perform RDMA write<\/strong>\n<ol>\n<li>Define memory region to read from with scatter\/gather element (SGE)<\/li>\n<li>Use work request to define where to write to<\/li>\n<li>RDMA write into buffer of client\/receiver<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p style=\"text-align: justify\">The following diagram shows you the flow of the program. Function names are written in bold text and were arbitrarily chosen by me. Just below the function name is a short description of what the function does. The red text marks used IB_verbs.<\/p>\n<p style=\"text-align: center\"><a href=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/ib_rdma_simple_app_flow_sender_receiver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter  wp-image-3883\" src=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/ib_rdma_simple_app_flow_sender_receiver.png\" alt=\"ib_rdma_simple_app_flow_sender_receiver\" width=\"527\" height=\"1024\" srcset=\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/ib_rdma_simple_app_flow_sender_receiver.png 3347w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/ib_rdma_simple_app_flow_sender_receiver-154x300.png 154w, https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/ib_rdma_simple_app_flow_sender_receiver-527x1024.png 527w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/a><\/p>\n<p style=\"text-align: justify\">The program is far from being finished. At the moment you cannot pass a buffer to it, choose an IB port number or define the size of the buffer. The client does also \u00a0not get notified when the RDMA write from the server has been completed (flow control). This additional functionality will be added in the next steps.<\/p>\n<h1>Source Code<\/h1>\n<h2><strong>Example program \u2018rdma\u2019<\/strong><\/h2>\n<ul>\n<li><a href=\"https:\/\/docs.google.com\/file\/d\/0BwIlDCK5qxPSMU1WQTBxcEJrU2s\" target=\"_blank\">rdma.c<\/a><\/li>\n<li><a href=\"https:\/\/docs.google.com\/file\/d\/0BwIlDCK5qxPScV9uSlhlbk5kMFE\" target=\"_blank\">Makefile<\/a><\/li>\n<\/ul>\n<h2><strong>Perftest application \u2018ib_rdma_bw\u2019<\/strong><\/h2>\n<ul>\n<li><a href=\"http:\/\/packages.ubuntu.com\/precise\/perftest\" target=\"_blank\">Ubuntu &#8216;perftest&#8217; Package\u00a0<\/a><\/li>\n<\/ul>\n<h1 style=\"text-align: justify\">Links<\/h1>\n<ul>\n<li><a title=\"Dissecting a Small InfiniBand Appliation Using the Verbs API\" href=\"http:\/\/arxiv.org\/pdf\/1105.1827.pdf\" target=\"_blank\">Dissecting a Small InfiniBand Appliation Using the Verbs API<\/a><\/li>\n<li><a title=\"An Introduction to the InfiniBand Architecture\" href=\"http:\/\/gridbus.csse.unimelb.edu.au\/~raj\/superstorage\/chap42.pdf\" target=\"_blank\">An Introduction to the InfiniBand Architecture<\/a><\/li>\n<li><a title=\"Introduction to InfiniBand for End Users\" href=\"https:\/\/cw.infinibandta.org\/document\/dl\/7268\" target=\"_blank\">Introduction to InfiniBand for End Users<\/a><\/li>\n<li><a title=\"RDMA tutorials PDF from \u2018THE GEEK IN THE CORNER\u2018 \" href=\"http:\/\/thegeekinthecorner.wordpress.com\/2013\/02\/02\/rdma-tutorial-pdfs\/\" target=\"_blank\">RDMA tutorials PDF from \u2018THE GEEK IN THE CORNER\u2018\u00a0<\/a><\/li>\n<li><a title=\"InfiniBand HowTo: Install and configure OFED IB\" href=\"http:\/\/pkg-ofed.alioth.debian.org\/howto\/infiniband-howto.html#toc5\" target=\"_blank\">InfiniBand HowTo: Install and configure OFED IB<\/a><\/li>\n<li><a title=\"RDMA Aware Networks Programming User Manual (Glossary is very useful)\" href=\"http:\/\/www.mellanox.com\/related-docs\/prod_software\/RDMA_Aware_Programming_user_manual.pdf\" target=\"_blank\">RDMA Aware Networks Programming User Manual (Glossary is very useful)<\/a><\/li>\n<li><a title=\"InfiniBand Specification\" href=\"http:\/\/www.infinibandta.org\/content\/pages.php?pg=technology_download\" target=\"_blank\">InfiniBand Specification<\/a><\/li>\n<\/ul>\n<h1>Related Blog Posts<\/h1>\n<ul>\n<li>Next:\u00a0<a href=\"http:\/\/blog.zhaw.ch\/icclab\/kiara-infiniband-functionality-overview\/\">Overview of KIARA InfiniBand Functionality<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2><\/h2>\n<div class=\"pt-sm\">Schlagw\u00f6rter: <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/ib-verbs\/\">IB verbs<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/infiniband\/\">InfiniBand<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/infiniband-basics\/\">InfiniBand Basics<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/infiniband-introduction\/\">InfiniBand Introduction<\/a>, <a href=\"https:\/\/blog.zhaw.ch\/icclab\/tag\/rdma\/\">RDMA<\/a><br><\/div>","protected":false},"excerpt":{"rendered":"<p>This blogpost aims to give you a short introduction to InfiniBand. At the end you should have a rough overview over the technology, much of its terminology and on how to program a very simple RDMA application with IB verbs.<\/p>\n<p>The first part explains the basic characteristics\/properties of the InfiniBand technology and the physical parts that a network consists of. The second part takes a closer look at the logical parts of the technology that are needed for communication. In the third and last part I\u2019ll explain the structure of a simple IB verbs application.<\/p>\n","protected":false},"author":80,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[5],"tags":[183,187,188,189,278],"features":[],"class_list":["post-3826","post","type-post","status-publish","format-standard","hentry","category-articles","tag-ib-verbs","tag-infiniband","tag-infiniband-basics","tag-infiniband-introduction","tag-rdma"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>InfiniBand: An Introduction + Simple IB verbs program with RDMA Write - Service Engineering (ICCLab &amp; SPLab)<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write\" \/>\n<meta property=\"og:description\" content=\"This blogpost aims to give you a short introduction to InfiniBand. At the end you should have a rough overview over the technology, much of its terminology and on how to program a very simple RDMA application with IB verbs.  The first part explains the basic characteristics\/properties of the InfiniBand technology and the physical parts that a network consists of. The second part takes a closer look at the logical parts of the technology that are needed for communication. In the third and last part I\u2019ll explain the structure of a simple IB verbs application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\" \/>\n<meta property=\"og:site_name\" content=\"Service Engineering (ICCLab &amp; SPLab)\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-22T15:34:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-08-05T14:10:05+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png\" \/>\n<meta name=\"author\" content=\"Sandro Brunner\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sandro Brunner\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\"},\"author\":{\"name\":\"Sandro Brunner\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05\"},\"headline\":\"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write\",\"datePublished\":\"2013-11-22T15:34:25+00:00\",\"dateModified\":\"2014-08-05T14:10:05+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\"},\"wordCount\":1555,\"commentCount\":10,\"image\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png\",\"keywords\":[\"IB verbs\",\"InfiniBand\",\"InfiniBand Basics\",\"InfiniBand Introduction\",\"RDMA\"],\"articleSection\":[\"Articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\",\"name\":\"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write - Service Engineering (ICCLab &amp; SPLab)\",\"isPartOf\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage\"},\"thumbnailUrl\":\"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png\",\"datePublished\":\"2013-11-22T15:34:25+00:00\",\"dateModified\":\"2014-08-05T14:10:05+00:00\",\"author\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet.png\",\"contentUrl\":\"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet.png\",\"width\":4018,\"height\":3906,\"caption\":\"InfiniBand Subnet\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\/\/blog.zhaw.ch\/icclab\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#website\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/\",\"name\":\"Service Engineering (ICCLab &amp; SPLab)\",\"description\":\"A Blog of the ZHAW Zurich University of Applied Sciences\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05\",\"name\":\"Sandro Brunner\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg\",\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg\",\"contentUrl\":\"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg\",\"caption\":\"Sandro Brunner\"},\"url\":\"https:\/\/blog.zhaw.ch\/icclab\/author\/brnr\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write - Service Engineering (ICCLab &amp; SPLab)","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/","og_locale":"en_US","og_type":"article","og_title":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write","og_description":"This blogpost aims to give you a short introduction to InfiniBand. At the end you should have a rough overview over the technology, much of its terminology and on how to program a very simple RDMA application with IB verbs.  The first part explains the basic characteristics\/properties of the InfiniBand technology and the physical parts that a network consists of. The second part takes a closer look at the logical parts of the technology that are needed for communication. In the third and last part I\u2019ll explain the structure of a simple IB verbs application.","og_url":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/","og_site_name":"Service Engineering (ICCLab &amp; SPLab)","article_published_time":"2013-11-22T15:34:25+00:00","article_modified_time":"2014-08-05T14:10:05+00:00","og_image":[{"url":"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png","type":"","width":"","height":""}],"author":"Sandro Brunner","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Sandro Brunner","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#article","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/"},"author":{"name":"Sandro Brunner","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05"},"headline":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write","datePublished":"2013-11-22T15:34:25+00:00","dateModified":"2014-08-05T14:10:05+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/"},"wordCount":1555,"commentCount":10,"image":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png","keywords":["IB verbs","InfiniBand","InfiniBand Basics","InfiniBand Introduction","RDMA"],"articleSection":["Articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/","url":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/","name":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write - Service Engineering (ICCLab &amp; SPLab)","isPartOf":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage"},"image":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage"},"thumbnailUrl":"http:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet-1024x995.png","datePublished":"2013-11-22T15:34:25+00:00","dateModified":"2014-08-05T14:10:05+00:00","author":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05"},"breadcrumb":{"@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#primaryimage","url":"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet.png","contentUrl":"https:\/\/blog.zhaw.ch\/icclab\/files\/2013\/11\/infiniband_subnet.png","width":4018,"height":3906,"caption":"InfiniBand Subnet"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.zhaw.ch\/icclab\/infiniband-an-introduction-simple-ib-verbs-program-with-rdma-write\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/blog.zhaw.ch\/icclab\/"},{"@type":"ListItem","position":2,"name":"InfiniBand: An Introduction + Simple IB verbs program with RDMA Write"}]},{"@type":"WebSite","@id":"https:\/\/blog.zhaw.ch\/icclab\/#website","url":"https:\/\/blog.zhaw.ch\/icclab\/","name":"Service Engineering (ICCLab &amp; SPLab)","description":"A Blog of the ZHAW Zurich University of Applied Sciences","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.zhaw.ch\/icclab\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.zhaw.ch\/icclab\/#\/schema\/person\/99f82e9c9e266cab97fb4fdcec230d05","name":"Sandro Brunner","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg","url":"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg","contentUrl":"https:\/\/blog.zhaw.ch\/icclab\/files\/2014\/03\/IMG_0234.jpg","caption":"Sandro Brunner"},"url":"https:\/\/blog.zhaw.ch\/icclab\/author\/brnr\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/3826","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/users\/80"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/comments?post=3826"}],"version-history":[{"count":9,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/3826\/revisions"}],"predecessor-version":[{"id":12856,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/posts\/3826\/revisions\/12856"}],"wp:attachment":[{"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/media?parent=3826"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/categories?post=3826"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/tags?post=3826"},{"taxonomy":"features","embeddable":true,"href":"https:\/\/blog.zhaw.ch\/icclab\/wp-json\/wp\/v2\/features?post=3826"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}