Question

Low on RAM: Should i get two $20 dollars droplets (to combine 4 cores and 4Gb RAM ) or one $40 dollar droplet (2 cores and 4GB RAM)?

Posted December 27, 2017 1.7k views
Server OptimizationUbuntu 16.04

Hello Digital Fellas.

I am getting pretty low on ram (338Mb Available) so i know i will have to upgrade very soon to a bigger droplet. But someone pointed to me that i could also get two $20 dollars droplets instead of one, to separate MYSQL from, Nginx Node, and Apache i guess and have 4 cores instead of 2. Cause Digital Ocean $40 dollars droplet comes with 2 cores and not the 4 than i can get if i pay for two $20 dollars droplets.

This is my setup and how i my current droplet:

I currently have a $20 dollar ubuntu 16.04 droplet with 68 running websites. I know they are a lot but since the websites do not get too many concurrent connections the ubuntu server has been working fine for more than a year now.

I am using Nginx and Mysql for the websites. All the websites have https enabled. (thanks to lets encrypt). and Im using php-fpm for a few websites in need of php. I also have apache configured as the backend for ONE website (you can configure Nginx as a reverse-proxy for Apache), but i am planning to maybe move that particular website to its own droplet, cause its the only one in need of Apache. Basically i have Apache in my server for just one website. And Nginx for the rest.

Also i have discovered in the last few months about the Ghost Blog application which i think its pretty cool. But i had to install node on my server. Since then i have created about six Ghost blogs on my droplet. I have noticed that this ghost blog are pretty RAM consuming. Also every blog has to have its own Mysql database.

Since i have HTOP installed i can run this command: ps -A --sort -rss -o comm,pmem | head -n 11 and get this result:

mysqld          21.8
node             4.7
node             4.4
node             4.3
node             4.3
node             4.2
node             4.2
php-fpm7.0       4.2
php-fpm7.0       4.0
node             4.0

Also the Digital Ocean Top Processes Graphic gime more or less similar numbers for RAM consumption:

<^>node 34.44 %
mysqld 21.84 %
ghost run 14.39 %
php-fpm7.0 13.66 %
nginx 3.57 %

apache2 2.42 %

systemd-journal 1.43 % <^>

The CPU usage is very Low so it does not worry me. What worries me is that i only have around 338 Mb of RAM left. I am worried in future concurrent connections that might collapse the droplet.

So what do you recommend. Should i go for one $40 dollar droplet or two $20 dollar droplets and separate things? Also how should i separate them? Should i have MYSQL on one droplet and all the other stuff (Nginx, Node and PHP - FPM ) on the other? What are the pros and cons? I am new in this. Thanks in advanced.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

I think you are on the right track looking into your existing CPU/RAM usage and coming up with a logical way to split up usage across 2 droplets.... but I’m not sure at all if its just better to let the OS do thread ballancing. I have a simmilar situation, minus getting extra CPU cores with 2 droplets:

I’m curious about a simmilar dillema. Should I get 2 $10 droplets or 1 $20 droplet?

I plan on doing web application hosting with nginx, postgresql, python/Django, and some data crunching with Python in the background on a daily scheduled interval. While maybe also hosting a small Mumble voicechat server, OpenVPN, and a torrent client.

Would it be better to go with 2 droplets and split these services up, or just go with a single droplet and hope the OS kernel ballances the CPU threads good enough on it’s own.

I’m going to start off with what you have done and start with a single $20 droplet, set everything up, and look into the Monitoring data, as to what proccesses are the biggest culprits. If there are any proccesses that are regularly high CPU or RAM, i would imaging it might be somewhat benefitical to have 2 droplets, and split up certain things.... but i’m just guessing here.

obviously your situation is different becuase you are getting more cores with 2 droplets, which would seem to make that option superior to me. I’m still curious about a more 1:1 comparison of benefits:resources to my scenario though.

Submit an Answer