---
title: 开启NUMA感知
description: "在Yarn 3.1.0版本中启用NUMA，以提升集群资源调度的效率。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/Hive/topic_0236786288.html
sourcePath: /source/zh/kunpengbds/ecosystemEnable/Hive/topic_0236786288.html
indexId: b09ab1e5b6530ce7ae2186c9dbce0273964567436437e4b4e992936a8322623e64
---
# 开启NUMA感知

#### 目的

在Yarn 3.1.0版本中启用NUMA，以提升集群资源调度的效率。


#### 方法

Yarn 3.1.0版本新增支持NUMA感知功能。该功能在启动Container时，会读取系统中每个NUMA节点的CPU核和内存容量，并通过numactl命令为Container指定使用的CPU范围和membind范围，从而减少跨NUMA节点的数据访问，提升任务性能。开启NUMA感知的详细操作步骤如下：

1. 安装numactl。
  1 yum install numactl.aarch64 -y

2. 按照如下信息修改“$HADOOP_HOME/etc/hadoop/yarn-site.xml”文件，开启NUMA感知。

```
<property>
<name>yarn.nodemanager.numa-awareness.enabled</name>
<value>true</value>
</property>
<property>
<name>yarn.nodemanager.numa-awareness.read-topology</name>
<value>true</value>
</property>
```
