본문 바로가기

Compute

[NUMA] esxtop metrics

esxtop에서 memory view로 metric을 확인할 때 field 값 중에서 NUMA Stats을 추가하여 NUMA 관련 metric도 같이 확인할 수 있습니다.

NUMA Stats 관련 metric에 대한 정의 및 특정 metric에 대한 상세한 내용을 공유합니다.

 

  • NHN
    • Numa Home Node
    • The number of NUMA home nodes the virtual machine may be present in
    • If you find two numbers present, this would indicate the VM spans more than one NUMA node
  • NMIG
    • Number of NUMA node migrations that have taken place since the virtual machine booted
  • NRMEM
    • The amount of memory that exists on a remote NUMA node for the virtual machine
  • NLMEM
    • The amount of memory that exists for the virtual machine that is local to the NUMA node
  • N%L
    • The percentage of memory that is local to the NUMA node for the virtual machine
    • Commonly found to be 99% or 100%
  • GST_ND[n]
    • Allocated virtual machine memory for the NUMA node
  • OVD_ND[n]
    • Overhead of VM memory usage for the particular NUMA node

 

esxtop에서 위 metric을 보려면, memory view에서 아래 field 중 NUMA STATS를 추가해야 합니다.

Current Field order: aBcDefGHijKLmnOpq
 
  A:  ID = Id
* B:  GID = Group Id
  C:  LWID = Leader World Id (World Group Id)
* D:  NAME = Name
  E:  NWLD = Num Members
  F:  MEM ALLOC = MEM Allocations
* G:  NUMA STATS = Numa Statistics    ### <-- !!
* H:  SIZE = MEM Size (MB)
  I:  ACTV = MEM Active (MB)
  J:  MCTL = MEM Ctl (MB)
* K:  SWAP STATS = Swap Statistics (MB)
* L:  LLSWAP STATS = Llswap Statistics (MB)
  M:  CPT = MEM Checkpoint (MB)
  N:  COW = MEM Cow (MB)
* O:  OVHD = MEM Overhead (MB)
  P:  CMT = MEM Committed (MB)
  Q:  ZIP = MEM Compression (MB)

 

esxtop

11:59:46pm up 9 days  8:49, 1327 worlds, 2 VMs, 10 vCPUs; MEM overcommit avg: 0.00, 0.00, 0.00
PMEM  /MB: 261758   total: 3801     vmk,29301 other, 228655 free
VMKMEM/MB: 261372 managed:  3228 minfree, 13262 rsvd, 248110 ursvd,  high state
NUMA  /MB: 130684 (115760), 131072 (112510)
PSHARE/MB:      56  shared,      50  common:       6 saving
SWAP  /MB:       0    curr,       0 rclmtgt:                 0.00 r/s,   0.00 w/s
ZIP   /MB:       0  zipped,       0   saved
MEMCTL/MB:       0    curr,       0  target,   18445 max
 
       GID NAME                                         NHN NMIG    NRMEM    NLMEM N%L GST_ND0  OVD_ND0  GST_ND1  OVD_ND1     MEMSZ    GRANT     CNSM    SZTGT     TCHD   TCHD_W    SWCUR    SWTGT   SWR/s   SWW/s  LLSWR/s  LLSWW/s   OVHDUW     OVHD  OVHDMAX
    590846 ad01                                           1    1     0.00 16384.00 100     0.00    16.84 16384.00    55.41 16521.03 16403.39 16382.71 16484.61   744.61   172.51     0.00     0.00    0.00    0.00     0.00     0.00     0.00    99.96   157.69
    294850 vcsa01                                         0   16     0.00 12288.00 100 12288.00    32.74     0.00    12.81 12409.07 12306.76 12282.93 12356.79  1657.77   375.74     0.00     0.00    0.00    0.00     0.00     0.00     0.00    71.99   103.79
     18306 hostd.2100411                                  -    -        -        -   -        -        -        -        -   122.25    84.63    90.88    99.34    31.52    25.28     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00     0.00
 
<snip>

 

다른 Metric들은 정의대로 쉽게 이해가 가는데, OVD_ND는 정의에 Overhead라고 기술되어 있어 이 Overhead가 무엇인지 정확하게 설명이 되어 있지 않습니다.

 

이에 esxtop 코드부터 시작하여 어디서 overhead 값을 가져오는지 Trace 하였고, 최종적으로 해당 Metric은 vsish 를 통해서 얻어오는 것으로 확인되었습니다.

 

정리하자면, esxtop 에서 확인되는 NUMA Stats 관련 metric 중 OVD_ND[ID]는 sched-stats -t numa-cnode 결과에서 확인되는 anonMem Column의 값과 동일합니다.

 

위에서 확인했던 예제를 다시 들여다보면,

esxtop 결과에서 ad01 VM의 OVD_ND0는 16.84, OVD_ND1은 55.41로 확인되는데,

 

이와 비교하기 위해 sched-stats -t numa-cnode 결과에서 anonMem Column 값을 보면 ad01 VM의 경우 NUMA Node0에서는 17244, NUMA Node1에서는 56420으로 되어 있고,

 

17244/1024 = 16.83, 56420/1024 = 55.09 값이 OVD_ND0, OVD_ND1 값과 거의 동일한 것을 알 수 있습니다.

 

즉, OVD_ND 값은 아래와 같이 이해할 수 있습니다.

OVD_ND0 : 16.84 <-- sched-stats -t numa-cnode결과에서 NUMA Node0의 anonMem 값을 1024로 나눈 결과

OVD_ND1 : 55.41 <-- sched-stats -t numa-cnode결과에서 NUMA Node1의 anonMem 값을 1024로 나눈 결과

 

예제

11:59:46pm up 9 days  8:49, 1327 worlds, 2 VMs, 10 vCPUs; MEM overcommit avg: 0.00, 0.00, 0.00
PMEM  /MB: 261758   total: 3801     vmk,29301 other, 228655 free
VMKMEM/MB: 261372 managed:  3228 minfree, 13262 rsvd, 248110 ursvd,  high state
NUMA  /MB: 130684 (115760), 131072 (112510)
PSHARE/MB:      56  shared,      50  common:       6 saving
SWAP  /MB:       0    curr,       0 rclmtgt:                 0.00 r/s,   0.00 w/s
ZIP   /MB:       0  zipped,       0   saved
MEMCTL/MB:       0    curr,       0  target,   18445 max
 
       GID NAME                                         NHN NMIG    NRMEM    NLMEM N%L GST_ND0  OVD_ND0  GST_ND1  OVD_ND1     MEMSZ    GRANT     CNSM    SZTGT     TCHD   TCHD_W    SWCUR    SWTGT   SWR/s   SWW/s  LLSWR/s  LLSWW/s   OVHDUW     OVHD  OVHDMAX
    590846 ad01                                           1    1     0.00 16384.00 100     0.00    16.84 16384.00    55.41 16521.03 16403.39 16382.71 16484.61   744.61   172.51     0.00     0.00    0.00    0.00     0.00     0.00     0.00    99.96   157.69
    294850 vcsa01                                         0   16     0.00 12288.00 100 12288.00    32.74     0.00    12.81 12409.07 12306.76 12282.93 12356.79  1657.77   375.74     0.00     0.00    0.00    0.00     0.00     0.00     0.00    71.99   103.79
     18306 hostd.2100411                                  -    -        -        -   -        -        -        -        -   122.25    84.63    90.88    99.34    31.52    25.28     0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00     0.00
 
<snip>
 
# sched-stats -t numa-cnode
groupName       groupID     clientID    nodeID      time        timePct     memory      memoryPct   anonMem     anonMemPct  avgEpochs   memMigHere
vm.2164552      294850      0           0           250503      99          12582912    100         33384       71          9           0
vm.2164552      294850      0           1           21          0           0           0           13120       28          0           0
 
vm.2235422      590846      0           0           2           0           0           0           17244       23          0           0
vm.2235422      590846      0           1           31100       99          16777216    100         56420       76          9           0

 

그렇다면, anonMem은 무엇인가? anon memory의 정의는 다음과 같이 기술되어 있습니다.

"VM이 직접 사용하는 memory가 아닌 가상화를 위해 필요한 VMM, VMX, VMkernel이 사용하는 memory"

 

따라서, 실제 VM의 Guest Physical Memory 할당을 위해서 사용되는 Memory가 아닌 VM을 관리하는 프로세스가 VM을 위해서 사용하는 Memory이기 때문에 Overhead Memory로 정의하는 것으로 판단됩니다.

 

 

'Compute' 카테고리의 다른 글

[Kubernetes] 1.What is docker  (0) 2023.07.03
[Kubernetes] 0.사전 작업  (0) 2023.07.03
One of ESXi hosts keeps being disconnected periodically  (0) 2023.06.12
[NUMA] numactl and numastat  (2) 2023.06.11
[NUMA] Scheduler  (0) 2023.06.11