6.3. OSD 메모리 자동 튜닝
OSD 데몬은 osd_memory_target
구성 옵션에 따라 메모리 사용을 조정합니다. 옵션 osd_memory_target
은 시스템에서 사용 가능한 RAM에 따라 OSD 메모리를 설정합니다.
Red Hat Ceph Storage가 다른 서비스와 메모리를 공유하지 않는 전용 노드에 배포되는 경우 cephadm
은 총 RAM 양과 배포된 OSD 수에 따라 OSD 사용량을 자동으로 조정합니다.
Red Hat Ceph Storage 6.0에서는 기본적으로 osd_memory_target_autotune
매개변수가 true
로 설정됩니다.
구문
ceph config set osd osd_memory_target_autotune true
OSD 추가 또는 OSD 교체와 같은 클러스터 유지 관리를 위해 스토리지 클러스터를 Red Hat Ceph Storage 6.0으로 업그레이드하면 시스템 메모리에 따라 osd_memory_target_autotune
매개변수를 true
로 설정하는 것이 좋습니다.
Cephadm은 일부 mgr/cephadm/autotune_memory_target_ratio
로 시작합니다. 기본값은 시스템의 총 RAM의 0.7
로, 비 OSDS와 같은 비 자동 튜닝 데몬에서 사용하는 메모리를 뺀 다음 osd_memory_target_autotune
은 false입니다.
osd_memory_target
매개변수는 다음과 같이 계산됩니다.
구문
osd_memory_target = TOTAL_RAM_OF_THE_OSD * (1048576) * (autotune_memory_target_ratio) / NUMBER_OF_OSDS_IN_THE_OSD_NODE - (SPACE_ALLOCATED_FOR_OTHER_DAEMONS)
SPACE_ALLOCATED_FOR_OTHER_DAEMONS 는 선택적으로 다음과 같은 데몬 공간 할당을 포함할 수 있습니다.
- Alertmanager: 1GB
- Grafana: 1GB
- Ceph Manager: 4GB
- Ceph Monitor: 2GB
- node-exporter: 1GB
- Prometheus: 1GB
예를 들어 노드에 24개의 OSD가 있고 251GB RAM 공간이 있는 경우 osd_memory_target
은 7860684936
입니다.
최종 대상은 옵션을 사용하여 구성 데이터베이스에 반영됩니다. MEM LIMIT
열의 ceph orch ps
출력에서 각 데몬이 사용하는 제한 및 현재 메모리를 볼 수 있습니다.
Red Hat Ceph Storage 6.0에서 osd_memory_target_autotune
true
의 기본 설정은 컴퓨팅 및 Ceph 스토리지 서비스가 함께 배치되는 하이퍼 컨버지드 인프라에 적합하지 않습니다. 하이퍼 컨버지드 인프라에서 autotune_memory_target_ratio
를 0.2
로 설정하여 Ceph의 메모리 사용량을 줄일 수 있습니다.
예제
[ceph: root@host01 /]# ceph config set mgr mgr/cephadm/autotune_memory_target_ratio 0.2
스토리지 클러스터에서 OSD의 특정 메모리 대상을 수동으로 설정할 수 있습니다.
예제
[ceph: root@host01 /]# ceph config set osd.123 osd_memory_target 7860684936
스토리지 클러스터에서 OSD 호스트의 특정 메모리 대상을 수동으로 설정할 수 있습니다.
구문
ceph config set osd/host:HOSTNAME osd_memory_target TARGET_BYTES
예제
[ceph: root@host01 /]# ceph config set osd/host:host01 osd_memory_target 1000000000
osd_memory_target_autotune
을 활성화하면 기존 수동 OSD 메모리 대상 설정을 덮어씁니다. osd_memory_target_autotune
옵션 또는 기타 유사한 옵션이 활성화된 경우에도 데몬 메모리를 튜닝하지 않으려면 호스트의 _no_autotune_memory
레이블을 설정합니다.
구문
ceph orch host label add HOSTNAME _no_autotune_memory
자동 튜닝 옵션을 비활성화하고 특정 메모리 대상을 설정하여 메모리 자동 튜닝에서 OSD를 제외할 수 있습니다.
예제
[ceph: root@host01 /]# ceph config set osd.123 osd_memory_target_autotune false [ceph: root@host01 /]# ceph config set osd.123 osd_memory_target 16G