Skip to content
David Cook edited this page May 13, 2024 · 2 revisions

When your OFN instance grows and has more visitors you may need to scale your resources as well. A typical server starts with 2 GB of memory and our biggest servers have 8 GB. Without any configuration change this memory helps to cache files to access data quicker. But there are more ways to tweak your server.

Web workers

The current rule of thumb is that you can have one worker per 1 GB of memory. Each worker uses roughly 0.8 GB of memory and some of that is shared. So the higher the number, the more buffer you have. You should have your Server monitoring in place to see how much free memory you really have before increasing the worker count. It's also good practice to leave a bit of space to work on the server and have a swap file. Compiling assets during deployment and starting a Rails console for debugging both take quite a bit of memory. It's nice to have a Gigabyte to spare.