Openmrs db high cpu usage(>1000%) in bahmni docker standard

We are using bahmni docker standard version and we have High CPU usage mostly above 1000%. What can we do about this we are looking at long running queries and trying to optimize them is their any configuration that can help up debug or solve this problem. Thank You!

@abenezeramre We would need more details to investigate?

  1. Is the high CPU usage consistent always ? Is it above 1000% always? Or is decreases when system not in use ?
  2. What is your data volume ?
  3. Do you have any reports running ?
  4. Also is the Database being queried by any other clients other than application?

Thank you @mohant for asking. Our problem is resolved.

One of the problem were some unused providers were being fetch with emrapi which delays the ui from appearing.

The main solution was giving MySQL enough buffer size. Our database size were 12GB but MySQL had only 4GB buffer also because our storage is HDD swap was not that much of a help. When we increased the buffer to 8GB or even 6GB our performance issue was resolved.