Why you allocate 16 CPU into the database? This indicates to me that you may also need a database optimization. What database are you using? Do you store everything into the database? This is cpu consuming, on terms of performance. Some critical files that are requested frequently and do not require complicated sql queries, maybe you should try to store them in plain files and change the code accordinly. Are your using ssd disks or not?