When you install Discourse on an instance with 4GB or more you should consider the following:
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.
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
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"
We update our base templates with various optimisations, be sure to update regularly to ensure you take advantage of it.