Updated on 2025-08-22 GMT+08:00

Configuring Resources for a NodeManager Role Instance

Scenario

If the hardware resources (such as the number of CPU cores and total memory) of the nodes where NodeManager is deployed are different, but the available hardware resources of NodeManager are set to the same value, it may cause performance waste or abnormal status.

This section describes how to change the number of virtual CPU cores and available physical memory size for each NodeManager role instance to make full use of node hardware resources.

Impact on the System

NodeManager role instances must be restarted for the new configuration to take effect, and the role instances are unavailable during restart.

Procedure

  1. Log in to FusionInsight Manager.

    For details about how to log in to FusionInsight Manager, see Accessing MRS FusionInsight Manager.

  2. Choose Cluster > Services > Yarn > Instances.
  3. Click the role instance name corresponding to the node where NodeManager is deployed, switch to Instance Configuration, and select All Configurations.
  4. Search for following parameters and modify them as required.

    Table 1 Parameter description

    Parameter

    Description

    Example Value

    yarn.nodemanager.resource.cpu-vcores

    Number of virtual CPU cores that are available for NodeManager on the current node.

    You are advised to set this parameter to 1.5 to 2 times the number of logical cores on the node.

    Value range: greater than 0

    8

    yarn.nodemanager.resource.memory-mb

    Physical memory that is available for NodeManager on the current node.

    You are advised to set this parameter to 75% of the actual physical memory size of the node.

    Value range: 1 to 1800000000000

    16384

  5. If you need to configure the maximum number of CPU cores or maximum memory of a single container, perform the following steps: If the configuration is not required, skip this step.

    1. Choose Cluster > Services > Yarn > Configurations > All Configurations.
    2. Search for following parameters and modify them as required.
      Table 2 Parameter description

      Parameter

      Description

      Example Value

      yarn.scheduler.maximum-allocation-vcores

      Maximum value requested by each container of ResourceManager, represented by the number of virtual CPU cores.

      Requests where the requested values are greater than this value are invalid and the values will be overwritten by this parameter.

      512

      yarn.scheduler.maximum-allocation-mb

      Maximum memory requested by each container of ResourceManager.

      If much memory is requested, the memory that is set by the parameter is allocated.

      The unit is MB.

      524288

    3. Save the configuration and restart the YARN service. Skip 6.

  6. Save the modification and restart the NodeManager role instance.