Title: Separate database server?
Last modified: August 22, 2016

---

# Separate database server?

 *  [lulubel](https://wordpress.org/support/users/lulubel/)
 * (@lulubel)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/)
 * I hope this is the correct place to post this. I very rarely post here because
   I manage to get all the help I need from google and YouTube, but this is something
   I really need specific advice on.
 * I have 5 blogs running on one dedicated server with HostGator. I’m not a fan 
   of simple and clean, so they all run fairly complex themes and several plugins.
   Two also run the Fast Member membership plugin.
 * Everything was running nicely, until I moved 3 other (unrelated) sites over from
   GoDaddy. These 3 are all heavy database users, although the load they put on 
   apache is generally quite light, and I noticed an immediate slow down in the 
   speed the blogs load. This is most noticeable when loading the member only content
   on the blogs that have it, although all 5 blogs are slower overall. (Since my
   customers pay for the member only content, it’s critical that it loads quickly.)
 * Would running a separate database server improve the blog loading speeds in this
   situation? It’s something I’m quite happy doing, I just want to make sure it’s
   worthwhile before I pay for a second server.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214034)
 * IMHO your best value for speeding up your websites is to migrate them to higher
   performance (and more expensive) web hosting, still on shared hosting, but if
   your subscribers can afford it even move to dedicated hosting.
 * Unless you have a well defined, managed and resource network environment, putting
   a network between your server and its database is only going to make everything
   worse.
 *  [InclusiveHost-John](https://wordpress.org/support/users/inclusivehost-john/)
 * (@inclusivehost-john)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214072)
 * Ross is correct. Trying to setup a third party DB server in a different location
   and connect it with a lower end hosting account is only going to add delays. 
   This would be especially true if there is a network issue between your accounts
   such as packet loss, etc. The resulting performance would be unbearable.
 * A secondary DB server really shines when you have a private network connection
   within the same DC. This ensures almost no downtime or packet loss, and only 
   a fraction of a ms in response. This wouldn’t be possible with HG.
 *  Thread Starter [lulubel](https://wordpress.org/support/users/lulubel/)
 * (@lulubel)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214075)
 * I’m not sure if you mis-read my post. I already have a dedicated server, with
   root access. All the websites running on the server are my own, so any additional
   costs come out of my own pocket.
 *  [InclusiveHost-John](https://wordpress.org/support/users/inclusivehost-john/)
 * (@inclusivehost-john)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214078)
 * I see, sorry about that.
 * Did they already optimize your Apache, MySQL configuration files with this advanced
   usage in mind? What is your bottleneck? It may be possible to offload MySQL to
   an extra SSD drive for increased performance.
 * Does hostgator offer private networking between servers? You would want to make
   sure you are setup in the same DC at least.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214080)
 * The first thing to do is find out where the bottlenecks are. There’s a lot of
   server monitoring systems out there that can tell you what processes are taking
   the most resources and time. It coudl be that processing is what’s taking up 
   all of the time, and separating the sites to two or more servers will do more
   then adding a separate database server.
 * Asking if a separate server will help is trying to solve a problem when you don’t
   know the actual question. Find out what the problem really is before you jump
   to any conclusions. 🙂
 *  Thread Starter [lulubel](https://wordpress.org/support/users/lulubel/)
 * (@lulubel)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214109)
 * Thanks for the suggestions.
 * Putting MySQL onto an SSD drive is an interesting idea that I hadn’t considered,
   and it could solve the problem. Having a separate MySQL drive has solved the 
   problem before when the database was under heavy load.
 * I know the problem is caused by the 3 non-WP sites, and I also know it’s the 
   way they access the database that puts the server under heavy load. The databases
   are already optimised as far as they can be to reduce this. (I worked with a 
   very experienced server admin a few years ago, and he showed me how to optimise
   the databases. Unfortunately, I’ve lost contact with him, or I would be asking
   him for advice now.) Also, when I look in process manager in WHM, MySQL is using
   a larger percentage of CPU and memory than all other processes put together. 
   I’m looking now at a very quiet time. The major slow down takes place during 
   the US late afternoon and evening.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214121)
 * Then it’s not really the MySQL server that’s the problem. It’s those other sites
   that are being SQL heavy. Move those to a separate server, along with the database,
   and you’ll see everything gain performance.
 *  [Daniel Kanchev](https://wordpress.org/support/users/danielkanchev/)
 * (@danielkanchev)
 * SiteGround Representative
 * [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214180)
 * You can actually optimize the sites in many different ways. MySQL may not be 
   the only issue. Here are some ideas about different optimizations you may implement:
 * 1. Check you PHP handler on the server. Often the PHP setup slows down websites.
   My advice is to use FastCGI or PHP-FPM and PHP opcode caching – the PHP APC module
   is usually a great fit.
 * 2. If you have the option to use an HTTP reverse proxy then do it. The two most
   popular solutions are Nginx and Varnish. Once you implement full page caching
   the database will not be queried at all (for part of the information) and this
   way the CPU will remain idle.
 * [http://codex.wordpress.org/Nginx](http://codex.wordpress.org/Nginx)
 * [https://wordpress.org/plugins/varnish-wp/](https://wordpress.org/plugins/varnish-wp/)
 * 3. Use Memcached or Redis to store different objects.
 * 4. Move your static resources to another server or use a CDN service.
 * 5. Reconfigure MySQL to use Linux tmpfs if you have enough RAM on the server:
 * [http://2bits.com/articles/reduce-your-servers-resource-usage-moving-mysql-temporary-directory-ram-disk.html](http://2bits.com/articles/reduce-your-servers-resource-usage-moving-mysql-temporary-directory-ram-disk.html)
 * [http://everythingmysql.ning.com/profiles/blogs/using-tmpfs-for-mysqls-tmpdir](http://everythingmysql.ning.com/profiles/blogs/using-tmpfs-for-mysqls-tmpdir)

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Separate database server?’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [server](https://wordpress.org/support/topic-tag/server/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 8 replies
 * 5 participants
 * Last reply from: [Daniel Kanchev](https://wordpress.org/support/users/danielkanchev/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/separate-database-server/#post-5214180)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
