When you install Discourse on an instance with 4GB or more you should consider the following:
Monitor your setup
If you elect to use a higher end setup we strongly recommend you set up monitoring using Newrelic or some other monitoring service. You will need to analyze the results of configuration changes to reach an optimal setup.
Out of the box Discourse Docker ships with 3 web workers
Web workers are served via unicorn, this process is capable of serving one request at a time, you should at least have one worker per CPU. You can increase this number in your template like so
env:
# to raise to 6 workers
UNICORN_WORKERS: 6
Database configuration is optimised for 2GB of RAM
As guideline you want to dedicate 1/3 of the memory available to postgres to “shared_buffers” to raise this:
params:
db_shared_buffers: "1GB"
Be sure to install latest Discourse Docker
We update our base templates with various optimisations, be sure to update regularly to ensure you take advantage of it.
Thanks @sam I did this changing it to db_shared_buffers"4GB" and UNICORN_WORKERS: 6 and then did a ./launcher rebuild app, how do I now know if those settings took effect? I can’t seem to find anywhere in the admin side to show that info but I am new so quite possibly missing it amongst the many settings screens.
Thanks so it’s probably then allocated the 4GB I specified. Might be nice in a future update to have a simple server settings page inside the admin settings to show this?
I have 22Gb allocated to the Proxmox VM I am running it on and only two nginx sites running plus 1 discourse site (proxied through nginx) so I figured I could up that mem allocation substantially to 4Gb. I guess I will see when the site truly goes live and people start using it (hopefully ) how it performs. Lots of free memory to still throw at it when needed but that warning system would indeed be nice instead of waking up to a dead site.