Sabrina
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    ###### tags: `HPCAI` # InfiniBand Transport & Software Interface [TOC] ## InfiniBand Transport ### [InfiniBand](https://youtu.be/fLwTpP6GKao) - 無限頻寬,縮寫IB - High-performance computing - High throughput and low latency ### The Transport Layer - **Open System Interconnection** (OSI) Model 開放式系統互聯模型![](https://i.imgur.com/22zWUOB.png) - **The transport layer** - Connection-oriented communication 連接導向式通訊 - 在傳送資料之前先建立連線 - TCP屬於連接導向式通訊 - :+1:優點:一旦建立好連線,網路流量是固定的,不會被其他通訊影響 - :-1:缺點:需要預先建立連線,資源成本較高,無法分享網路頻寬 - Reliability 可靠性 - 可以檢查資料是否損壞,並通過向傳送者傳ACK或NACK訊息確認正確接收。自動重發請求方案可用於重新傳輸遺失或損壞的資料 - In-order delivery 相同次序交付 - 網路層通常不保證封包到達順序與傳送順序相同 - Data integrity 資料完整性 - 確保資訊或資料不被未授權的篡改或在篡改後能夠被迅速發現 - Flow control/ rate control 流量控制 - 控制兩個節點之間的資料傳輸速率以阻止快速的傳送者傳輸超出接收緩衝器所能承受的資料 - congestion control 壅塞控制 - 可以控制進入到電信網路的流量 - Multiplexing (of multiple data sources) 多路復用、多工 - 埠可以在單個節點上提供多個端點 - ![](https://www.designworldonline.com/wp-content/uploads/2015/05/timediv-mult.jpg) :::danger Not all transport services provide all above ![](https://i.imgur.com/axGmySy.png) OSI定義五個級別的傳輸模式(TP0~TP4) - [Reference](https://notfalse.net/24/tcp-flow-control) ### RDMA operation - Send/ Receive - Two-sided communication - RDMA write - One-sided communication, responder is not involved - RDMA read - One-sided communication, responder is not involved - Atomic operations - One-sided communication, read-modify-write transaction ### InfiniBand transport services :::warning - **Reliable:** exactly once, in-order delivery, more slowly and with less scalability - **Unreliable** - **Connection:** one QP send/receive with exactly one QP - **Datagram:** one QP send/receive with any QP ::: - **Reliable Connection** (RC) - Queue Pair is associated with only one other QP. - Messages transmitted by the send queue of one QP are reliably delivered to receive queue of theother QP. - Packets are delivered in order. - A RC connection is very similar to a TCP connection. - **Unreliable Datagram** (UD) - A Queue Pair may transmit and receive single-packet messages to/from any other UD QP. - Ordering and delivery are not guaranteed, and delivered packets may be dropped by the receiver. - Multicast messages are supported (one to many). - A UD connection is very similar to a UDP connection. - **Unreliable Connection** (UC) - A Queue Pair is associated with only one other QP. - The connection is not reliable so packets may be lost. - Messages with errors are not retried by the transport, and error handling must be provided by a higher level protocol. - **Reliable Datagram** (RD) - Reliable transport, not-connected - First try to separate the transport from the software interface - ==Never implemented== - complicated protocol - not efficient protocol > UD doesn't support RDMA but is veryscalable. > RD doesn't scale well but supports RDMA ![](https://i.imgur.com/nWy6aRt.png =300x300) ### Reliable Connection vs. Unreliable Datagram - **Reliable Connection** (RC) - the transport of choice - Has scalability limitations - The solution: **Dynamically Connected (DC) Transport Service** :::info **Scalability可擴縮性** 是否能有效利用不斷增加的CPU ex. **search engine** - support increasing numbers of users, and the number of topics it indexes. ::: - [Reference](https://www.openfabrics.org/images/eventpresos/workshops2014/DevWorkshop/presos/Monday/pdf/05_DC_Verbs.pdf) - ***Scalable Connection-oriented Reliable*** Transport - The best of both worlds - supports RDMA, with UD like scalability (single QP for multiple destinations) - The winner is **Dynamically Connected (DC)** | |UD|UC|RC|DC| |------|:------:|:------:|:------:|:------:| |Send/Receive|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| |RDMA Write|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:| |RDMA Read/Atomic|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:| |Max Send Size|MTU|2GB|2GB|2GB| |Reliability|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:| |Scalability(per-process for N prosesses)|1|N|N|1| ### Dynamically Connected transport 1. Reduces #QPs per node 2. Supports RDMA and Atomic Operations 3. Reliable 4. Scalable: One QP services multiple destinations 5. **Connection setup** is expensive slow operation 6. Fast, inexpensive and fully offload - [Reference](https://www.openfabrics.org/images/2018workshop/presentations/303_ARosenbaum_DynamicallyConnectedTransport.pdf) #### DC Example - one requestor + two responders - User is sending: - Two messagers to responder A (SND1, SND2) - One messager to responder B (SND3) ![](https://i.imgur.com/y6BvcRz.png) >主機通道配接器(HCA)通常用於描述InfiniBand的介面卡。 :::warning Cannot be connected to more than one responder ::: ### Reliability Implementation #### Good Cases - one requestor + one responder - 不用考慮scalability -> **Reliable Connection**(RC) - PSN - Packet sequence number ![](https://i.imgur.com/pfLdHWR.png) #### Timeout - The second packet was discarded ![](https://i.imgur.com/Kqdsu8w.png =400x400) ![](https://i.imgur.com/A6O9cYh.png) #### Out of Sequence ![](https://i.imgur.com/5impBJT.png) #### Receiver Not Ready ![](https://i.imgur.com/T9BruMY.png =400x400) ## Software interfaces ### User level networking - Protocol offload: 簡化Kernel - OS Bypass - Zero copy - Vitrual Interface Architecture (VIA) - user-level zero-copy網路模型 - IB的基礎 ![](https://i.imgur.com/Ad4V4bB.png) ## A Glance Into The Future ### Network Version of Moor's Law - Increase (double) network BW every generation - Reduce (half) network latency every generation - Latency 很難再減少 :::danger But we cannot keep reducing latency Getting close to physics limitation ::: ![](https://www.infinibandta.org/wp-content/uploads/2015/12/ib-roadmap-1024x576.jpg) ### The Need for Intelligent and Faster Interconnect - Reduce the latency 10 times ![](https://i.imgur.com/xqzJruv.png) ### In-network Computing - Persistent Communication - Offload complex communication patterns - Send to multiple destinations - Receive from multiple sources - Dependencies between the operations - Define communication graph templates - E.g. Tree based reduce algorithm - Call template with parameters - Source/ destionation buffers - Buffer size ![](https://i.imgur.com/IVUjkAq.jpg) ### Make Your Network Smarter - SmartNICs becoming more dominant in the large datacenters - Programable entities within the NIC - Offload all kind of tasks - Network security - Network services(e.g. NFV) - Hypervisor functionality - Middleware functionality :::info - SmartNICs 為一個允許附加軟體的NIC,而這些附加軟體可以在購買後的某個時刻載入NIC,用於添加新功能或支援其他功能 >就像買了手機,然後從應用程式商店下載應用程式一樣 :::

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully