Yandex Cloud
Search
Discuss with expertTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
    • Cloud Interconnect
    • Cloud Backup
    • Cloud Registry
    • Yandex AI Studio
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Video
    • Stackland
    • Yandex Cloud Router
    • Yandex Managed Service for Trino
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Yandex StoreDoc
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Managed Service for YDB
    • Managed Service for Sharded PostgreSQL
    • Managed Service for YTsaurus
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • SpeechKit
    • DataSphere
    • Vision OCR
    • Translate
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Container Registry
    • Managed Service for GitLab
    • Managed Service for Prometheus®
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Message Queue
    • Serverless Integrations
    • IoT Core
    • Data Streams
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Yandex Cloud Quota Manager
    • Cloud Apps
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Compute Cloud
    • All guides
      • Creating a VM with a GPU
      • Installing NVIDIA drivers
      • NVIDIA driver update guide
      • Enabling MIG on a VM with a GPU
      • Managing maintenance of GPU VMs
        • Creating a GPU cluster
        • Adding a VM to a GPU cluster
        • Updating a GPU cluster
        • Getting GPU cluster info
        • Configuring GPU cluster access permissions
        • Deleting a GPU cluster
        • Testing a GPU cluster physical state
        • Running parallel tasks in a GPU cluster
        • Testing InfiniBand throughput
    • Viewing operations with resources
    • Viewing metrics Monitoring
  • Yandex Container Solution
  • Access management
  • Pricing policy
  • Terraform reference
  • Metrics Monitoring
  • Audit Trails events
  • Release notes
  1. Step-by-step guides
  2. GPU
  3. GPU clusters
  4. Testing InfiniBand throughput

Testing InfiniBand throughput

Written by
Yandex Cloud
Updated at July 31, 2026
View in Markdown
  1. Connect to the VM over SSH.

  2. Install tools for testing:

    sudo apt update
    sudo apt install perftest numactl
    
  3. Create a file named /etc/security/limits.d/limits.conf with the following contents:

    * soft memlock unlimited
    * hard memlock unlimited
    
  4. Log out and log back in or reboot the machine to apply the changes. Check the limit using this command:

    ulimit -l
    

    The result should be unlimited.

  5. Create a file named infiniband_test.sh with the following contents:

    #!/bin/bash
    set -eu
    
    # Testing the memlock limit
    echo "Current memlock limit:"
    ulimit -l
    if [[ $(ulimit -l) != "unlimited" ]]; then
       echo "Memlock limit is not unlimited."
       echo "Create a file named /etc/security/limits.d/limits.conf with the following content:"
       echo "* soft memlock unlimited"
       echo "* hard memlock unlimited"
       exit 1
    fi
    
    # Cleanup funciton: Terminate all ib_write_bw processes upon script completion
    clean() {
       killall -9 ib_write_bw &>/dev/null
    }
    trap clean EXIT
    
    # Test parameters
    size=33554432  # Block size in bytes
    iters=10000    # Number of iterations
    q=1
    
    # Specify CPU numbers and network device names for different NUMA nodes
    # Here is an example:
    numa0_cpu=40      # Client CPU (NUMA node 0)
    numa1_cpu=130     # Server CPU (NUMA node 1)
    numa0_net=mlx5_0  # Network interface for the client
    numa1_net=mlx5_7  # Network interface for the server
    
    # Start the server on NUMA node 1
    numactl -C $numa1_cpu --membind 1 /usr/bin/ib_write_bw --ib-dev=$numa1_net --report_gbits -s $size  --iters $iters -q $q &>/dev/null &
    sleep 1
    
    # Start the client on NUMA node 0 with high priority
    nice -20 numactl -C $numa0_cpu  --membind 0 /usr/bin/ib_write_bw --ib-dev=$numa0_net --report_gbits -s $size --iters $iters -q $q localhost &
    wait
    
  6. Make the script executable:

    chmod +x infiniband_test.sh
    
  7. Run the script:

    ./infiniband_test.sh
    

    Result:

    ---------------------------------------------------------------------------------------
    #bytes     #iterations    BW peak[Gb/sec]    BW average[Gb/sec]   MsgRate[Mpps]
    33554432    10000            394.58             394.40                    0.001469
    ---------------------------------------------------------------------------------------
    

Useful linksUseful links

Questions about GPUs

Was the article helpful?

Previous
Running parallel tasks in a GPU cluster
Next
Creating an empty disk
© 2026 Direct Cursus Technology L.L.C.