Portal Home > Knowledgebase > Articles Database > How to optimize and tuneup mysql server ???


How to optimize and tuneup mysql server ???




Posted by p-root, 12-20-2008, 03:46 AM
How to optimize and tuneup mysql server ??? Hi, I have Linux server with WHM/Cpanel with mor then 2000 domains now copule of days i faced the problem regarding Mysqld is using 90-100% CPU usage and 1500-2000 queries are running at a time so please guide me how can i tuneup and optimize it so that it is take normal cpu usages and how can i tuneup mysql server so it doesn't go high. I have configure my.cnf file as ---> mysqld] safe-show-database old-passwords = 1 max_allowed_packet = 4M set-variable = max_connections=100 safe-show-database query_cache_limit=1M query_cache_size=128M query_cache_type=1 key_buffer_size=256M #table_cache=150 thread_cache_size=200 #log-slow-queries = /var/log/mysql-slow.log long_query_time = 3 table_cache=9092 Please do needful......Thanks in advance. p-root

Posted by Steven, 12-20-2008, 04:09 AM
I would start by using: wget http://www.day32.com/MySQL/tuning-primer.sh sh tuning-primer.sh Your configuration definitely could use some work. __________________Steven CiaburriSystem Administration ExtraordinaireCompetent Linux Server Management from Rack911

Posted by MikeDVB, 12-20-2008, 04:25 AM
Quote: Originally Posted by Steven I would start by using: wget http://www.day32.com/MySQL/tuning-primer.sh sh tuning-primer.sh Your configuration definitely could use some work. Very nice script, I'm definitely going to hold onto this! If I could give you reputation I certainly would. __________________█ Michael Denney - MDDHosting, LLC - Professional Hosting Solutions█ Shared, Reseller, Semi-Dedicated, VPS, and Dedicated █ http://www.mddhosting.com/

Posted by Steven, 12-20-2008, 04:40 AM
Quote: Originally Posted by MikeDVB Very nice script, I'm definitely going to hold onto this! If I could give you reputation I certainly would. It is a nice script. I use it as a base configuration and fine tune it afterwards. I love it. __________________Steven CiaburriSystem Administration ExtraordinaireCompetent Linux Server Management from Rack911

Posted by p-root, 12-20-2008, 05:38 AM
Hi, Thanks a ton but can you please update me it is better for my shared hosting server is there any drawback or something else because this is shared hosting server if some thing goes wrong my client complaint me so please tell me....so that i try this script on my shared hosting server..... Thanks p-root

Posted by Steven, 12-20-2008, 05:41 AM
Quote: Originally Posted by p-root Hi, Thanks a ton but can you please update me it is better for my shared hosting server is there any drawback or something else because this is shared hosting server if some thing goes wrong my client complaint me so please tell me....so that i try this script on my shared hosting server..... Thanks p-root There is no drawbacks. __________________Steven CiaburriSystem Administration ExtraordinaireCompetent Linux Server Management from Rack911

Posted by chrismfz, 12-21-2008, 01:02 AM
Quote: Originally Posted by Steven I would start by using: wget http://www.day32.com/MySQL/tuning-primer.sh sh tuning-primer.sh Your configuration definitely could use some work. Wow.... Excellent script... By the way, is there something similar to that for apache httpd? Something which will analyze statistics, logs etc and calculate the recommend child(s), max min memory usage, cpu usage, max connections, max connections per child etc ? Or something like that anyway... Regards, Chris __________________MyIP net-Works Internet Services | | DNS Cluster Solution Software Developement

Posted by p-root, 12-22-2008, 05:32 AM
Hi, Thanks for your reply and i will run this script on sunday because in week days i can't run this script. once again thanks stevan.. p-root



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Reseller Selection (Views: 656)