The best way to get optimization recommendations for your specific hardware resources and database queries on this server is to run the mysqltuner script. It can be ran by issuing the following command as root in a shell:
/usr/local/cpanel/3rdparty/mysqltuner/mysqltuner.pl
It will analyst MySQL, its databases, queries and available resources and will make recommendations on configuration changes. To give accurate recommendations, MySQL will need to be up and running for at least 24 hours before running the mysqltuner script. Once the changes it recommends is implemented, it is usually a good idea to allow another 24 hours of MySQL being online and re-running it.
You may need to perform several iterations of this to get the best optimization for the service.