Tüm Ürünler
Search
Belge Merkezi

Elastic Compute Service:Test instance network performance

Son Güncelleme:Sep 30, 2026

ECS örneklerinin paket iletim hızını (PPS), ağ bant genişliğini ve ağ gecikme süresini test etmek için Netperf ve sockperf kullanın.

Önemli
  • Veri kaybını önlemek için ağ performansını veri içermeyen yeni ECS örneklerinde test edin.

  • Örnek türü ölçümleri bir test ortamında doğrulanır. Gerçek performans, örnek yükü ve ağ modeli gibi faktörlere bağlı olarak değişebilir.

Önkoşullar

Hazırlıklar

  • Test için ECS örnekleri oluşturun. Bkz. ECS örneklerini özel olarak başlatma.

    Önemli

    Doğru ve karşılaştırılabilir test sonuçları elde etmek için aynı örnek türündeki örnekleri kullanın.

  • Tüm test örneklerinin aynı Virtual Private Cloud (VPC) içinde olduğundan, aynı vSwitch'e bağlı olduğundan ve aynı güvenlik grubunda bulunduğundan emin olun.

Örnek ortamlar

Aşağıdaki tablolar, test makineleri ve yardımcı test makineleri için önerilen örnek türlerini ve sayılarını listeler. Test senaryonıza göre makineleri sunucu veya istemci olarak seçin.

  • Paket iletim hızını test etme (yalnızca Linux örnekleri)

    Not

    Windows örneklerinin paket iletim hızını test etmek için kullanılabilir bir araç bulunmamaktadır.

    6.000.000 pps'den düşük paket iletim hızı

    Test öğesi

    Test makinesi

    Yardımcı test makinesi

    Örnek türü

    ecs.g7.large

    ecs.g7.large

    Görüntü

    Alibaba Cloud Linux 3

    Alibaba Cloud Linux 3

    Örnek sayısı

    1

    1

    Ağ

    Genel IP adresleri atanmıştır.

    6.000.000 pps'den yüksek ve 20.000.000 pps'den düşük paket iletim hızı

    Test öğesi

    Test makinesi

    Yardımcı test makinesi

    Örnek türü

    ecs.g7.16xlarge

    ecs.g7.16xlarge

    Görüntü

    Alibaba Cloud Linux 3

    Alibaba Cloud Linux 3

    Örnek sayısı

    1

    3

    Ağ

    Genel IP adresleri atanmıştır.

    20.000.000 pps'den yüksek paket iletim hızı

    Test öğesi

    Test makinesi

    Yardımcı test makinesi

    Örnek türü

    ecs.g7.32xlarge

    ecs.g7.32xlarge

    Görüntü

    Alibaba Cloud Linux 3

    Alibaba Cloud Linux 3

    Örnek sayısı

    1

    3

    Ağ

    Genel IP adresleri atanmıştır.

  • Ağ bant genişliğini ve gecikme süresini test etme

    Linux örneği

    Test öğesi

    Test makinesi

    Yardımcı test makinesi

    Örnek türü

    ecs.g7.large

    ecs.g7.large

    Görüntü

    Alibaba Cloud Linux 3

    Alibaba Cloud Linux 3

    Örnek sayısı

    1

    1

    Ağ

    Genel IP adresleri atanmıştır.

    Windows örneği

    Test öğesi

    Test makinesi

    Yardımcı test makinesi

    Örnek türü

    ecs.g7.large

    ecs.g7.large

    Görüntü

    Windows Server 2022

    Windows Server 2022

    Örnek sayısı

    1

    1

    Ağ

    Genel IP adresleri atanmıştır.

Yordam

Paket iletim hızını test etme (yalnızca Linux)

Not

Windows örneklerinin paket iletim hızını test etmek için kullanılabilir bir araç bulunmamaktadır.

6.000.000 pps'den düşük paket iletim hızı

  1. Test makinesine ve yardımcı test makinelerine bağlanın. Bkz. Workbench kullanarak bir Linux örneğinde oturum açma.

  2. Her iki makinede de Netperf kurulum paketini indirin:

    wget https://benchmark-packages.oss-cn-qingdao.aliyuncs.com/netperf-2.7.0.tar.gz
  3. Her iki makinede de Netperf ve sar yükleyin.

    1. Netperf kurulum paketini ayıklayın:

      sudo yum install -y gcc autoconf automake libtool sysstat
      tar -zxvf netperf-2.7.0.tar.gz
    2. GNU Compiler Collection (GCC) sürüm numarasını sorgulayın.

      gcc -v 2>&1
    3. Makinelerin herhangi birinde GCC V10'dan sonraki bir sürüm ise GCC derlemesinin doğru çalışmasını sağlamak için aşağıdaki işlemleri uygulayın. Aksi takdirde bu adımı atlayın.

      1. nettest_omni.c dosyasını açın.

        cd netperf
        vim src/nettest_omni.c
      2. Ekleme moduna girmek için i tuşuna basın ve nettest_omni.c dosyasından aşağıdaki bildirilen değişkenleri silin:

        /* different options for the sockets        */
        
        int
          loc_nodelay,    /* don't/do use NODELAY  locally    */
          rem_nodelay,    /* don't/do use NODELAY remotely  */
          loc_sndavoid,    /* avoid send copies locally    */
          loc_rcvavoid,    /* avoid recv copies locally    */
          rem_sndavoid,    /* avoid send copies remotely    */
          rem_rcvavoid;   /* avoid recv_copies remotely    */
      3. Esc tuşuna basın, :wq girin ve dosyayı kaydedip kapatmak için Enter tuşuna basın.

    4. Netperf ve sar yükleyin.

      cd netperf
      sudo ./configure
      sudo make && sudo make install
  4. Test makinesinde 64 netserver hizmeti başlatın:

    #!/bin/bash
    for j in `seq 64`; do
        netserver -p $[16000+j] > server_$[16000+j].netperf > /dev/null 2>&1  &
    done
  5. Test makinesinin özel IP adresini sorgulayın:

    ifconfig || ip addr

    image.png

  6. Yardımcı test makinesinde test makinesine trafik gönderin:

    #!/bin/bash
    server_ip=<Private IP address of the test machine>
    for j in `seq 64`; do
        port=$[16000+j]
        netperf -H ${server_ip} -l ${run_time:-300} -t UDP_STREAM  -p $port  -- -m 1 -D > /dev/null 2>&1 &
    done

    <Private IP address of the test machine> ifadesini önceki adımda elde edilen gerçek özel IP adresiyle değiştirin.

    image.png

  7. Test makinesinde paket iletim hızını test edin:

    sar -n DEV 1

    rxpck/s sütununu kontrol edin. rxpck/s değeri saniye başına alınan paketleri gösterir. Bu örnekte değer yaklaşık 940.000'dir.

    image.png

6.000.000 pps'den yüksek ve 20.000.000 pps'den düşük paket iletim hızı

  1. Test makinesine ve yardımcı test makinelerine bağlanın. Bkz. Workbench kullanarak bir Linux örneğinde oturum açma.

  2. Dört makinenin tamamında (üç yardımcı + bir test) sockperf yükleyin:

    sudo yum install -y autoconf automake libtool gcc-c++
    cd /opt
    sudo wget https://github.com/Mellanox/sockperf/archive/refs/tags/3.8.tar.gz
    sudo tar -zxf 3.8.tar.gz
    cd sockperf-3.8/
    sudo ./autogen.sh
    sudo ./configure
    sudo make -j `cat /proc/cpuinfo| grep process | wc -l`
    sudo make install
  3. Test makinesinin özel IP adresini sorgulayın:

    ifconfig || ip addr

    image.png

  4. Her bir yardımcı test makinesinde test makinesine trafik gönderin:

    server_ip="<Private IP address of the test machine>"
    threads=64
    msg_size=14
    run_time=60
    
    basePort=6666
    for((i=0;i<$threads;++i));do
        nohup sockperf tp -i $server_ip --pps max -m ${msg_size} -t ${run_time} --port $[${basePort}+${i}] 2>&1 &
    done

    <Private IP address of the test machine> ifadesini gerçek değerle değiştirin. run_time parametresi trafik süresini belirtir.

  5. Dört makinenin tamamında paket iletim hızını test edin:

    sar -n DEV 1

    Test makinesindeki rxpck/s sütununu kontrol edin. rxpck/s değeri saniye başına alınan paketleri gösterir. Bu örnekte değer yaklaşık 12.000.000 pps'dir.Received packets

20.000.000 pps'den yüksek paket iletim hızı

  1. Test makinesine ve yardımcı test makinelerine bağlanın. Bkz. Workbench kullanarak bir Linux örneğinde oturum açma.

  2. Dört makinenin tamamında (üç yardımcı + bir test) sockperf yükleyin:

    sudo yum install -y autoconf automake libtool gcc-c++
    cd /opt
    sudo wget https://github.com/Mellanox/sockperf/archive/refs/tags/3.8.tar.gz
    sudo tar -zxf 3.8.tar.gz
    cd sockperf-3.8/
    sudo ./autogen.sh
    sudo ./configure
    sudo make -j `cat /proc/cpuinfo| grep process | wc -l`
    sudo make install
  3. Test makinesinde kesme isteklerini (IRQ'ler) CPU çekirdeklerine bağlayın.

    IRQ'lerin belirli CPU çekirdeklerine bağlanması bağlam anahtarlamasını azaltır ve yüksek PPS değerlerinde paket işleme verimliliğini artırır.

    a=$(cat /proc/interrupts | grep virtio2-input | awk -F ':' '{print $1}')
    cpu=0
    for irq in $a; do
        echo $cpu >/proc/irq/$irq/smp_affinity_list
        let cpu+=2
    done
  4. Test makinesinin özel IP adresini sorgulayın:

    ifconfig || ip addr

    image.png

  5. Her bir yardımcı test makinesinde test makinesine trafik gönderin:

    server_ip="<Private IP address of the test machine>"
    threads=64
    msg_size=14
    run_time=60
    
    basePort=6666
    for((i=0;i<$threads;++i));do
        nohup sockperf tp -i $server_ip --pps max -m ${msg_size} -t ${run_time} --port $[${basePort}+${i}] 2>&1 &
    done

    <Private IP address of the test machine> ifadesini gerçek değerle değiştirin. run_time parametresi trafik süresini belirtir.

  6. Dört makinenin tamamında paket iletim hızını test edin:

    sar -n DEV 1

    Test makinesindeki rxpck/s sütununu kontrol edin. rxpck/s değeri saniye başına alınan paketleri gösterir. Bu örnekte değer yaklaşık 20.000.000 pps'dir.24 million PPS

Ağ bant genişliğini test etme

Linux örneği

  1. Test makinesine ve yardımcı test makinesine bağlanın. Bkz. Workbench kullanarak bir Linux örneğinde oturum açma.

  2. Her iki makinede de Netperf kurulum paketini indirin:

    wget https://benchmark-packages.oss-cn-qingdao.aliyuncs.com/netperf-2.7.0.tar.gz
  3. Her iki makinede de Netperf ve sar yükleyin.

    1. Netperf kurulum paketini ayıklayın.

      sudo yum install -y gcc autoconf automake libtool sysstat
      tar -zxvf netperf-2.7.0.tar.gz
    2. GCC sürüm numarasını sorgulayın.

      gcc -v 2>&1
    3. Makinelerin herhangi birinde GCC V10'dan sonraki bir sürüm ise GCC derlemesinin doğru çalışmasını sağlamak için aşağıdaki işlemleri uygulayın. Aksi takdirde bu adımı atlayın.

      1. nettest_omni.c dosyasını açın.

        cd netperf
        vim src/nettest_omni.c
      2. Ekleme moduna girmek için i tuşuna basın ve nettest_omni.c dosyasından aşağıdaki bildirilen değişkenleri silin:

        /* different options for the sockets        */
        
        int
          loc_nodelay,    /* don't/do use NODELAY  locally    */
          rem_nodelay,    /* don't/do use NODELAY remotely  */
          loc_sndavoid,    /* avoid send copies locally    */
          loc_rcvavoid,    /* avoid recv copies locally    */
          rem_sndavoid,    /* avoid send copies remotely    */
          rem_rcvavoid;   /* avoid recv_copies remotely    */
      3. Esc tuşuna basın, :wq girin ve dosyayı kaydedip kapatmak için Enter tuşuna basın.

    4. Netperf ve sar yükleyin.

      cd netperf
      sudo ./configure
      sudo make && sudo make install
  4. Test makinesinde 64 netserver hizmeti başlatın:

    #!/bin/bash
    for j in `seq 64`; do
        netserver -p $[16000+j] > server_$[16000+j].netperf 2>&1 &
    done
  5. Test makinesinin özel IP adresini sorgulayın:

    ifconfig || ip addr
    [ecs-user@izxxx ecZ ~]$ ifconfig || ip addr
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 17.xxx.xxx.15  netmask 25xxx.0  broadcast 17.xxx.55
            inet6 fexxx38:c158  prefixlen 64  scopeid 0x20<link>
            ether 00:xxx:xxx  txqueuelen 1000  (Ethernet)
            RX packets 178595  bytes 106030163 (101.1 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 116902  bytes 70189540 (66.9 MiB)
            TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 2  bytes 140 (140.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 2  bytes 140 (140.0 B)
            TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0
  6. Yardımcı test makinesinde test makinesine trafik gönderin:

    #!/bin/bash
    server_ip=<Private IP address of the test machine>
    for j in `seq 64`; do
        port=$[16000+j]
        netperf -H ${server_ip} -l ${run_time:-300} -t TCP_STREAM -p $port -- -D > /dev/null 2>&1 & 
    done

    <Private IP address of the test machine> ifadesini önceki adımda elde edilen gerçek özel IP adresiyle değiştirin.

    #!/bin/bash
    server_ip=<Private IP address of the test machine>
    for j in `seq 64`; do
        port=$[16000+j]
        netperf -H ${server_ip} -l ${run_time:-300} -t TCP_STREAM -p $port -- -D > /dev/null 2>&1 &
    done
    [1] 5100
    [2] 5101
    [3] 5102
    [4] 5103
  7. Test makinesinde ağ bant genişliğini test edin:

    sar -n DEV 1

    rxkB/s sütununu kontrol edin. rxkB/s değeri KB/sn cinsinden alınan paket boyutunu gösterir. Ağ bant genişliği değerini elde etmek için bu değeri 8 ile çarpıp Kbit/sn birimine dönüştürün.

    image.png

Windows örneği

  1. Test makinesine ve yardımcı test makinesine bağlanın. Bkz. Parola veya anahtar kullanarak bir Windows örneğine bağlanma.

  2. Her iki makinede de test araçlarını yükleyin ve güvenlik duvarını devre dışı bırakın.

    1. ntttcp.exe aracını indirin ve aracın depolandığı yolu edinin.

    2. Çalıştır iletişim kutusunu açın. powershell girin ve PowerShell'i başlatmak için Tamam'a tıklayın.

    3. Bağlantıların engellenmesini önlemek için her iki makinede de güvenlik duvarını devre dışı bırakın:

      Set-NetFirewallProfile -Profile * -Enabled:false

      Alternatif olarak, her iki makinede de NTTTCP'ye (ntttcp.exe) izin veren gelen bir güvenlik duvarı kuralı oluşturun:

      $ntttcpPath = "<Path of ntttcp.exe>"
      New-NetFirewallRule -DisplayName ntttcp -Protocol Any -Direction Inbound -Action Allow -Enabled True -Profile Any -Program $ntttcpPath
      Not

      <Path of ntttcp.exe> ifadesini gerçek değerle değiştirin.

  3. Test makinesinde ağ adaptörü için Alıcı Tarafı Ölçeklendirmesini (RSS) yapılandırın.

    RSS, alınan paketleri birden çok CPU çekirdeğine dağıtarak ağ performansını artırır. RSS kuyruklarını CPU sayısına göre ayarlayın:

    • Makinede 16'ya kadar CPU çekirdeği varsa RSS alma kuyruğu sayısını CPU çekirdeği sayısına eşit olacak şekilde ayarlayın.

    • Makinede 16'dan fazla CPU çekirdeği varsa RSS'yi devre dışı bırakın. Çoğu ağ adaptörü en fazla 16 RSS kuyruğunu desteklediğinden bu sınırın aşılması kaynakların eşit olmayan şekilde tahsis edilmesine neden olabilir.

    $cpuNum = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
    if ($cpuNum -le 16) {
      Set-NetAdapterRss -Name <Name of the network adapter on the test machine> -NumberOfReceiveQueues $cpuNum
    } else {
      Disable-NetAdapterRss -Name <Name of the network adapter on the test machine>
    }
    Not
    • <Name of the network adapter on the test machine> ifadesini gerçek değerle değiştirin. Adaptör adlarını almak için Get-NetAdapter | Select-Object Name komutunu çalıştırın.

    • RSS yapılandırmasının değiştirilmesi ağ adaptörü hizmetini yeniden başlatır ve bu da bağlantıları kesintiye uğratabilir. Devam etmeden önce yeniden bağlantı kurulmasını bekleyin.

  4. Test makinesinde veri almaya hazırlanın:

    $serverIp = (Get-NetIPConfiguration -InterfaceAlias <Name of the network adapter on the test machine>).IPv4Address.IPAddress
    $cpuNum = (Get-CimInstance -ClassName Win32_Processor).NumberOfLogicalProcessors
    $threadNum = $cpuNum
    & <Path of ntttcp.exe on the test machine> -r -m $threadNum,0,$serverIp -t 300
    Not

    <Name of the network adapter on the test machine> ve <Path of ntttcp.exe on the test machine> ifadelerini gerçek değerlerle değiştirin.

  5. Yardımcı test makinesinde veri gönderin:

    $serverIp = "<Private IP address of the test machine>"
    $threadNum = "<Thread number of the test machine>"
    <Path of ntttcp.exe on the auxiliary test machine> -s -m $threadNum,*,$serverIp -t 100
    Not

    <Private IP address of the test machine>, <Thread number of the test machine> ve <Path of ntttcp.exe on the auxiliary test machine> ifadelerini gerçek değerlerle değiştirin. Özel IP adresini almak için ipconfig komutunu, iş parçacığı sayısını almak için ise $cpuNum değerini kullanın.

  6. Test makinesinde ağ bant genişliğini görüntüleyin.

    Throughput(MB/s) değeri ağ bant genişliğini gösterir.

    image

Ağ gecikme süresini test etme

Linux örneği

  1. Test makinesine ve yardımcı test makinesine bağlanın. Bkz. Workbench kullanarak bir Linux örneğinde oturum açma.

  2. Her iki makinede de sockperf yükleyin:

    sudo yum install -y autoconf automake libtool gcc-c++
    cd /opt
    sudo wget https://github.com/Mellanox/sockperf/archive/refs/tags/3.8.tar.gz
    sudo tar -zxf 3.8.tar.gz
    cd sockperf-3.8/
    sudo ./autogen.sh
    sudo ./configure
    sudo make -j `cat /proc/cpuinfo| grep process | wc -l`
    sudo make install
  3. Test makinesinin özel IP adresini sorgulayın:

    ifconfig || ip addr

    Komut çıktısında eth0 arayüzünün inet adresi örneğin özel IP adresidir.

    [ecs-user@izxxx ecZ ~]$ ifconfig || ip addr
    eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
            inet 17.xxx.xxx.15  netmask 25xxx.0  broadcast 17.xxx.55
            inet6 fexxx38:c158  prefixlen 64  scopeid 0x20<link>
            ether 00:xxx:xxx  txqueuelen 1000  (Ethernet)
            RX packets 178595  bytes 106030163 (101.1 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 116902  bytes 70189540 (66.9 MiB)
            TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0
    
    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10<host>
            loop  txqueuelen 1000  (Local Loopback)
            RX packets 2  bytes 140 (140.0 B)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 2  bytes 140 (140.0 B)
            TX errors 0  dropped 0  overruns 0  carrier 0  collisions 0
  4. Test makinesinde sockperf başlatın:

    sockperf sr --tcp --daemonize
  5. Yardımcı test makinesinde test makinesine trafik gönderin:

    sockperf pp -i <Private IP address of the test machine> --tcp -t 30 -m 14 --full-log=result.json

    <Private IP address of the test machine> ifadesini önceki adımdaki gerçek değerle değiştirin.

  6. Ağ gecikme süresi sonuçlarını görüntüleyin.

    Dönen verilerde:

    • avg-latency: mikrosaniye cinsinden ortalama gecikme süresi.

    • percentile 99.000: mikrosaniye cinsinden 99. yüzdelik dilim gecikme süresi.

    image.png

Windows örneği

  1. Test makinesine ve yardımcı test makinesine bağlanın. Bkz. Parola veya anahtar kullanarak bir Windows örneğine bağlanma.

  2. Her iki makinede de test araçlarını yükleyin ve güvenlik duvarını devre dışı bırakın.

    1. latte.exe aracını indirin ve aracın depolandığı yolu edinin.

    2. Çalıştır iletişim kutusunu açın. powershell girin ve PowerShell'i başlatmak için Tamam'a tıklayın.

    3. Bağlantıların engellenmesini önlemek için her iki makinede de güvenlik duvarını devre dışı bırakın:

      Set-NetFirewallProfile -Profile * -Enabled:false

      Alternatif olarak, her iki makinede de Latte'ye (latte.exe) izin veren gelen bir güvenlik duvarı kuralı oluşturun:

      $lattePath = "<Path of latte.exe>"
      New-NetFirewallRule -DisplayName Latte -Protocol Any -Direction Inbound -Action Allow -Enabled True -Profile Any -Program $lattePath
      Not

      <Path of latte.exe> ifadesini gerçek değerle değiştirin.

  3. Test makinesinde veri almaya hazırlanın:

    $serverIp = (Get-NetIPConfiguration | Where-Object {$_.InterfaceAlias -eq '<Name of the network adapter on the test machine>'} | Select-Object -ExpandProperty IPv4Address).IPAddress
    $port = <Communication port>
    & "<Path of latte.exe on the test machine>" -a "$serverIp`:$port" -i 65535
    Not
    • <Name of the network adapter on the test machine> ve <Path of latte.exe on the test machine> ifadelerini gerçek değerlerle değiştirin. Adaptör adlarını almak için Get-NetAdapter | Select-Object Name komutunu çalıştırın.

    • <Communication port> için bir bağlantı noktası numarası belirtin. Her iki makinede de aynı bağlantı noktasını kullanın.

  4. Yardımcı test makinesinde veri gönderin:

    $serverIp = "<Private IP address of the test machine>"
    $port = <Communication port>
    & "<Path of latte.exe on the auxiliary test machine>" -c -a "${serverIp}:$port" -i 65535
    Not
    • <Private IP address of the test machine> ve <Path of latte.exe on the auxiliary test machine> ifadelerini gerçek değerlerle değiştirin. Özel IP adresini almak için ipconfig komutunu çalıştırın.

    • <Communication port> için bir bağlantı noktası numarası belirtin. Her iki makinede de aynı bağlantı noktasını kullanın.

  5. Ağ gecikme süresi sonuçlarını görüntüleyin.

    Latency(usec) değeri mikrosaniye cinsinden ortalama ağ gecikme süresini gösterir.

    image