All Products
Search
Document Center

Elastic High Performance Computing:Tingkatkan kinerja kluster dengan menonaktifkan HT untuk node komputasi

Last Updated:Aug 21, 2026

Beberapa beban kerja HPC—khususnya yang sensitif terhadap bandwidth memori atau kontensi cache CPU—menunjukkan kinerja lebih baik ketika Hyper-Threading (HT) dinonaktifkan, sehingga jumlah vCPU aktif berkurang menjadi sama dengan jumlah core fisik. Topik ini menjelaskan cara menonaktifkan HT pada node komputasi dalam kluster E-HPC.

Batasan

Periksa metode yang berlaku untuk tipe instans Anda sebelum melanjutkan:

Instance typeHT behaviorAction required
Instans ECS compute-optimized x86 tingkat enterpriseHanya dapat dinonaktifkan saat pembuatan instans. Tidak dapat diubah setelah instans dibuat.Konfigurasikan HT saat menambahkan node ke kluster.
ECS Bare Metal InstancesTidak dapat dinonaktifkan langsung di tingkat perangkat keras.Gunakan metode tingkat perangkat lunak yang dijelaskan dalam topik ini.
Instans Super Computing Cluster (SCC)HT dinonaktifkan secara default.Tidak diperlukan tindakan.

Untuk daftar lengkap tipe instans x86 tingkat enterprise yang mendukung penonaktifan HT, lihat Instance type limits.

Latar Belakang

Setiap node komputasi dalam kluster E-HPC berjalan sebagai instance Elastic Compute Service (ECS). Secara default, HT diaktifkan pada setiap instance ECS. HT membuat dua core pemrosesan virtual (vCPU) per core fisik, memungkinkan dua thread berjalan secara konkuren pada satu core. Menonaktifkan HT mengurangi jumlah vCPU agar sesuai dengan jumlah core fisik.

Nonaktifkan HT pada instans ECS compute-optimized x86 tingkat enterprise

Penting

HT tidak dapat dinonaktifkan pada instans ECS compute-optimized x86 tingkat enterprise setelah instans dibuat. Konfigurasikan pengaturan HT saat menambahkan node komputasi ke kluster.

Manual scale-out

Saat melakukan scale-out kluster secara manual, konfigurasikan pengaturan HT di bagian Quantity And Type of Instances to be Added. Untuk detailnya, lihat Manually scale out an E-HPC cluster.

Pada tab Create Node kotak dialog Scale Out Cluster, pilih spesifikasi node, seperti ecs.c7.large, lalu gunakan daftar drop-down Disable HT di bagian bawah tab untuk menentukan apakah hyper-threading akan dinonaktifkan. Item konfigurasi lain pada tab ini mencakup ID vSwitch, metode penagihan, image, queue, awalan nama host, dan disk sistem. Setelah menyelesaikan konfigurasi, klik Buy Now.

Auto scaling

Saat mengonfigurasi auto scaling untuk kluster, konfigurasikan pengaturan HT di bagian Global Configurations. Untuk detailnya, lihat Configure auto scaling.

Nonaktifkan HT pada ECS Bare Metal Instances

Menonaktifkan HT secara fisik pada server bare metal memerlukan konfigurasi BIOS dan restart perangkat keras, yang kompleks dan mengganggu. Sebagai gantinya, gunakan salah satu metode tingkat perangkat lunak berikut untuk mencapai efek yang sama dalam sistem operasi guest.

Penting

Metode ini dapat memengaruhi beban kerja yang sedang berjalan. Evaluasi dampaknya di lingkungan pengujian sebelum menerapkannya di produksi.

Setiap core fisik dipetakan ke dua vCPU. Kedua metode ini bekerja dengan menonaktifkan satu vCPU per core fisik, sehingga menyisakan satu vCPU aktif per core fisik—hasil efektif yang sama seperti menonaktifkan HT di tingkat perangkat keras.

Pilih metode

Set nr_cpusChange vCPU status
Restart requiredYesNo
lscpu outputShows only active CPUsShows all CPUs, including offline ones
PersistenceSurvives restartsResets on restart
Software licensing riskLowSome licenses count all CPUs, including offline ones
Custom image noteDelete nr_cpus before creating a custom image, or other instance types may not recognize all physical coresNo special action needed

Setnr_cpus

nr_cpus adalah parameter kernel Linux yang membatasi jumlah maksimum CPU yang diaktifkan oleh kernel. Nilai yang valid: 2–255. Atur nilainya menjadi setengah dari jumlah vCPU tipe instans Anda untuk menonaktifkan satu thread per core fisik.

Langkah-langkah berikut menggunakan contoh instans ecs.ebmc6me.16xlarge (64 vCPU, CentOS 7).

  1. Connect to the ECS Bare Metal Instance.

  2. Konfirmasi bahwa HT diaktifkan:

    lscpu

    Dalam output, CPU(s) sama dengan jumlah vCPU penuh dari tipe instans dan Thread(s) per core bernilai 2.

    ~]# lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                64
    On-line CPU(s) list:   0-63
    Thread(s) per core:    2
    Core(s) per socket:    16
    Socket(s):             2
    NUMA node(s):          2
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 85
    Model name:            Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
    Stepping:              7
    CPU MHz:               2799.896
    CPU max MHz:           3900.0000
    CPU min MHz:           1000.0000
    BogoMIPS:              4600.00
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              1024K
    L3 cache:              22528K
    NUMA node0 CPU(s):     0-15,32-47
    NUMA node1 CPU(s):     16-31,48-63
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic se
  3. Edit file konfigurasi GRUB:

    vim /boot/grub2/grub.cfg

    Tekan i untuk masuk ke mode edit. Tambahkan nr_cpus=32 ke baris perintah kernel (setengah dari 64 vCPU). Tekan Esc, lalu ketik :wq untuk menyimpan dan keluar.

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'CentOS Linux (3.10.0-957.21.3.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.21.3.el7.x86_64-advanced-1114fe9e-2309-4580-b183-d778e6d97397' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1114fe9e-2309-4580-b183-d778e6d97397
        else
          search --no-floppy --fs-uuid --set=root 1114fe9e-2309-4580-b183-d778e6d97397
        fi
        linux16 /boot/vmlinuz-3.10.0-957.21.3.el7.x86_64 root=UUID=1114fe9e-2309-4580-b183-d778e6d97397 ro crashkernel=auto    idle=halt biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.admin_timeout=4294967295  nomodeset intel_idle.max_cstate=1 nr_cpus=32
        initrd16 /boot/initramfs-3.10.0-957.21.3.el7.x86_64.img
    }
    menuentry 'CentOS Linux (3.10.0-957.el7.x86_64) 7 (Core)' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-957.el7.x86_64-advanced-1114fe9e-2309-4580-b183-d778e6d97397' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  1114fe9e-2309-4580-b183-d778e6d97397
        else
          search --no-floppy --fs-uuid --set=root 1114fe9e-2309-4580-b183-d778e6d97397
        fi
        linux16 /boot/vmlinuz-3.10.0-957.el7.x86_64 root=UUID=1114fe9e-2309-4580-b183-d778e6d97397 ro crashkernel=auto    idle=halt biosdevname=0 net.ifnames=0 console=tty0 console=ttyS0,115200n8 noibrs nvme_core.admin_timeout=4294967295  nomodeset intel_idle.max_cstate=1 nr_cpus=32
        initrd16 /boot/initramfs-3.10.0-957.el7.x86_64.img
    }
  4. Restart instance.

  5. Verifikasi hasilnya:

    lscpu

    Output yang diharapkan menunjukkan CPU(s): 32 dan Thread(s) per core: 1, yang mengonfirmasi bahwa HT telah dinonaktifkan secara efektif:

    CPU(s):              32
    Thread(s) per core:  1

    Untuk memverifikasi distribusi vCPU di seluruh core fisik:

    lscpu --extend

    Output yang diharapkan menunjukkan 32 vCPU tersebar di 32 core fisik.

    [root@iZu            ~]# lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                32
    On-line CPU(s) list:   0-31
    Thread(s) per core:    1
    Core(s) per socket:    16
    Socket(s):             2
    NUMA node(s):          2
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 85
    Model name:            Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
    Stepping:              7
    CPU MHz:               2301.000
    CPU max MHz:           2301.0000
    CPU min MHz:           1000.0000
    BogoMIPS:              4600.00
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              1024K
    L3 cache:              22528K
    NUMA node0 CPU(s):     0-15
    NUMA node1 CPU(s):     16-31
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic se
    nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds
    ~]# lscpu --extend
    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
    0   0    0      0    0:0:0:0       yes    2301.0000 1000.0000
    1   0    0      1    1:1:1:0       yes    2301.0000 1000.0000
    2   0    0      2    2:2:2:0       yes    2301.0000 1000.0000
    3   0    0      3    3:3:3:0       yes    2301.0000 1000.0000
    4   0    0      4    4:4:4:0       yes    2301.0000 1000.0000
    5   0    0      5    5:5:5:0       yes    2301.0000 1000.0000
    6   0    0      6    6:6:6:0       yes    2301.0000 1000.0000
    7   0    0      7    7:7:7:0       yes    2301.0000 1000.0000
    8   0    0      8    8:8:8:0       yes    2301.0000 1000.0000
    9   0    0      9    9:9:9:0       yes    2301.0000 1000.0000
    10  0    0      10   10:10:10:0    yes    2301.0000 1000.0000
    11  0    0      11   11:11:11:0    yes    2301.0000 1000.0000
    12  0    0      12   12:12:12:0    yes    2301.0000 1000.0000
    13  0    0      13   13:13:13:0    yes    2301.0000 1000.0000
    14  0    0      14   14:14:14:0    yes    2301.0000 1000.0000
    15  0    0      15   15:15:15:0    yes    2301.0000 1000.0000
    16  1    1      16   16:16:16:1    yes    2301.0000 1000.0000
    17  1    1      17   17:17:17:1    yes    2301.0000 1000.0000
    18  1    1      18   18:18:18:1    yes    2301.0000 1000.0000
    19  1    1      19   19:19:19:1    yes    2301.0000 1000.0000
    20  1    1      20   20:20:20:1    yes    2301.0000 1000.0000
    21  1    1      21   21:21:21:1    yes    2301.0000 1000.0000
    22  1    1      22   22:22:22:1    yes    2301.0000 1000.0000
    23  1    1      23   23:23:23:1    yes    2301.0000 1000.0000
    24  1    1      24   24:24:24:1    yes    2301.0000 1000.0000
    25  1    1      25   25:25:25:1    yes    2301.0000 1000.0000
    26  1    1      26   26:26:26:1    yes    2301.0000 1000.0000
    27  1    1      27   27:27:27:1    yes    2301.0000 1000.0000
    28  1    1      28   28:28:28:1    yes    2301.0000 1000.0000
    29  1    1      29   29:29:29:1    yes    2301.0000 1000.0000
    30  1    1      30   30:30:30:1    yes    2301.0000 1000.0000
    31  1    1      31   31:31:31:1    yes    2301.0000 1000.0000

Change vCPU status

Metode ini menonaktifkan vCPU saat runtime tanpa harus me-restart instance. Pengaturan ini akan kembali ke semula jika instance direstart. Untuk mengaktifkan kembali semua vCPU, jalankan perintah berikut untuk setiap vCPU yang dinonaktifkan:

echo 1 > /sys/devices/system/cpu/cpu$cpunum/online

Langkah-langkah berikut menggunakan contoh instance ecs.ebmc6me.16xlarge (64 vCPU, CentOS 7).

  1. Connect to the ECS Bare Metal Instance.

  2. Konfirmasi bahwa HT diaktifkan:

    lscpu

    Dalam output, CPU(s) sama dengan jumlah vCPU penuh dan Thread(s) per core bernilai 2.

    ~]# lscpu
    Architecture:          x86_64
    CPU op-mode(s):        32-bit, 64-bit
    Byte Order:            Little Endian
    CPU(s):                64
    On-line CPU(s) list:   0-63
    Thread(s) per core:    2
    Core(s) per socket:    16
    Socket(s):             2
    NUMA node(s):          2
    Vendor ID:             GenuineIntel
    CPU family:            6
    Model:                 85
    Model name:            Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
    Stepping:              7
    CPU MHz:               2799.896
    CPU max MHz:           3900.0000
    CPU min MHz:           1000.0000
    BogoMIPS:              4600.00
    Virtualization:        VT-x
    L1d cache:             32K
    L1i cache:             32K
    L2 cache:              1024K
    L3 cache:              22528K
    NUMA node0 CPU(s):     0-15,32-47
    NUMA node1 CPU(s):     16-31,48-63
    Flags:                 fpu vme de pse tsc msr pae mce cx8 apic se
  3. Buat skrip untuk menonaktifkan thread kedua pada setiap core fisik:

    vim test.sh

    Tempel konten berikut:

    #!/bin/bash
    for cpunum in $(cat /sys/devices/system/cpu/cpu*/topology/thread_siblings_list | cut -s -d, -f2- | tr ',' '\n' | sort -un)
    do
        echo 0 > /sys/devices/system/cpu/cpu$cpunum/online
    done
  4. Jalankan skrip tersebut:

    sh test.sh
  5. Verifikasi hasilnya:

    lscpu

    Output yang diharapkan menunjukkan 32 vCPU dalam status offline dan Thread(s) per core: 1. Hal ini menunjukkan bahwa HT telah dinonaktifkan pada instance. Untuk memverifikasi distribusi vCPU di seluruh core fisik:

    lscpu --extend

    Output yang diharapkan menunjukkan 32 vCPU aktif tersebar di 32 core fisik.

    # lscpu
    Architecture:        x86_64
    CPU op-mode(s):      32-bit, 64-bit
    Byte Order:          Little Endian
    CPU(s):              64
    On-line CPU(s) list: 0-31
    Off-line CPU(s) list: 32-63
    Thread(s) per core:  1
    Core(s) per socket:  16
    Socket(s):           2
    NUMA node(s):        2
    Vendor ID:           GenuineIntel
    CPU family:          6
    Model:               85
    Model name:          Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz
    Stepping:            7
    CPU MHz:             2800.036
    CPU max MHz:         3900.0000
    CPU min MHz:         1000.0000
    BogoMIPS:            4600.00
    Virtualization:      VT-x
    L1d cache:           32K
    L1i cache:           32K
    L2 cache:            1024K
    L3 cache:            22528K
    NUMA node0 CPU(s):   0-15
    NUMA node1 CPU(s):   16-31
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic s
    pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg f
    [root@iZuf6d2vgqoyhr~]# lscpu --extend
    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
    0   0    0      0    0:0:0:0        yes    3900.0000 1000.0000
    1   0    0      1    1:1:1:0        yes    3900.0000 1000.0000
    2   0    0      2    2:2:2:0        yes    3900.0000 1000.0000
    3   0    0      3    3:3:3:0        yes    3900.0000 1000.0000
    4   0    0      4    4:4:4:0        yes    3900.0000 1000.0000
    5   0    0      5    5:5:5:0        yes    3900.0000 1000.0000
    6   0    0      6    6:6:6:0        yes    3900.0000 1000.0000
    7   0    0      7    7:7:7:0        yes    3900.0000 1000.0000
    8   0    0      8    8:8:8:0        yes    3900.0000 1000.0000
    9   0    0      9    9:9:9:0        yes    3900.0000 1000.0000
    10  0    0      10   10:10:10:0     yes    3900.0000 1000.0000
    11  0    0      11   11:11:11:0     yes    3900.0000 1000.0000
    12  0    0      12   12:12:12:0     yes    3900.0000 1000.0000
    13  0    0      13   13:13:13:0     yes    3900.0000 1000.0000
    14  0    0      14   14:14:14:0     yes    3900.0000 1000.0000
    15  0    0      15   15:15:15:0     yes    3900.0000 1000.0000
    16  1    1      16   16:16:16:1     yes    3900.0000 1000.0000
    17  1    1      17   17:17:17:1     yes    3900.0000 1000.0000
    18  1    1      18   18:18:18:1     yes    3900.0000 1000.0000
    19  1    1      19   19:19:19:1     yes    3900.0000 1000.0000
    20  1    1      20   20:20:20:1     yes    3900.0000 1000.0000
    21  1    1      21   21:21:21:1     yes    3900.0000 1000.0000
    22  1    1      22   22:22:22:1     yes    3900.0000 1000.0000
    23  1    1      23   23:23:23:1     yes    3900.0000 1000.0000
    24  1    1      24   24:24:24:1     yes    3900.0000 1000.0000
    25  1    1      25   25:25:25:1     yes    3900.0000 1000.0000
    26  1    1      26   26:26:26:1     yes    3900.0000 1000.0000
    27  1    1      27   27:27:27:1     yes    3900.0000 1000.0000
    28  1    1      28   28:28:28:1     yes    3900.0000 1000.0000
    29  1    1      29   29:29:29:1     yes    3900.0000 1000.0000
    30  1    1      30   30:30:30:1     yes    3900.0000 1000.0000
    31  1    1      31   31:31:31:1     yes    3900.0000 1000.0000
    32  -    -      -    :::            no     -         -
    33  -    -      -    :::            no     -         -
    34  -    -      -    :::            no     -         -
    35  -    -      -    :::            no     -         -
    36  -    -      -    :::            no     -         -
    37  -    -      -    :::            no     -         -
    38  -    -      -    :::            no     -         -
    39  -    -      -    :::            no     -         -
    40  -    -      -    :::            no     -         -
    41  -    -      -    :::            no     -         -
    42  -    -      -    :::            no     -         -
    43  -    -      -    :::            no     -         -
    44  -    -      -    :::            no     -         -
    45  -    -      -    :::            no     -         -
    46  -    -      -    :::            no     -         -
    47  -    -      -    :::            no     -         -
    48  -    -      -    :::            no     -         -
    49  -    -      -    :::            no     -         -
    50  -    -      -    :::            no     -         -
    51  -    -      -    :::            no     -         -
    52  -    -      -    :::            no     -         -
    53  -    -      -    :::            no     -         -
    54  -    -      -    :::            no     -         -
    55  -    -      -    :::            no     -         -
    56  -    -      -    :::            no     -         -
    57  -    -      -    :::            no     -         -
    58  -    -      -    :::            no     -         -
    59  -    -      -    :::            no     -         -
    60  -    -      -    :::            no     -         -
    61  -    -      -    :::            no     -         -
    62  -    -      -    :::            no     -         -
    63  -    -      -    :::            no     -         -