Optimize CPU and database performance

Job ID: 31386370

Budget: $10 – $30 USD

I need to optimize the performance of the CPUs and the postgree database on a dedicated server with centos 7 system.
I have a web application with java installed on the server and when several tasks are executed at the same it takes a long time to load the application.
It is a dedicated server with 256GB of Ram and 20 CPUs.
Attached screenshot of htop in which you can see 50% of the executed tasks and it is seen that the processors are at maximum, therefore, when trying to access the report of the tasks executed in the application, it takes too long.
You can also see the load average too high.