-2

I currently have one small VPS which I am using to host a Wordpress site (Nginx,PHP5,MariaDB). I have started to run into some memory issues (DB crashes) indicating it's probably time to move to a larger VPS.

I have two options:

  1. I can upgrade the current VPS doubling it's memory.

  2. I can keep the current VPS, add a second same sized VPS, and move MariaDB to it.

The additional costs for either option would be the same. As a rule of thumb which solution is likely to provide overall better performance and stability?

EDIT

I don't think the possible duplicate is in fact duplicate. That question in very broad and is more about general solutions for capacity planning. What I'm trying to understand is the relative merits of two possible solutions and how to better evaluate between them. The specify capacity issue (memory shortage) is mostly ancillary to my question.

  • 1
    Despite your protestations, this is a dupe. The relative merits depend upon workload and things you haven't mentioned. Capacity planning is very broad and very dependent upon workload - that's why we have that dupe. We're basically saying we don't do capacity planning. – user9517 Apr 10 '16 at 13:12
  • @lain, I've stated the general workload (though I realize there are still a lot of unknowns). Perhaps if the answers there talked about "more servers" vs "bigger servers" and what needs to be answered to determined which is better under various conditions. – matthew Apr 10 '16 at 13:34
  • 1
    Matthew: the core thing you need to understand from the dupe question is that you need to load test your specific workload on your equipment with your configuration. Any other recommendations other than that are useless. Do some testing with each of your scenarios and see which works best. With hourly billing being available from multiple providers, doing this testing will only cost a few USD max. – EEAA Apr 10 '16 at 14:19
  • Wearing my DBA hat, I'd point out that in the specific case of MariaDB (MySQL) and web applications, this question merits purpose-specific consideration and benchmarking will likely give the wrong answer. If the web app exhibits a pattern of resource use under load that parallels the database, you're at risk of the system killing a process to accommodate the memory demands of another. The popularity of the dba.SE answers linked in this SF answer attests to the fact that this is a common availability killer. I vote to reopen on this basis. – Michael - sqlbot Apr 10 '16 at 16:29
  • 1
    Thanks @Michael-sqlbot. This is exactly why I was asking the question. Though perhaps poorly worded it was not intended to be a question about benchmarking. – matthew Apr 10 '16 at 19:20
2

The exact answer will depend on the workload.

Performance

If you get another VPS with the same specs as the first, you will have twice the memory, twice the CPU, twice the disk, and twice the network. If you are able to utilize all those resources, you may get better performance from two VPS than doubling just the memory of your current.

However if you have application on one VPS communicating with database on the other, there will be a significant risk of the roundtrip time becoming a bottleneck. Another argument in favor of a single VPS with more memory is the additional flexibility in which part of your system uses the memory. You cannot easily shift unused memory on one VPS to an application on another VPS.

Stability

If an outage of a single VPS will cause your system to keep responding but with an increased response time, the overall stability of your system will appear better to the users, than if you had only a single larger VPS.

However if you have a setup where both VPS need to be online in order for your system to be usable at all, then the two VPS will likely be a less reliable solution.

Not the answer you're looking for? Browse other questions tagged or ask your own question.