Hugepage

From HPCWIKI
Revision as of 11:28, 17 July 2026 by Clara (talk | contribs) (Fix: remove --- horizontal lines (7 removed))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:Status

Template:TOC

Overview

Hugepage에 대한 기술 문서입니다.

Summary

  • 무엇인가? - Hugepage
  • 왜 필요한가? - HPC 및 서버 환경에서 필수 개념
  • 언제 사용하는가? - 서버 구성, 성능 튜닝, 문제 해결 시


Purpose

이 문서가 존재하는 이유

  • Goal: Hugepage에 대한 기술 정보 제공
  • Scope: Hugepage의 개념, 사용법, 설정
  • Non-goals: 다른 주제로의 확장


Key Concepts

Concept Description Related
Hugepage HPC/서버 환경에서 중요한 기술 개념 Linux, Server


Detailed Explanation

Computer memory is allocated to processes as pages. Usually these pages are rather small (4K), meaning that a process consuming a lot of memory will also be consuming a lot of pages. Searching through a multitude of pages can result in system slow downs, which is why some servers can benefit from enabling huge pages. A huge page is a memory page that is larger than 4K, On x86_64 architectures, there are two common huge page sizes: 2Mi and 1Gi. Sizes vary on other architectures. In Database, Huge pages is especially useful on systems like database servers. Processes like MySQL and PostgreSQL can make use of huge pages if they are enabled, and will put less strain on your RAM cache[1] In Network stack, Hugepage support is required for the large memory pool allocation used for packet buffers (the HUGETLBFS option must be enabled in the running kernel as indicated the previous section). By using hugepage allocations, performance is increased since fewer pages are needed, and therefore less Translation Lookaside Buffers (TLBs, high speed translation caches), which reduce the time it takes to translate a virtual page address to a physical page address. Without hugepages, high TLB miss rates would occur with the standard 4k page size, slowing performance.[2]

most standard on modern systems would be 2 MB while for 64-bit applications, it is recommended to use 1 GB hugepages if the platform supports them.

$ grep -i huge /proc/meminfo
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
FileHugePages:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB

we can change Hugepagesize <syntaxhighlight lang="bash">

$ sudo sysctl -w vm.nr_hugepages=1024000 # for example 1G [sudo] password for hpcmate: vm.nr_hugepages = 102400 $ grep -i huge /proc/meminfo


Best Practices

  • 최신 버전 사용 권장
  • 공식 문서 참고
  • 테스트 환경에서 먼저 검증


References


Related Pages

Knowledge Graph

Related

LinuxServerHardwareNetwork