Key takeaways
- A common starting point is (CPU cores × 2) + 1 workers, with each worker serving roughly six concurrent users.
- Budget about 325 MB of RAM per worker on average, and leave memory for PostgreSQL and the OS.
- Set limit_memory_soft and limit_memory_hard so one runaway request cannot take the server down.
- Tune PostgreSQL for a shared server: it should not assume all the RAM is its own.
Workers, threads and cron
Odoo can run in threaded mode (workers = 0), where one process handles
everything, or in multi-process mode, where a number of worker processes handle HTTP
requests in parallel. Production servers should always use multi-process mode.
Scheduled actions run in separate cron processes, set by
max_cron_threads (2 by default).
How many workers?
Odoo's deployment documentation gives two rules of thumb:
- CPU: up to
(CPU cores × 2) + 1workers. - Users: one worker serves about six concurrent users.
Use the lower of the two. Ten people logged in at once rarely need more than three workers, even on a large server.
How much RAM?
Odoo's documentation estimates that about 80% of requests are light (around 150 MB) and 20% are heavy (around 1 GB). That averages to roughly 325 MB per worker. On top of that, leave room for cron processes, PostgreSQL and the operating system.
Memory and time limits
In multi-process mode, Odoo recycles a worker that grows past
limit_memory_soft once its current request finishes, and kills it
immediately at limit_memory_hard. Time limits (limit_time_cpu
and limit_time_real) stop runaway requests. Set the memory limits so all
workers and cron processes together cannot exhaust RAM.
CloudPilot calculates these for you. It shares about 70% of the server's RAM between workers and cron processes, leaving the rest for PostgreSQL and the OS, and clamps the result to Odoo's defaults (2 GB soft, 2.5 GB hard) with a 256 MB floor. The hard limit is 25% above the soft limit.
PostgreSQL on the same server
Most Odoo servers run PostgreSQL on the same machine, so its memory settings should be more modest than on a dedicated database server. CloudPilot's PostgreSQL tuning uses:
-
shared_buffers: about 15% of RAM (rather than the usual 25%), between 128 MB and 8 GB effective_cache_size: about 50% of RAMwork_mem: RAM ÷ 256, between 4 MB and 64 MBmaintenance_work_mem: RAM ÷ 16, up to 2 GBrandom_page_cost = 1.1, suited to SSD storage
Sizing table
Worked numbers using (CPU × 2) + 1 workers, two cron threads and the
formulas above. Treat them as a starting point, then adjust using real traffic.
| Server | Workers | Concurrent users | limit_memory_soft | limit_memory_hard | shared_buffers | effective_cache_size |
|---|---|---|---|---|---|---|
| 2 vCPU / 4 GB | 5 | ~30 | 409 MB | 511 MB | 614 MB | 2048 MB |
| 4 vCPU / 8 GB | 9 | ~54 | 521 MB | 651 MB | 1228 MB | 4096 MB |
| 8 vCPU / 16 GB | 17 | ~102 | 603 MB | 753 MB | 2457 MB | 8192 MB |
| 16 vCPU / 32 GB | 33 | ~198 | 655 MB | 818 MB | 4915 MB | 16384 MB |
Signs your server is the wrong size
- Requests queue at busy times but CPU is low: add workers, if memory allows.
- Workers are killed for memory in the logs: lower the worker count or add RAM.
- CPU sits at 100%: you have more workers than cores can serve. Move to a bigger server.
- Slow reports and list views with free CPU and RAM: look at PostgreSQL, missing indexes and custom code.
For a step-by-step diagnosis, see why Odoo is slow: 10 causes and fixes.
CloudPilot's monitoring shows CPU, memory and disk per server and alerts you before users notice. Change the worker count on an instance and the memory limits are recalculated automatically.
CloudPilot applies these settings for you on Odoo Community hosting and managed Odoo hosting. The underlying options are described in Odoo's deployment documentation.
Frequently asked questions
How many Odoo workers do I need for 50 users?
Size for concurrent users, not total users. If 15 to 20 of 50 users work at the same time, 3 to 4 workers is a reasonable start, on a server with at least 2 vCPUs and 4 GB of RAM.
How much RAM does an Odoo server need?
Roughly 325 MB per worker on average, plus room for cron processes, PostgreSQL and the OS. A small business typically starts with 4 to 8 GB.