ACM
      • 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
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners 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 No publishing access yet

      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.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      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 New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Help
Menu
Options
Engagement control Make a copy 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
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners 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 No publishing access yet

    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.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    --- title: Infiniband foundation tags: APAC HPC-AI competition, training --- # Infiniband Foundation training [TOC] ## Why InfiniBAND? Keys to success: - Low latency - Simplified Management - High throughput ## Feature - High BandWidth - High Scalability - easy scaling for data centers with great flexiblity - enables a single subnet to scale of up to **48,000** managed nodes (nodes in a single subnet) - Quality of Service(QoS) - is the ability to provide different priority to different: - applications - Users - Data Flows - QoS implementation can be achieved by: - Defining I/O channels at the adapter level - Defining Virtual Lanes at the link level - Qos allows control of congestion on the netwirk - CPU offloads - taking CPU's work and done by other element in infiniband environment. - supports packet transportation with minimal CPU intervention - RDMA support - kernel bypass - Hardware-based transport protocol - Low Latency - 1 microsecond(good number for latency :+1:) - Simplified Management - SM(Subnet Manager) -> a program that runs and manages the fabric - Any IFB has its own single(master) SM - the SM makes the fabric management simple - plug & play end nodes environment - centralized route manager ## Fabric components - Switch - SM - Host/Server - Channel Adapter - Gateway/Bridge - to get information or data from IB to Ethernet - Router infiniband link: any connection that speaks infiniband protocol. ## Infiniband Architecture and Management ### Infiniband Network Stack - InfiniBand uses a multi-layer processing stack to transfer data between nodes - CPU offloads functions - Offers greater adaptability through a variety of services and protocols router's job: to connect between defferent infiniband subnet. ![](https://i.imgur.com/65MfM6Y.png) ### IB architecture layers - Upper Layer Protocols(I/O Controller) - Transport(Message(QP)) - Network(Inter Subnet Routing(GRH)) - Link(Link Encoding(LRH) -> Media Access Control) - Physical Layer(End Node) Open fabric enhances destribution (OFED) ### Each layer(Functions/Protocols/Devices): - Provides services to the layer above - Issues service requests to the layer below ### Data packet structure ![](https://i.imgur.com/hk4VjJ9.png) > GRH: Global Routing Header > LRH: Local Routing Header > CRC: a police man to check if the data is correct (addtional data) ### Subnet Manager - The Subnet Manager (SM) is responsible for - Managing all the elements in the fabric - Discovering the topology - Assigning LIDs to devices - Local Identifier(LID) - Calculating and programming switch forwarding tables - how many exits, how many rows - Monitoring changes in subnet(all the time) - instead of going dead way - and to deal with traffic - The SM can be implemented on any node in the fabric(or server) - Only **one** master SM is allowed in a subnet ### The Switch IC - IC (Integrated Circuit) – Switch ASIC - EDR switches: - Switches that contain up to 36 ports (as for today) have 1 IC - Switches that contain more than 36 ports have several ICs - HDR switches: - Switches that contain up to 40 ports (as for today) have 1 IC - In this Example – 72 ports switch, using 6 identical ASICs ![](https://i.imgur.com/Ynhpv5C.png) > never say never >![](https://i.imgur.com/VBXBDpg.png) >switches would be stucked in such scenario, of trying to connect nodes within the same > ### Fabric Addressing - GUIDs - GUID (Globally Unique Identifier) is a 64-bit unique address that is burned onto the hardware by the vendor - The GUID is persistent through reboots - Three types of GUIDs: - Node GUID - Port GUID - System Image GUID - Switches that belong to the same chassis have the same System Image GUID ### Layer 2 addressing - LIDs - LID (Local Identifier) is a 16-bit Layer 2 address - LIDs are assigned by the Subnet Manager when a node becomes active - HCAs are assigned with a LID per port - Switches - 1 IC switches are assigned with a single LID - Director switches are assigned with a LID per switch module in the chassis **IB command**: provides dozen of command, some of them provide information about link, nodes or whole network. very user friendly. (eg. ibstat) ![](https://i.imgur.com/mpnshyz.png) > Mellanox is the maker of this hardware, each card is equiped with VPi, which could be used in both Infiniband network and Ethernet. ### Layer 3 Addressing - GID - GID (Global Identifier) is a 128-bit field in the Global Routing Header (GRH) used to identify a single end port or a multicast group - GIDs are globally unique (across multiple subnets) - GID’s structure: - Based on the a subnet prefix (a 64-bit identifier) combined with the Port GUID - IPv6 type address - Each HCA port is automatically assigned with a default GID that can be used only in the local subnet ![](https://i.imgur.com/nUNZpnH.png) > layer3 addressing include 2 part: Subnet prefix and GUID > prefix: to work with multiple subnet. > --- ### Fabric Segmentation - Partitions - A partition describes a set of end nodes within the fabric that may communicate - When is port is assigned to a partition its membership type can be set to: - Full membership –> can communicate with any other node in the partition - Limited membership -> can communicate only with nodes in full membership in the partition - Nodes may be members of multiple partitions at once - PKEY – is a field in the BTH header used to determine membership in a partition ![](https://i.imgur.com/Hw4K81U.png) --- ## InfiniBand Architecture The Physical Layer ### Virtual Lanes - Virtual Lanes provide a mechanism for creating multiple virtual links within a single physical link - VLs are used to implement QoS: - Different packets are mapped to different virtual lanes - Each VL is configured with a weight and a priority - Each VL uses different buffers - IB specification allows 16 possible VLs - VL15–usedformanagementtrafficonly - VLs 0-14 – used for data traffic (VLs 0-7 are currently supported by Mellanox switches) ![](https://i.imgur.com/5Mh8nTz.png) > - SMP: subnet manager packet > - VL-15, why so many virtual lanes? well.. it's quite theroretical, that they can solve traffic problem. > They may have different bandwidth and priority(virtual manager would process higher priority first) > Why do we need priority guys? Cause different applications requires different latency. --- ## InfiniBand Architecture The Link Layer ### Switching - The forwarding database of IB switches is called LFT (Linear Forwarding Table) - LFTs contain DLID to Exit port mapping, so that incoming packets are sent on the correct port - LFTs may contain SL to VL mapping which is used to implement QoS ![](https://i.imgur.com/QErwbdW.png) > define multiple VL to give diff priority ### Credit Based Flow Control > point => flow control - **We need flow control when buffer is full** and so we descipline the sender. - The credit based flow control is a mechanism that assures packets are not dropped even in the presence of congestion. - How does it work? - Link receivers grant to senders the receive buffer space credits - Flow control credits are issued in 64-byte units - Separate flow control per VL is provided so that congestion and latency on one VL does not impact traffic with guaranteed QoS on another VL even though they share the same physical link. > credit: means how many data can sender sent to receiver. > (1 credit = 1 unit of 64 bytes) ![](https://i.imgur.com/BNdKut8.png) --- ### SL to VL Example - Weight value (0-255), indicates the number of 64-byte units, which may be transmitted from that VL when its turn in the arbitration occurs. - If the High-Priority VLs don’t have an available packet for transmission a packet may be sent from the Low-Priority VLs. ![](https://i.imgur.com/y8cAy7G.png) ![](https://i.imgur.com/Ca5DD2P.png) ## InfiniBand Architecture The Transport Layer ### Transport Layer Service - The Transport Layer provides end-to-end communication services for applications - An end-to-end “virtual channel”, connecting two applications that exist in entirely separate address spaces, should be created. - The endpoints of the channel are called Queue Pairs (QPs), each QP represents one end of a channel. - QPs constitute the structure that enables applications to: - Bypass kernel during data transfer - Exchange reliable data where hardware is in charge of reliability ![](https://i.imgur.com/dQZDIeT.png) > QP number, a 24-bit identifier, would be an identification number on layer4 ### Offload Data Transfer Methods There are two predominant methods for offload data transfers: - Send / Receive operations - RDMA Operations - RDMA WRITE - RDMA READ #### Send / Receive Operation Example ![](https://i.imgur.com/rhOBMtO.png) > Complete queue: to know when the mission has completed and also reuse the buffer. #### RDMA Write Example ![](https://i.imgur.com/J854jRU.png) > No need for the receive queue on receiving side! as well as the Completion queue. > cause the responsiblity is now on a remote server. > using remote server's space like it is yours by giving a remote user a key, and let him use my memory. so save time, memory latency, making the whole proccess much more efficient. ## Vocabulary - throughput (n.) 吞吐量,總處理能力 - topology (n.) 網路架構 ## Questions - def. of subnet? - GUID(Globally Unique Identifier) & UID(Unique Identifier) & GID(Global Identifier)? - Virtual Lanes? - ## Common Icon ![](https://i.imgur.com/UNQIdUG.jpg) ### [Join the session](https://mellanox-tech.webex.com/mw3300/mywebex/default.do?service=7&main_url=%2Ftc3300%2Ftrainingcenter%2Fdefault.do%3Fsiteurl%3Dmellanox-tech%26main_url%3D%252Ftc3300%252Fe.do%253FAT%253DMI%2526%2526Host%253DQUhTSwAAAARu2zXgRncJMfCHxH6jb87T_R-w1G-gJHDTEFGquQMMHLgg2OTmaaA_amynJ2oHyZq4FCqrBpO5HAFwWkmBGNxP0%2526UID%253D0%2526MTID%253Dt46aa698f61d84d067a0e6af042a6c53a%2526siteurl%253Dmellanox-tech%2526confID%253D164290731365631758%2526ticket%253D4832534b000000046d5955870927bfd1f2a114683d77cc1ab91bdd68ca106e34caf960268c933f9e&siteurl=mellanox-tech) > Access code: 1289478916 > ``` ___====-_ _-====___ _--~~~#####// ' ` \\#####~~~--_ -~##########// 王 \\##########~-_ -############// |\^^/| \\############- _~############// (O||O) \\############~_ ~#############(( \\// ))#############~ -###############\\ (oo) //###############- -#################\\ / `' \ //#################- -###################\\/ () \//###################- _#/|##########/\######( (()) )######/\##########|\#_ |/ |#/\#/\#/\/ \#/\##| \()/ |##/\#/ \/\#/\#/\#| \| ` |/ V V ` V )|| |()| ||( V ' V /\ \| ' ` ` ` ` / | |()| | \ ' '<||> ' ( | |()| | )\ /|/ __\ |__|()|__| /__\______/|/ (vvv(vvvv)(vvvv)vvv)______|/ ```

    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
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    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