16 Cores 12 GB RAM Dedicated MySql Configuration
Solution 1:
The only way that a config for 16GB on a 12GB box would be an issue is if MySQL is trying to use more memory resources than the system has. Most MySQL servers are configured to use too much memory, but that doesn't cause them to run poorly from day 1. If the box isn't swapping and MySQL getting OOM killed, it's not the fact that it's a config for a 16GB box on a 12GB box.
If the issue is on the MySQL side, you can start by checking the process list with SHOW PROCESSLIST;
. If it's taking 500 seconds, you'll definitely see some hanging queries. If the queries being executed are being truncated, you can run SHOW FULL PROCESSLIST;
.
I would also suggest turning on slow query logging. Once you identify any problem queries, you can use the EXPLAIN statement to see if your queries are using the indexes you have.
If you isolate the issue to the database, there are still a lot of variables. The first step is finding out what queries are going slowly and go from there. You will probably find that improving the queries will give the biggest improvement over any server-side config changes.