Is a 1GB DO droplet good enough?
-
I have a small community of about 60 users and since installing NodeBB I've run into an issue when I am having to powercycle my server daily. The first time I kept running out of memory on my 512mb droplet, so I upgraded to the 1GB but I'm still getting the same issues.
Everything I got setup ran fine and normal for a few days, but now with a little bit more activity on the community I'm running into this issue almost daily.
I host 3 other sites as well (two WordPress, one just static, all non node sites)'
I did some research and most people said everything was fine, so I'm not sure what the issue really is or how to check for the issue. When I scope out my CPU or MEM usage using top it doesn't seem to be using enough to warrant frequent slow loads or restarts.
Of course, I am a super noob at this and this is my first node site in general that's actually live. Any help or maybe just pointing me in the right direction would be awesome.
P.S. (could it be certain plugins?)
-
I host 3 other sites as well (two WordPress, one just static, all non node sites)'
Maybe it's reason. Without any tweaking, my vps ( 3 wordpress like you) frequently run out of memory. You should create swap for your droplet and use cache plugin for wordpress.
Goodluck
-
@adrianrodriguez As @hieudang suggests, you'll need to add swap to your droplet, otherwise OOM events will cause the droplet to kill processes, like your database
NodeBB itself doesn't use too much memory (I hope), it's the database that stores some data in memory to improve read times. With no swap, it's very possible to run out of memory.
-
@julian Thanks for the input and sorry I never responded. I restarted the server along with adding a 2GB swap file for my droplet, ran for the last three days but crashed again today Not sure what I'm doing wrong exactly, when I looked at graphs I noticed my CPU usages spiked at hit over 100% for about an hour for some odd reason. Hopefully I've got my configuration setup.
-
@adrianrodriguez for the price of a 512MB droplet, you can get like 2GB RAM on OVH for 3,49$.
Just sayin' and yes, these VPS servers work quite well. At least I never had any issues in the past 2 months. Overall I am an OVH customer since more than 2 years and never had a problem with them. -
@adrianrodriguez said in Is a 1GB DO droplet good enough?:
@julian t, ran for the last three days but crashed again today Not sure what I'm doing wrong exactly, when I looked at graphs I noticed my CPU usages spiked at hit over 100% for about an hour for some odd reason. Hopefully I've got my configuration setup.
Hm, that's odd. What do you see in
logs/output.log
? -
This post is deleted!
-
@julian said in Is a 1GB DO droplet good enough?:
logs/output.log
Checking... Will update here
UPDATE
Here is my log: (warning it's huge)
I'm not really sure what to look for though.
-
@julian I had a very extensive talk about the use of Swap with a friend recently.
As a matter of fact the Swap storage will be always slower than RAM. So what you basically do is to move "fast" applications to a "slow" enviroment.The best example would be a Redis database, which mainly is so fast because it is working in memory. If the Redis instance would now use the Swap storage it will drastically slow down.
In my opinion it is more than okay to do that in a dedicated system (database only server), but in a shared environment this would mean an extended use of I/O. I/O that is needed by the website itself to serve its files at a proper speed.
Of course the required amount of I/O operations won't be that much for a websites with a few request, but for a mid traffic site things drastically change.
Besides the loss of I/O performance and general slow downs overall, you also increase the risk of storage failure. SSD's might be super robust and performent, but as magnet drives they have "physical" limitations - storage cells.
Using Swap will definitely increase the usage of these and will help to make the SSD die off even faster.But as said, most of these drawbacks will be noticable as more the site itself grows and a certain level of connections (and therefore "hardware users") is reached.
To get back to the title:
Basically you can run NodeBB on an even smaller server. Thanks to NodeJS the RAM consumption is kept at a quite low level. With the use of a highly efficient webserver like NGINX, MariaDB and HHVM (for your PHP sided stuff). You can definitely run several websites at once on a relatively small setup.Yet it all depends on the amount of visitors you have and what you "show" them. For example I once saw a MySQL database of WordPress with 60MB of content. A database of this size can definitely slow the overall experience down, if it the system is not capable of handling this. After some optimization the database decreased to 2.5MB (too many plugins...).
Of course the whole database isn't served, but as bigger the server sided files get as more work it becomes for the system.
-
Yet it all depends on the amount of visitors you have and what you "show" them. For example I once saw a MySQL database of WordPress with 60MB of content. A database of this size can definitely slow the overall experience down, if it the system is not capable of handling this. After some optimization the database decreased to 2.5MB (too many plugins...).
I have a wordpress database of around 1.4GB and it sucks.
-
@Gaurav-Grv-Robinson ever thought about clearing it manually by dropping unused tables?
If you want feel free to PM me and I will take a look at it. But lets discuss this in the Chat as it is unrelated to the actual topic