---
title: 开启NUMA感知
description: "在Yarn 3.1.0版本中启用NUMA，以提升集群资源调度的效率。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengbds/ecosystemEnable/Hive/topic_0281357775.html
sourcePath: /source/zh/kunpengbds/ecosystemEnable/Hive/topic_0281357775.html
indexId: 67ce62135b9661bd09760c1a39b76d9f6f84123db901a179e588a6587a30a4d764
---
# 开启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>
```
