Files
document-haness/docs/virtualization/final/assets/diagrams/memory-pressure-reclaim-swap-oom/memory-pressure-reclaim-swap-oom.alt.md
T

2.2 KiB
Raw Blame History

Host memory pressure가 storage와 OOM으로 갈라지는 경로

Alternative text

Host memory pressure가 reclaim에서 clean page 재읽기, anonymous page의 Host swap과 storage contention, 메모리 확보 실패에 따른 Host OOM으로 갈라지는 흐름도. QEMU가 OOM victim이 될 때 VM 전체가 중단될 수 있다는 결과는 본문에서 설명한다.

Long description

왼쪽에서 Host memory pressure가 reclaim으로 들어간다. reclaim 이후 clean file-backed page는 버렸다가 필요할 때 storage에서 다시 읽는 경로, anonymous page는 Host swap I/O를 통해 physical storage와 경쟁하는 경로, 필요한 메모리를 확보하지 못하면 Host OOM으로 가는 경로로 갈린다. storage contention이 application latency로 이어지는 결과와 Host OOM이 QEMU를 victim으로 고를 때 VM 전체가 중단될 수 있다는 결과는 본문에서 이어 설명한다.

Elements and evidence

  • Host memory pressure (resource): 실제 Host RAM 수요가 available physical memory에 접근한 상태. Evidence: L2818L2831.
  • Reclaim (component): Linux가 회수 가능한 page/cache를 처리하는 첫 대응. Evidence: L2818L2831.
  • clean file-backed page (data): 원본이 storage에 있어 RAM에서 제거하고 나중에 다시 읽을 수 있다. Evidence: L2834L2848.
  • Host swap I/O (storage): anonymous page의 backing이 필요할 때 host swap I/O가 생길 수 있다. Evidence: L2850L2852, L2856L2886.
  • Storage contention (storage): 여러 I/O가 한 physical device에 몰려 contention을 만든다. Evidence: L2938L2965.
  • Host OOM (result): reclaim 등으로도 필요한 memory 확보에 실패했을 때 Host kernel에서 발생할 수 있다. Evidence: L3213L3231, L3249L3265.

Relationships

  • clean file-backed page → Storage contention: reread. Evidence: L2834L2848.
  • Host memory pressure → Reclaim: pressure. Evidence: L2818L2831.
  • Reclaim → clean file-backed page: file-backed. Evidence: L2834L2848.
  • Reclaim → Host OOM: 확보 실패. Evidence: L3213L3231.
  • Reclaim → Host swap I/O: anonymous. Evidence: L2850L2852.
  • Host swap I/O → Storage contention: swap. Evidence: L2871L2886, L2940L2946.