Odoo Performance Tuning Checklist: Workers, Memory and PostgreSQL
Odoo performance tuning checklist for Odoo 19 and 20: workers formula, memory limits, PostgreSQL and PgBouncer, allocator tests and slow query fixes.
When users say "Odoo is slow", the cause is rarely one setting. It is usually a mix of too few or too many workers, memory limits that kill requests, a default PostgreSQL setup and a few heavy reports. Our Odoo support and performance optimization team works through it in a set order.
Related service: Odoo optimization services — performance audits, PostgreSQL tuning and faster screens.
This guide is for IT leads and system admins who run Odoo 19 or Odoo 20 on Odoo.sh or their own servers. If you are still working out Odoo server requirements for a large rollout, read how far Odoo can scale to 500 or 1,000 users first; this post is about tuning a system that already runs.
What is the Odoo performance tuning checklist, in order?

The Odoo performance tuning checklist runs from measurement to code: baseline, workers, memory limits, PostgreSQL, connections, allocator, slow queries, retest. The order matters, because a slow query can look like a worker shortage and a bad memory limit can look like a slow query.
- Baseline: time 8 to 10 key actions on a staging copy and save the numbers.
- Workers: switch to multi-processing and size HTTP and cron workers to your CPU.
- Memory limits: set per-worker soft and hard limits that fit your RAM.
- Time limits: set limit_time_cpu and limit_time_real so heavy reports finish but runaway requests stop.
- PostgreSQL: set shared_buffers, effective_cache_size, work_mem and autovacuum for your data size.
- Connections: budget db_maxconn against max_connections, and add PgBouncer only where it is safe.
- Allocator: optionally test mimalloc or a lower glibc arena count.
- Slow queries: log, rank and fix the worst statements and the code that calls them.
- Retest: repeat the baseline and keep only the changes that helped.
The table lists the main settings, their defaults and where we usually start. Treat the starting points as our working defaults, not hard rules.
| Setting | Default | Where to start |
|---|---|---|
| workers | 0 (multi-threaded mode) | (CPU cores x 2) + 1 in total, including cron |
| max_cron_threads | 2 | 1 or 2, counted inside the CPU budget |
| limit_memory_soft | 2048 MiB per worker | Odoo sample: 600 MiB (629145600 bytes) |
| limit_memory_hard | 2560 MiB per worker | Odoo sample: 1,600 MiB (1677721600 bytes) |
| db_maxconn | 64 per Odoo process | Lower it so all processes fit under max_connections |
| shared_buffers | Typically 128 MB | About 25% of RAM on a dedicated database server |
| work_mem | 4 MB | Raise with care, as each sort or hash can use it |
How do you measure Odoo performance before you tune it?
Measure Odoo performance with a repeatable baseline on a copy of production, or you cannot prove any change helped. Without numbers, tuning turns into guessing, and some changes make things worse.
Restore production into a staging database and neutralize it, so no emails, payments or crons leave the copy. Our Odoo staging environment checklist covers that step.
Then record the baseline:
- Key actions: open the sales list, confirm an order, validate a delivery, post an invoice, run the aged receivables report, and open the website shop.
- Timings: run each action 3 times and note the median and the slowest time.
- Load: if you can, replay 10, 25 and 50 simultaneous users with a load tool and record the 95th percentile response time.
- Server: CPU load, RAM in use, swap, open PostgreSQL connections and disk wait.
- Logs: count worker restarts and memory-limit messages in the Odoo log.
Keep the dataset, the user count and the time of day the same for every run. Change one setting, rerun the same script and compare.
How many Odoo workers do you need?
Odoo workers configuration starts from Odoo's rule of thumb: (CPU cores x 2) + 1 workers, and about 6 concurrent users per worker. Cron workers need CPU too, so they come out of the same budget.
Odoo's deployment guide gives a worked example. A server with 4 CPU cores and 60 concurrent users needs 10 workers in theory (60 / 6), but the CPU caps it at 9. Odoo uses 8 HTTP workers plus 1 cron worker and watches CPU load.
| CPU cores | Max workers by formula | Example split | Users at 6 per HTTP worker |
|---|---|---|---|
| 2 | 5 | 4 HTTP + 1 cron | About 24 |
| 4 | 9 | 8 HTTP + 1 cron | About 48 |
| 8 | 17 | 15 HTTP + 2 cron | About 90 |
| 16 | 33 | 31 HTTP + 2 cron | About 186 |
The default is workers = 0, which runs the multi-threaded server. Odoo says this mode is mainly for development and does not make the best use of the hardware because of Python's GIL. For production, set workers above 0.
Turning on workers also starts a separate gevent worker for websockets on port 8072. Your proxy must send paths starting with /websocket/ to that port, and Odoo must run with proxy_mode on. Skip this and chat, notifications and the bus misbehave.
One Odoo 15 user on the forum found that Odoo became very slow when workers were activated, with 60 seconds to refresh a page while CPU and RAM sat near 20%. When we see this pattern, we first check the websocket proxy routing and the database connection limits.
How should you set Odoo memory limits?
Odoo memory usage is controlled per worker by limit_memory_soft and limit_memory_hard, and these values must never be multiplied by the number of workers. Get them wrong and workers are either killed mid-request or allowed to swell until the server swaps.
The Odoo command-line reference defines both limits as virtual memory per worker. Past the soft limit, a worker is recycled after its current request. Past the hard limit, it is killed at once. Defaults are 2048 MiB soft and 2560 MiB hard.
To size total RAM, Odoo assumes 20% heavy requests at about 1 GB and 80% light ones at about 150 MB. For 9 workers that is 9 x ((0.8 x 150) + (0.2 x 1024)), or about 3 GB for Odoo alone, before PostgreSQL and the operating system.
A common mistake shows up in an Odoo 12 thread where server memory kept rising and never dropped. The top answer multiplied the per-worker limits by 9; a later reply corrected it, since the limits already apply to each worker.
The time limits matter as much:
- limit_time_cpu: CPU seconds per request, default 60. Raise it only for known heavy reports.
- limit_time_real: wall time per request, including SQL, default 120.
- limit_request: requests a worker serves before it is recycled; the Odoo 19 and 20 source sets 65,536, while the docs still say 8196.
- limit_time_real_cron: separate wall time for cron jobs; the default of -1 follows limit_time_real, and 0 means no limit.
If heavy reports keep hitting the limit, fix the report rather than raising limits for every request. Odoo 19 and 20 also offer limit_memory_soft_gevent for the websocket worker, which defaults to the normal soft limit.
Which PostgreSQL settings matter most for Odoo?
For Odoo, the PostgreSQL settings that matter most are shared_buffers, effective_cache_size, work_mem, maintenance_work_mem, max_connections and autovacuum. Most servers still run the stock values, which are sized for a small machine.
| Setting | PostgreSQL default | What it does | Odoo starting point |
|---|---|---|---|
| shared_buffers | Typically 128 MB | Database page cache | About 25% of RAM, rarely above two fifths |
| effective_cache_size | 4 GB | Planner's guess of total cache | Roughly shared_buffers plus free OS cache |
| work_mem | 4 MB | Memory per sort or hash step | Raise slowly; many steps can run at once |
| maintenance_work_mem | 64 MB | VACUUM and index builds | Higher is usually safe |
| random_page_cost | 4.0 | Cost of random reads | Lower can suit SSDs with data in cache |
| max_connections | Typically 100 | Total client connections | Fit Odoo's processes plus a reserve |
The PostgreSQL manual says a reasonable starting value for shared_buffers on a dedicated server with 1 GB or more of RAM is 25% of memory. It adds that more than two fifths of RAM is unlikely to help, because PostgreSQL also relies on the operating system cache.
Be careful with work_mem. PostgreSQL warns that one complex query can run several sorts and hashes at once, each allowed that much memory, and many sessions can do so together. A large global value can push the server into swap.
Keep autovacuum on. Odoo tables such as mail_message, stock_move and account_move_line grow fast, and stale statistics lead to bad query plans. If the filestore and database are also growing fast, our guide to Odoo.sh storage cleanup helps.
How do db_maxconn, max_connections and PgBouncer fit together?
Odoo's db_maxconn sets how many PostgreSQL connections each Odoo process may open, and the total across all processes must stay below PostgreSQL's max_connections. PgBouncer can help, but only in a mode that keeps Odoo's bus working.
The default db_maxconn is 64 per process. With 8 HTTP workers, 1 cron worker and the gevent worker, that allows up to 640 connections in theory, while PostgreSQL usually allows 100. Odoo's own sample sets max_connections to 80.
Our rule of thumb: (HTTP workers + cron workers + 1) x db_maxconn should stay under max_connections, with room left for backups and admin tools. With 10 processes, db_maxconn = 6 gives 60 connections. Odoo 19 and 20 also have db_maxconn_gevent for the websocket worker.
PgBouncer has three pooling modes. Session mode supports every PostgreSQL feature but pools less. Transaction mode pools well but never supports LISTEN, SET or session advisory locks. The Odoo bus runs LISTEN on the imbus channel, so transaction mode can break chat and real-time updates.
That is exactly what one admin reported in a thread on Odoo with PgBouncer, cron and chat: session mode worked but gave no pooling benefit, and transaction mode stopped cron and chat. A safer pattern is to point the gevent worker straight at PostgreSQL and pool only HTTP workers, then test.
Should you change the memory allocator for Odoo?
Swapping the memory allocator for Odoo, for example to mimalloc, can lower memory use for some workloads, but you must prove it on your own system first. Treat it as a step 7 option, after workers, limits and PostgreSQL are right.
Some Odoo hosts report lower memory use with mimalloc in early internal tests, but without published setup, versions or benchmarks. That is a reason to test, not proof.
On Linux there are two common options:
- mimalloc: preload the library for the Odoo service, for example LD_PRELOAD=/usr/lib/libmimalloc.so in the systemd unit, as the mimalloc project documents.
- glibc arenas: keep the default allocator but cap its arenas with GLIBC_TUNABLES=glibc.malloc.arena_max=2, the newer form of MALLOC_ARENA_MAX.
Run the same baseline test before and after, for at least a few working days. Compare resident memory per worker, how often workers recycle on memory limits, and the 95th percentile response time. If any of them gets worse, roll back.
You can only do this on Odoo.sh Dedicated or your own servers, where you control the service environment. On Odoo Online and shared Odoo.sh, Odoo manages the runtime.
How do you find slow queries in Odoo?
Find slow queries in Odoo by logging long statements in PostgreSQL, ranking them with pg_stat_statements, then tracing them back to code with the Odoo profiler. Most "Odoo slow" tickets end at a handful of queries or one custom compute method.
- Log long statements: set log_min_duration_statement to 500 ms or 1 s, so PostgreSQL logs every statement that runs longer.
- Rank them: enable pg_stat_statements in shared_preload_libraries (needs a restart) and sort by total time, not just by the slowest single run.
- Explain them: run EXPLAIN (ANALYZE, BUFFERS) on the top statements in staging and look for sequential scans on large tables.
- Trace the code: turn on the Odoo profiler in developer mode and open the flame graph for the slow action.
- Fix: add an index where a filtered field has none, batch writes inside loops, or store a computed field that is searched often.
Odoo's guide warns not to index every field, as indexes use space and slow inserts, updates and deletes. It also notes that Odoo Online databases cannot be profiled. Use --log-sql only on staging, as it logs every query.
For older or heavily customized systems, a structured Odoo audit checklist helps you decide whether the problem is configuration, data or custom code.
What can you tune on Odoo Online, Odoo.sh and on-premise?
How much Odoo performance optimization you can do depends on hosting: almost none on Odoo Online, workers and plan size on Odoo.sh, and everything on your own servers. Check this before you plan the work.
| Tuning area | Odoo Online | Odoo.sh | On-premise |
|---|---|---|---|
| Workers | Managed by Odoo | Bought per worker, 1 to 16 on shared hosting | You set them |
| Memory and time limits | Managed by Odoo | Managed with the platform | You set them |
| PostgreSQL settings | Managed by Odoo | Managed by Odoo | You set them |
| PgBouncer or allocator | No | Not on shared hosting | Yes |
| Odoo profiler | Not available | Yes | Yes |
| Staging copies for tests | Duplicate database | 0 to 20 staging environments | As many as you build |
On Odoo.sh pricing, workers are priced per worker per month, and more than 16 workers needs the Dedicated hosting type. Our Odoo Online vs Odoo.sh vs on-premise comparison covers the wider hosting choice.
Which industries hit Odoo performance limits first?
Businesses with heavy scheduled jobs, busy websites or very large stock and accounting tables hit Odoo performance limits first. The fix differs by where the load comes from.
| Industry | Pain or cost driver | Odoo approach | How iVentureTeam helps |
|---|---|---|---|
| eCommerce and retail | Website traffic and websocket load at peaks | Separate gevent worker, proxy caching for static files | Size workers for peaks, route /websocket/ correctly |
| Manufacturing | MRP scheduler and work order crons at night | Dedicated cron workers, longer cron time limits | Split heavy crons, profile planning runs |
| Distribution | Large stock_move and valuation tables | Indexes, autovacuum, stored computed fields | Rank slow queries, fix custom reports |
| Finance-heavy groups | Aged balance and ledger reports on years of data | Higher work_mem for report users, archiving | Tune report queries, plan data archiving |
| Multi-branch POS | Many sessions syncing at opening and closing | Enough HTTP workers and connections | Test opening-hour load before rollout |
Odoo performance tuning in practice: a before and after test log
In practice, every change goes into a simple test log with the same script, the same data and a clear keep-or-roll-back rule. The template below is what we fill in during a tuning engagement.
| Step | What you change | What you measure | Keep it if |
|---|---|---|---|
| 0. Baseline | Nothing | Median and slowest time for 8 to 10 actions, CPU, RAM | n/a |
| 1. Workers | workers, max_cron_threads | 95th percentile at 25 and 50 users | Response time drops, CPU stays below saturation |
| 2. Memory limits | limit_memory_soft, limit_memory_hard | Worker recycles per hour, swap | Fewer killed requests, no swap |
| 3. PostgreSQL | shared_buffers, work_mem | Report run times, cache hit ratio | Reports faster, no swap |
| 4. Connections | db_maxconn, PgBouncer | Peak connections, chat and cron still work | Under max_connections, bus intact |
| 5. Allocator | LD_PRELOAD or arena_max | Resident memory per worker over days | Lower memory, same or better speed |
| 6. Queries | Indexes, code fixes | Top 10 statements by total time | Total time drops |
Run each step on staging, then repeat the winning settings on production at a quiet hour and rerun the baseline. You can see how we document client projects in our Odoo project case studies.
How iVentureTeam helps with Odoo performance tuning

iVentureTeam tunes Odoo from the server up to the code, and proves each change with a before and after test. We have delivered 150+ ERP projects across 35+ countries with 40+ Odoo specialists, led by a consultant with 13+ years in Odoo.
- Free first look: start with our Odoo health check tool to spot version, module and setup risks.
- Baseline and load test: scripted tests on a neutralized staging copy, with numbers you can keep.
- Server and database tuning: workers, limits, PostgreSQL, pooling and allocator tests on Odoo.sh Dedicated or your own servers, backed by our DevOps services.
- Slow code fixes: profiling, indexes and rewrites of slow custom modules and reports.
- Ongoing monitoring: performance and security monitoring under an Odoo support plan.
The bottom line on Odoo performance tuning
Odoo performance tuning is a measured sequence, not a single magic setting: baseline, workers, memory limits, PostgreSQL, connections, then slow queries. Allocator swaps come last and only with proof.
Most slow Odoo systems improve a lot from the first five steps on the checklist. Write down your baseline today, change one thing at a time, and keep only what your numbers support.
Ready to make your Odoo system faster?

Get a measured tuning plan for your workers, memory and database. Ask for an Odoo performance review, call +91-90235-15208, or email business@iventureteam.com.
Frequently Asked Questions
How many workers should Odoo have?
+
Odoo's rule of thumb is (CPU cores x 2) + 1 workers in total, with about 6 concurrent users per worker. A 4-core server with 60 users gets 8 HTTP workers plus 1 cron worker in Odoo's own example.
Why is my Odoo so slow?
+
The usual causes are workers left at 0, memory limits that kill heavy requests, default PostgreSQL settings, too many database connections, and slow custom reports. Measure a baseline first, then work through them one at a time.
How much RAM does Odoo need?
+
Odoo estimates about 150 MB for a light worker and 1 GB for a heavy one, with 20% heavy requests. Nine workers need about 3 GB for Odoo alone, plus RAM for PostgreSQL and the operating system.
What are limit_memory_soft and limit_memory_hard in Odoo?
+
They are per-worker virtual memory limits. Past the soft limit, the worker restarts after its current request; past the hard limit, it is killed at once. Defaults are 2048 MiB and 2560 MiB.
Should I use PgBouncer with Odoo?
+
It can help large setups, but transaction mode does not support LISTEN, which the Odoo bus uses. Use session mode or connect the gevent worker straight to PostgreSQL, and test chat and crons on staging first.
What is db_maxconn in Odoo?
+
It is the maximum number of PostgreSQL connections each Odoo process may open, 64 by default. Multiply it by your process count and keep the total below PostgreSQL's max_connections.
Does mimalloc make Odoo faster?
+
Some hosts report lower memory use in early internal tests, but results depend on the workload. Preload it on a staging server, compare memory and response times over several days, and roll back if anything gets worse.
Can I tune performance on Odoo Online?
+
Very little. Odoo manages the servers, and the Odoo profiler is not available on Odoo Online. You can still clean data, archive old records and simplify slow custom reports built in Studio.
Free Odoo support review
Need dependable Odoo support?
Tell us what's going wrong or what you need covered. We suggest a support plan that fits how you use Odoo.
Free, with no obligation. A senior consultant replies within 12 business hours.
Free Odoo tools
All tools- Odoo Health CheckVersion, modules, findings and upgrade cost
- Odoo App SelectorWhich apps you need, by industry
- Odoo Project EstimateIndicative cost and timeline in minutes
- Odoo Implementation Cost CalculatorImplementation cost and timeline, in minutes
- Odoo Migration Cost CalculatorVersion jump or legacy ERP, priced in minutes
Continue reading
Can Odoo Scale to 500 or 1,000 Users? Sizing, Hosting and Limits
Can Odoo scale for enterprise? Workers, CPU, RAM and PostgreSQL for 500 to 1,000 users, Odoo.sh vs on-premise, multi-company limits, license cost and SAP.
Odoo Audit Checklist: Warning Signs, Severity Score, Scope and Cost
Odoo audit checklist: 12 warning signs, a ten-question severity self-assessment, the eight audit areas, deliverables, cost ranges and the free health check.
Odoo Staging Environment Checklist: Neutralize a Database Copy
Neutralize an Odoo database copy before testing: what Odoo disables by itself, what it misses in custom connectors, and a 10-step staging checklist.
