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:
I can upgrade the current VPS doubling it's memory.
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.
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.