How to solve the problem of high memory/CPU usage

When memory usage is too high

  1. free to see the memory margin
  2. ps Look at the process that takes up high memory
  3. top to see the highest thread of the highest process
  4. jmap exports the thread to a heap dump file
  5. Use visualVM to analyze the file

When the CPU usage is too high

  1. top view CPU occupancy high process
  2. top view the highest thread id of the highest process occupied by the cpu
  3. jstack exports the stack file of the process stack usage
  4. cat+grep+thread id to browse related logs

Guess you like

Origin blog.csdn.net/qq_41634872/article/details/113884932