Help Center/ MapReduce Service/ Troubleshooting/ Cluster Management/ High Memory Usage of the Knox Process
Updated on 2023-11-30 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, find the IP address of the active master node (that is, the node with a solid star before the hostname) in the host list, and then log in to the node.
  4. Run the following commands to restart the process:

    su - omm

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