Help Center/ MapReduce Service/ User Guide/ MRS Cluster O&M/ MRS Cluster Alarm Handling Reference/ ALM-16005 The Heap Memory Usage of the Hive Process Exceeds the Threshold
Updated on 2025-08-09 GMT+08:00

ALM-16005 The Heap Memory Usage of the Hive Process Exceeds the Threshold

Alarm Description

The system checks the Hive service status every 30 seconds. The alarm is generated when the heap memory usage of a Hive service exceeds the threshold (95% of the maximum memory).

You can choose O&M > Alarm > Thresholds > Hive and change the threshold.

The alarm is cleared when the Hive heap memory usage is less than or equal to the threshold.

Alarm Attributes

Alarm ID

Alarm Severity

Auto Cleared

16005

Major

Yes

Alarm Parameters

Parameter

Description

Source

Specifies the cluster for which the alarm is generated.

ServiceName

Specifies the service name for which the alarm is generated.

RoleName

Specifies the role name for which the alarm is generated.

HostName

Specifies the object (host ID) for which the alarm is generated.

Trigger Condition

Specifies the threshold for triggering the alarm.

Impact on the System

When the heap memory usage of Hive is overhigh, the performance of Hive task operation is affected. In addition, a memory overflow may occur so that the Hive service is unavailable.

Possible Causes

The heap memory of the Hive instance on the node is overused or the heap memory is inappropriately allocated. As a result, the usage exceeds the threshold.

Handling Procedure

Check heap memory usage.

  1. On the FusionInsight Manager portal, choose O&M > Alarm > Alarms and select the alarm whose Alarm ID is 16005. Then check the role name in Location and confirm the IP address of the instance.

    • If the role for which the alarm is generated is HiveServer, go to Step 2.
    • If the role for which the alarm is generated is MetaStore, go to Step 3.

  2. On the FusionInsight Manager homepage, choose Cluster > Services > Hive > Instances and click the HiveServer for which the alarm was generated to go to the Dashboard page. Click the drop-down menu in the Chart area, choose Customize > CPU and Memory, select HiveServer Memory Usage Statistics, and click OK. Check whether the used heap memory of the HiveServer service reaches the threshold (default value: 95%) of the maximum heap memory specified for HiveServer.

    Figure 1 HiveServer Memory Usage Statistics

  3. On the FusionInsight Manager homepage, choose Cluster > Services > Hive > Instances and click the MetaStore for which the alarm is generated to go to the Dashboard page. Click the drop-down menu in the Chart area and choose Customize > CPU and Memory, and select MetaStore Memory Usage Statistics and click OK. Check whether the used heap memory of the MetaStore service reaches the threshold(default value: 95%) of the maximum heap memory specified for MetaStore.

    Figure 2 MetaStore Memory Usage Statistics

  4. On the FusionInsight Manager homepage, choose Cluster > Services > Hive > Configurations > All Configurations. Choose HiveServer/MetaStore > JVM. Adjust the value of -Xmx in HIVE_GC_OPTS/METASTORE_GC_OPTS according to the following rules. Click Save.

    1. Suggestions for GC parameter settings for the HiveServer:

      When the heap memory used by the HiveServer process reaches the heap memory threshold set for the HiveServer process, change the value of -Xmx to twice the default value. For example, if -Xmx is set to 2 GB by default, change the value of -Xmx to 4 GB.

      On the FusionInsight Manager homepage, you can choose O&M > Alarm > Thresholds > Hive > CPU and Memory > HiveServer Heap Memory Usage Statistics (HiveServer) to view the threshold.

      Change the value of -Xms so that the ratio of -Xms to -Xmx is 1:2, which prevents performance from being affected when JVM dynamically adjusts the heap memory size.

    2. Suggestions for GC parameter settings for the MetaServer:

      When the heap memory used by the MetaStore process reaches the heap memory threshold set for the MetaStore process, change the value of -Xmx to twice the default value. For example, if -Xmx is set to 2 GB by default, change the value of -Xmx to 4 GB.

      On the FusionInsight Manager homepage, you can choose O&M > Alarm > Thresholds > Hive > CPU and Memory > MetaStore Heap Memory Usage Statistics (MetaStore) to view the threshold.

      Change the value of -Xms so that the ratio of -Xms to -Xmx is 1:2, which prevents performance from being affected when JVM dynamically adjusts the heap memory size.

  5. Click More > Restart Service to restart the Hive service.

    During Hive service restart, instances cannot provide services for external systems, and the SQL tasks that are being executed on the instances may fail.

  6. Check whether the alarm is cleared.

    • If yes, no further action is required.
    • If no, go to Step 7.

Collect fault information.

  1. On the FusionInsight Manager portal, choose O&M > Log > Download.
  2. Select Hive in the required cluster from the Service.
  3. Click in the upper right corner, and set Start Date and End Date for log collection to 10 minutes ahead of and after the alarm generation time, respectively. Then, click Download.
  4. Contact the O&M personnel and send the collected logs.

Alarm Clearance

After the fault is rectified, the system automatically clears this alarm.

Related Information

None