Portal Home > Knowledgebase > Articles Database > Dedicated MySQL Server


Dedicated MySQL Server




Posted by YCMaker, 05-25-2010, 03:04 AM
Hi, I run a pretty popular forum, and I'm thinking about buying another server to help with the load times, which occasionally run very high due to MySQL slowdowns. The forum is powered by myBB - my question is, how much do you think putting the database on a separate server would help with overall server load? As far as I can tell, Apache and other processes running on the server take only a minuscule amount of CPU cycles compared to the MySQL process. Would it be possible to load balance between a dedicated MySQL server and a server running both MySQL and Apache, and if so, would this be more beneficial then simply splitting the two services between two servers? Thanks for any help!

Posted by nessic, 05-25-2010, 03:21 AM
I would think so. I mean, It will always help if you are taking 1 load or another of a server. I mean, You can always optimize your MySQL and Apache to run efficiently on one server. Depending on how much your MySQL is using in your resources I guess it would be best to think everything over first.

Posted by UNIXy, 05-25-2010, 03:28 AM
If the other processes are barely making a dent on CPU, it might not be that beneficial to split services. Unless you're putting the DB on a much more capable server. I recommend investigating the excess resource usage by MySQL. I wouldn't be surprised if it's one or two SQL queries that are pushing the whole server to the brink. Pinpoint the queries and optimize them. You'll probably save a lot of cash as a result. Regards Joe / UNIXY

Posted by skomes, 05-25-2010, 03:55 AM
You can replicate the database and have it running on a couple of servers and then use load balancing to ease the strain. That would give you some redundancy and improve performance. The problem with this is that there aren't many applications that are programmed to take advantage of and use this feature. I don't know if phpBB can do this, something you should take a look into. I'm not too sure how you would go about optimizing phpBB queries, I'd imagine it would be a pain. Probably best to pinpoint what is causing the strain before taking any action.

Posted by tim2718281, 05-25-2010, 04:49 AM
Generally not at all ... it might slow things down, because data returned from SQL queries would have to be transmitted across a network link between the servers, and that adds time to processing.. Unless the Apache/PHP etc processing is so demanding that it strains the database server, it would generally seem better to keep the processing on one system to eliminate the network delays. (Just imagine a query that retrieves 1GB of data. On a server with four disks, capable of a combined read rate of maybe 400 megabytes a second, that could take 2.5 seconds. But it would take 8 seconds to transmit the data across a 1gbps link ... so splitting the servers could slow the query down by a factor of three) Now if you're running *multiple* servers, things can get different. It might well work out better to poool all the database server resources in a single high-powered systemn shared amongst all the web servers. I'm talking in terms of maybe eight or a dozen high speed disks, 16GB of RAM, and so on.



Was this answer helpful?

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

Also Read
Restoring a backup! (Views: 502)