Help Center/ MapReduce Service/ Troubleshooting/ Cluster Management/ High Memory Usage of the Knox Process
Updated on 2022-09-14 GMT+08:00

High Memory Usage of the Knox Process

Issue

The memory usage of the knox process is high.

Symptom

The memory usage of the active Master node is high. The top -c command output shows that the memory usage of the knox process exceeds 4 GB.

Cause Analysis

The memory is not separately configured for the knox process. The process automatically allocates available memory based on the system memory size. As a result, the knox process occupies a large amount of memory.

Procedure

  1. Log in to the Master nodes as user root.
  2. Open the /opt/knox/bin/gateway.sh file. Search for APP_MEM_OPTS, and set its value to -Xms3072m -Xmx4096m.
  3. Log in to Manager and click Hosts. Find the IP address of the active Master node (that is, the node with a solid star before the hostname), and log in to the background of the node.
  4. Run the following commands to restart the process:

    su - omm

    sh /opt/knox/bin/restart-knox.sh