BIOS/SMT Control: Difference between revisions

From HPCWIKI
Jump to navigation Jump to search
(Add categories: Hardware, Reference)
(Phase 6.1: LLM-Optimized Wiki Template 적용)
Line 1: Line 1:
== Simultaneous Multithreading ==
{{Status
Simultaneous Multithreading (SMT) allows multiple execution threads to be executed on a single physical CPU core. The technology is known by a number of different names, such as Hyper-Threading, but operate along similar principles.
|status=Draft
|owner=Knowledge Agent
|last_update=2026-07-16
|review=Pending
}}


Intel provides an excellent overview for Hyper-Threading (HT), an implementation of SMT, and when it may or may not be helpful, depending on the application.
{{TOC}}


== Verifying a Systems Hyper-Thread Topology ==
== Overview ==
Each Hyper-Thread for a system will appear to the kernel as a logical CPU core<syntaxhighlight lang="bash">
 
SMT(Simultaneous Multithreading)은 단일 물리적 CPU 코어에서 여러 실행 스레드를 동시에 처리하는 기술입니다. Intel에서는 Hyper-Threading(HT)이라는 이름으로 알려져 있습니다.
 
=== Summary ===
 
* 무엇인가? 단일 CPU 코어에서 여러 스레드 동시 실행 기술 (Intel: Hyper-Threading)
* 왜 필요한가? CPU 코어 활용도 향상, 멀티스레드 워크로드 성능 개선
* 언제 사용하는가? 컴파일, 가상화, 데이터베이스, 웹 서버 등 멀티스레드 애플리케이션
 
---
 
== Purpose ==
 
이 문서가 존재하는 이유
 
* Goal: SMT의 개념, 확인 방법, 제어 방법, AMD SMT 설정 가이드 제공
* Scope: SMT 기본 개념, 리눅스 커널 SMT 제어, BIOS SMT 설정
* Non-goals: CPU 아키텍처 상세 프로토콜, 코어 내부 파이프라인 설계
 
---
 
== Key Concepts ==
 
{| class="wikitable"
! Concept
! Description
! Related
|-
| SMT
| Simultaneous Multithreading — 단일 코어에서 여러 스레드 동시 실행
| [[CPU preferred computing]]
|-
| Hyper-Threading
| Intel의 SMT 구현체 — HT라고도 불림
| [[SMT]]
|-
| Logical CPU
| OS가 인식하는 가상 코어 — 물리적 코어 x 스레드 수
| [[lscpu]]
|-
| Thread Siblings
| 같은 물리적 코어를 공유하는 스레드 그룹
| [[CPUs online or offline]]
|-
| L1TF
| L1 Terminal Fault — SMT 관련 보안 취약점
| [[SMT]]
|}
 
---
 
== Architecture ==
 
SMT 동작 원리:
 
<syntaxhighlight lang="mermaid">
graph TD
    A[물리적 CPU 코어] --> B[Execution Units]
    A --> C[Register File]
    A --> D[L1 Cache]
    B --> E[스레드 0 실행]
    B --> F[스레드 1 실행]
    C --> E
    C --> F
    D --> E
    D --> F
    E --> G[결과 출력]
    F --> G
</syntaxhighlight>
 
---
 
== Workflow ==
 
SMT 확인 및 제어 워크플로우:
 
# SMT 상태 확인 — lscpu 명령어
# $ lscpu | grep -e Socket -e Core -e Thread
# Thread(s) per core: 2 (SMT 활성화)
# Thread(s) per core: 1 (SMT 비활성화)
 
# SMT 활성화 (런타임)
# # echo on > /sys/devices/system/cpu/smt/control
 
# SMT 비활성화 (런타임)
# # echo off > /sys/devices/system/cpu/smt/control
 
# BIOS에서 SMT 설정
# Supermicro: CPU Configuration > SMT Control
# HPE ProLiant Gen10: UEFI > CPU Configuration > SMT Control
 
---
 
== Detailed Explanation ==
 
=== SMT 기본 개념 ===
 
SMT(Simultaneous Multithreading)은 단일 물리적 CPU 코어에서 여러 실행 스레드를 동시에 처리하는 기술입니다. Intel에서는 Hyper-Threading(HT)이라는 이름으로 알려져 있으며, AMD EPYC에서도 SMT라는 이름으로 제공됩니다.
 
SMT가 활성화되면 각 물리적 코어는 두 개의 논리적 코어로 OS에게 표시됩니다.
 
=== Hyper-Thread Topology 확인 ===
 
<syntaxhighlight lang="bash">
$ lscpu | grep -e Socket -e Core -e Thread
$ lscpu | grep -e Socket -e Core -e Thread
Thread(s) per core:                2
Thread(s) per core:                2
Line 13: Line 120:
</syntaxhighlight>
</syntaxhighlight>


== Control SMT <ref>https://access.redhat.com/solutions/rhel-smt</ref> ==
* '''Thread(s) per core: 2''' — SMT 활성화 (각 코어당 2스레드)
/sys/devices/system/cpu/smt/control:
* '''Thread(s) per core: 1''' — SMT 비활성화 (각 코어당 1스레드)


     This file allows to read out the SMT control state and provides the ability to disable or (re)enable SMT. The possible states are:
=== SMT 제어 ===


/sys/devices/system/cpu/smt/active:
/sys/devices/system/cpu/smt/control 파일은 SMT 제어 상태를 읽고 SMT를 비활성화/활성화할 수 있습니다.
 
/sys/devices/system/cpu/smt/active 파일은 SMT가 활성화되어 있는지 보고합니다.


     This file reports whether SMT is enabled and active, i.e. if on any physical core two or more sibling threads are online.
{| class="wikitable"
{| class="wikitable"
|+
! 상태
!States
! 설명
!Description
|-
|-
|on
| on
|SMT is supported by the CPU and enabled. All logical CPUs can be onlined and offlined without restrictions
| SMT가 CPU에 의해 지원되고 활성화됨. 모든 논리적 CPU를 제한 없이 온라인/오프라인 할 수 있음
|-
|-
|off
| off
|SMT is supported by the CPU and disabled. Only the so called primary SMT threads can be onlined and offlined without restrictions. An attempt to online a non-primary sibling is rejected
| SMT가 CPU에 의해 지원되지만 비활성화됨. 기본 SMT 스레드만 제한 없이 온라인/오프라인 가능
|-
|-
|forceoff
| forceoff
|Same as 'off' but the state cannot be controlled. Attempts to write to the control file are rejected
| 'off'와 동일하지만 상태 제어가 불가능함. control 파일에 쓰기 시도 거부
|-
|-
|notsupported
| notsupported
|The processor does not [[support]] SMT. It's therefore not affected by the SMT implications of L1TF. Attempts to write to the control file are rejected
| 프로세서가 SMT를 지원하지 않음. L1TF의 영향을 받지 않음. control 파일에 쓰기 시도 거부
|}
|}
'''SMT 비활성화 (런타임):'''
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
To disable SMT during runtime, the following can be used:
# echo off > /sys/devices/system/cpu/smt/control
# echo off > /sys/devices/system/cpu/smt/control
</syntaxhighlight>
'''SMT 활성화 (런타임):'''


To enable SMT during runtime, the following can be used:
<syntaxhighlight lang="bash">
# echo on > /sys/devices/system/cpu/smt/control
# echo on > /sys/devices/system/cpu/smt/control
</syntaxhighlight>


Alternatively, the following one-liner script can be used to disable one Hyper-Thread of each CPU core on the system
'''하나의 Hyper-Thread 비활성화 스크립트:'''


<syntaxhighlight lang="bash">
for CPU in $( ls /sys/devices/system/cpu/cpu[0-9]* -d | sort); do  
for CPU in $( ls /sys/devices/system/cpu/cpu[0-9]* -d | sort); do  
awk -F '[-,]' '{if(NF > 1) {HOTPLUG="/sys/devices/system/cpu/cpu"$NF"/online"; print "0" > HOTPLUG; close(HOTPLUG)}}' $CPU/topology/thread_siblings_list 2>/dev/null; done
awk -F '[-,]' '{if(NF > 1) {HOTPLUG="/sys/devices/system/cpu/cpu"$NF"/online"; print "0" > HOTPLUG; close(HOTPLUG)}}' $CPU/topology/thread_siblings_list 2>/dev/null; done
</syntaxhighlight>
=== AMD Simultaneous Multithreading (SMT) ===


</syntaxhighlight>
AMD 프로세서 서버에서 사용 가능한 SMT 설정:


== AMD Simultaneous Multithreading (SMT)<ref>https://techlibrary.hpe.com/docs/iss/proliant-gen10-uefi/GUID-F2A21BDE-7240-4604-9238-27290ECE82A4.html</ref> ==
{{Notes|This option is available on servers with AMD processors}}
{| class="wikitable"
{| class="wikitable"
!Value   
!
!Description
! 설명
!Notes
! 비고
|-
|-
|Enabled
| Enabled
|Each physical processor core operates as two logical processor cores. Enabling this option can improve overall performance for applications that benefit from a higher processor core count.
| 각 물리적 프로세서 코어가 두 개의 논리적 프로세서 코어로 작동. 활성화 시 코어 수가 높아져 멀티스레드 애플리케이션 성능 향상
|
|
|-
|-
|Disabled
| Disabled
|Each physical processor core operates as one logical processor core.
| 각 물리적 프로세서 코어가 하나의 논리적 프로세서 코어로 작동
|
|
|}
|}


== Typical BIOS menu path ==
=== Typical BIOS menu path ===
 
* '''Supermicro''' — CPU Configuration > SMT Control
* '''HPE ProLiant Gen10''' — UEFI > CPU Configuration > SMT Control
 
---
 
== Configuration ==
 
=== SMT 활성화/비활성화 ===
 
<syntaxhighlight lang="bash">
# SMT 활성화
# echo on > /sys/devices/system/cpu/smt/control
 
# SMT 비활성화
# echo off > /sys/devices/system/cpu/smt/control
</syntaxhighlight>
 
=== BIOS SMT 설정 ===
 
<syntaxhighlight lang="text">
Supermicro:
BIOS > CPU Configuration > SMT Control → Enabled/Disabled
 
HPE ProLiant Gen10:
UEFI > CPU Configuration > SMT Control → Enabled/Disabled
</syntaxhighlight>
 
---
 
== Examples ==
 
=== Example 1: SMT 상태 확인 ===
 
입력:
 
<syntaxhighlight lang="bash">
$ lscpu | grep -e Socket -e Core -e Thread
</syntaxhighlight>
 
출력:
 
<syntaxhighlight lang="bash">
Thread(s) per core:                2
Core(s) per socket:                16
Socket(s):                          1
Model name:                        AMD EPYC 7282 16-Core Processor
</syntaxhighlight>
 
=== Example 2: SMT 비활성화 ===


입력:


Supermicro - CPU Configuration > SMT Control
<syntaxhighlight lang="bash">
# echo off > /sys/devices/system/cpu/smt/control
</syntaxhighlight>
 
출력:
 
<syntaxhighlight lang="bash">
$ cat /sys/devices/system/cpu/smt/active
off
</syntaxhighlight>
 
---
 
== Best Practices ==
 
* '''컴파일/데이터베이스 워크로드''' — SMT 활성화 권장 (코어 수 증가)
* '''보안 민감 워크로드''' — SMT 비활성화 권장 (L1TF 취약점 방지)
* '''가상화 호스트''' — SMT 활성화 권장 (VM당 스레드 할당 유연성)
* '''BIOS 설정 변경 후 반드시 재부팅'''
* '''IPMI를 통한 원격 BIOS 접근 권장'''
 
---
 
== Limitations ==
 
* SMT 활성화 시 애플리케이션에 따라 성능이 저하될 수 있음 (Intel 문서 참조)
* SMT 비활성화 시 논리적 코어 수가 절반으로 줄어듦
* 일부 레거시 애플리케이션은 SMT를 지원하지 않음
* BIOS 설정은 마더보드 제조사/모델별로 상이
 
---


== References ==
== References ==
<references />
 
* https://access.redhat.com/solutions/rhel-smt
* https://techlibrary.hpe.com/docs/iss/proliant-gen10-uefi/GUID-F2A21BDE-7240-4604-9238-27290ECE82A4.html
 
---
 
== Related Pages ==
 
* [[BIOS]]
* [[BIOS/UEFI]]
* [[BIOS/Global C-state Control]]
* [[CPU preferred computing]]
* [[CPUs online or offline]]
* [[AMD EPYC]]
* [[AMD CPUs]]
* [[lscpu]]
 
---
 
[[Category:Hardware]]
[[Category:Hardware]]
[[Category:Reference]]
[[Category:Reference]]

Revision as of 14:26, 16 July 2026

Template:Status

Template:TOC

Overview

SMT(Simultaneous Multithreading)은 단일 물리적 CPU 코어에서 여러 실행 스레드를 동시에 처리하는 기술입니다. Intel에서는 Hyper-Threading(HT)이라는 이름으로 알려져 있습니다.

Summary

  • 무엇인가? 단일 CPU 코어에서 여러 스레드 동시 실행 기술 (Intel: Hyper-Threading)
  • 왜 필요한가? CPU 코어 활용도 향상, 멀티스레드 워크로드 성능 개선
  • 언제 사용하는가? 컴파일, 가상화, 데이터베이스, 웹 서버 등 멀티스레드 애플리케이션

---

Purpose

이 문서가 존재하는 이유

  • Goal: SMT의 개념, 확인 방법, 제어 방법, AMD SMT 설정 가이드 제공
  • Scope: SMT 기본 개념, 리눅스 커널 SMT 제어, BIOS SMT 설정
  • Non-goals: CPU 아키텍처 상세 프로토콜, 코어 내부 파이프라인 설계

---

Key Concepts

Concept Description Related
SMT Simultaneous Multithreading — 단일 코어에서 여러 스레드 동시 실행 CPU preferred computing
Hyper-Threading Intel의 SMT 구현체 — HT라고도 불림 SMT
Logical CPU OS가 인식하는 가상 코어 — 물리적 코어 x 스레드 수 lscpu
Thread Siblings 같은 물리적 코어를 공유하는 스레드 그룹 CPUs online or offline
L1TF L1 Terminal Fault — SMT 관련 보안 취약점 SMT

---

Architecture

SMT 동작 원리:

graph TD
    A[물리적 CPU 코어] --> B[Execution Units]
    A --> C[Register File]
    A --> D[L1 Cache]
    B --> E[스레드 0 실행]
    B --> F[스레드 1 실행]
    C --> E
    C --> F
    D --> E
    D --> F
    E --> G[결과 출력]
    F --> G

---

Workflow

SMT 확인 및 제어 워크플로우:

  1. SMT 상태 확인 — lscpu 명령어
  2. $ lscpu | grep -e Socket -e Core -e Thread
  3. Thread(s) per core: 2 (SMT 활성화)
  4. Thread(s) per core: 1 (SMT 비활성화)
  1. SMT 활성화 (런타임)
  2. # echo on > /sys/devices/system/cpu/smt/control
  1. SMT 비활성화 (런타임)
  2. # echo off > /sys/devices/system/cpu/smt/control
  1. BIOS에서 SMT 설정
  2. Supermicro: CPU Configuration > SMT Control
  3. HPE ProLiant Gen10: UEFI > CPU Configuration > SMT Control

---

Detailed Explanation

SMT 기본 개념

SMT(Simultaneous Multithreading)은 단일 물리적 CPU 코어에서 여러 실행 스레드를 동시에 처리하는 기술입니다. Intel에서는 Hyper-Threading(HT)이라는 이름으로 알려져 있으며, AMD EPYC에서도 SMT라는 이름으로 제공됩니다.

SMT가 활성화되면 각 물리적 코어는 두 개의 논리적 코어로 OS에게 표시됩니다.

Hyper-Thread Topology 확인

$ lscpu | grep -e Socket -e Core -e Thread
Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          1
Model name:                         AMD EPYC 7282 16-Core Processor
  • Thread(s) per core: 2 — SMT 활성화 (각 코어당 2스레드)
  • Thread(s) per core: 1 — SMT 비활성화 (각 코어당 1스레드)

SMT 제어

/sys/devices/system/cpu/smt/control 파일은 SMT 제어 상태를 읽고 SMT를 비활성화/활성화할 수 있습니다.

/sys/devices/system/cpu/smt/active 파일은 SMT가 활성화되어 있는지 보고합니다.

상태 설명
on SMT가 CPU에 의해 지원되고 활성화됨. 모든 논리적 CPU를 제한 없이 온라인/오프라인 할 수 있음
off SMT가 CPU에 의해 지원되지만 비활성화됨. 기본 SMT 스레드만 제한 없이 온라인/오프라인 가능
forceoff 'off'와 동일하지만 상태 제어가 불가능함. control 파일에 쓰기 시도 거부
notsupported 프로세서가 SMT를 지원하지 않음. L1TF의 영향을 받지 않음. control 파일에 쓰기 시도 거부

SMT 비활성화 (런타임):

# echo off > /sys/devices/system/cpu/smt/control

SMT 활성화 (런타임):

# echo on > /sys/devices/system/cpu/smt/control

하나의 Hyper-Thread 비활성화 스크립트:

for CPU in $( ls /sys/devices/system/cpu/cpu[0-9]* -d | sort); do 
awk -F '[-,]' '{if(NF > 1) {HOTPLUG="/sys/devices/system/cpu/cpu"$NF"/online"; print "0" > HOTPLUG; close(HOTPLUG)}}' $CPU/topology/thread_siblings_list 2>/dev/null; done

AMD Simultaneous Multithreading (SMT)

AMD 프로세서 서버에서 사용 가능한 SMT 설정:

설명 비고
Enabled 각 물리적 프로세서 코어가 두 개의 논리적 프로세서 코어로 작동. 활성화 시 코어 수가 높아져 멀티스레드 애플리케이션 성능 향상
Disabled 각 물리적 프로세서 코어가 하나의 논리적 프로세서 코어로 작동

Typical BIOS menu path

  • Supermicro — CPU Configuration > SMT Control
  • HPE ProLiant Gen10 — UEFI > CPU Configuration > SMT Control

---

Configuration

SMT 활성화/비활성화

# SMT 활성화
# echo on > /sys/devices/system/cpu/smt/control

# SMT 비활성화
# echo off > /sys/devices/system/cpu/smt/control

BIOS SMT 설정

Supermicro:
BIOS > CPU Configuration > SMT Control → Enabled/Disabled

HPE ProLiant Gen10:
UEFI > CPU Configuration > SMT Control → Enabled/Disabled

---

Examples

Example 1: SMT 상태 확인

입력:

$ lscpu | grep -e Socket -e Core -e Thread

출력:

Thread(s) per core:                 2
Core(s) per socket:                 16
Socket(s):                          1
Model name:                         AMD EPYC 7282 16-Core Processor

Example 2: SMT 비활성화

입력:

# echo off > /sys/devices/system/cpu/smt/control

출력:

$ cat /sys/devices/system/cpu/smt/active
off

---

Best Practices

  • 컴파일/데이터베이스 워크로드 — SMT 활성화 권장 (코어 수 증가)
  • 보안 민감 워크로드 — SMT 비활성화 권장 (L1TF 취약점 방지)
  • 가상화 호스트 — SMT 활성화 권장 (VM당 스레드 할당 유연성)
  • BIOS 설정 변경 후 반드시 재부팅
  • IPMI를 통한 원격 BIOS 접근 권장

---

Limitations

  • SMT 활성화 시 애플리케이션에 따라 성능이 저하될 수 있음 (Intel 문서 참조)
  • SMT 비활성화 시 논리적 코어 수가 절반으로 줄어듦
  • 일부 레거시 애플리케이션은 SMT를 지원하지 않음
  • BIOS 설정은 마더보드 제조사/모델별로 상이

---

References

---

Related Pages

---