How to upgrade DO to higher plan?

(Lê Trần Đạt) #1

I’m using DO $10 plan for my forum. However, the forum is quite lagging when there are around 20-40 concurrent users. I am going to upgrade DO to $20 plan, could anyone guide me an easy way to upgrade to new plan with less impact to user experience?

(Jeff Atwood) #2

This is mostly covered by Digital Ocean, either a flexible or permanent Droplet resize.

See How To Resize Your Droplets on DigitalOcean | DigitalOcean

A good rule of thumb is to use the flexible resize if you need more CPU and memory but not additional storage, and you want the ability to rollback to a cheaper droplet size in the future. If you need more CPU, memory, and storage, use the permanent resize.

Permanent resize is available in all regions except AMS1, NYC1, and NYC2. Flexible resize is available in all regions.

Does require a power off, I would estimate one hour of downtime just to be safe.

Note that if you resize memory you should increase the database memory settings in app.yml as well so Postgres can make better use of the additional memory. And increase the unicorn worker count in the same place so more requests can be handled concurrently.

(Lê Trần Đạt) #3

I followed this instruction discourse/ at master · discourse/discourse · GitHub

If you are using a 1 GB instance, set UNICORN_WORKERS to 2 and db_shared_buffers to 128MB so you have more memory room.

if I use 2GB instance, should I increase UNICORN_WORKERS to 4 and db_shared_buffers to 256MB?

Is my app.yml missing newer settings?
(Jeff Atwood) #4

Yes I think you should.