Odoo performance: why Odoo is slow and how to fix it
Odotify team · Published · 8 min read

"Odoo is slow" is the most common complaint an Odoo administrator hears, and the most common mistake is to fix it by buying a bigger server. Sometimes that works. Often the cause is one missing index or one badly written computed field, and a server twice the size makes no difference. This guide gives a checking order that finds the real cause, with the commands and settings for Odoo 17 to 20 on your own server. Sizing rules and options come from Odoo's 19.0 documentation and PostgreSQL's documentation, read on 21 November 2026.
Why is my Odoo so slow?
In practice, a slow Odoo almost always comes down to one of these five causes:
| Cause | Typical symptom | How to confirm |
|---|---|---|
| Too few workers, or none | Everyone waits when a few people run reports; pages hang in a queue | workers in odoo.conf, CPU load, request queue |
| Not enough memory | Slow everywhere, swap in use, workers killed and restarted | free -h, limit_memory_* messages in the Odoo log |
| Slow SQL queries | One list, search or report is slow, others are fine | pg_stat_statements, --log-sql |
| Custom or third-party modules | Slow only on one model or after installing a module | Odoo profiler (Python vs SQL time) |
| Cron jobs at the wrong time | Slow at the same times each day | Scheduled actions, cron worker CPU |
Work down this table in order. The first two are server settings and take minutes to check. The last three need measurement.
How many workers does Odoo need?
Odoo's deployment guide gives the sizing rule: one worker serves about 6 concurrent users, and you should run at most (number of CPU cores × 2) + 1 workers. Cron jobs need their own CPU on top.
Without the workers option (or with workers = 0), Odoo runs in threaded mode in one process. That is fine for development and for one or two users, and slow for a team. Production servers should use the multi-processing mode, which Odoo enables when workers is a number above zero.
| Concurrent users | Workers (1 per 6 users) | CPU cores needed |
|---|---|---|
| Up to 12 | 2 | 1 to 2 |
| Up to 30 | 5 | 2 to 4 |
| Up to 60 | 10 | 5 to 6 |
Odoo's own example in the documentation is a 4-core server for 60 concurrent users, with 8 workers plus 1 cron worker. It sets these limits:
[options]
workers = 8
max_cron_threads = 1
limit_memory_hard = 1677721600
limit_memory_soft = 629145600
limit_request = 8192
limit_time_cpu = 600
limit_time_real = 1200
proxy_mode = True
limit_memory_soft (600 MB) recycles a worker after its request once it uses that much memory; limit_memory_hard (1.6 GB) kills it straight away. If your log shows workers being killed for memory often, a module is loading too much data in one request, or the limits are too low for your reports. Our Odoo workers configuration guide explains each option.
How much RAM does Odoo need?
Odoo's documentation estimates memory from the mix of requests: about 80% are light and use around 150 MB, about 20% are heavy and use around 1 GB, so plan roughly 325 MB per worker. For 8 workers that is about 2.6 GB for Odoo alone. PostgreSQL needs its own memory for caching data, and the operating system needs some for the file cache.
Check what the server actually does under load:
free -h # "available" should not be close to zero
vmstat 5 5 # "si"/"so" above 0 means the server is swapping
ps -o rss,cmd -C odoo | sort -n | tail # memory per Odoo process (in KB)
If the server swaps, add memory or reduce workers before you look at anything else. A swapping database is slow whatever the queries are. For sizes per number of users, see our Odoo server requirements.
How do I find slow queries in Odoo?
Use PostgreSQL's pg_stat_statements module. It records planning and execution statistics for every SQL statement the server runs, including the total and average time per statement, so you can see which few queries take most of the database's time.
It has to be loaded at server start, which means one PostgreSQL restart:
# /etc/postgresql/16/main/postgresql.conf
shared_preload_libraries = 'pg_stat_statements'
sudo systemctl restart postgresql
sudo -u postgres psql -d yourdb -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;"
Then, after a normal working day, list the statements that use the most time:
SELECT round(total_exec_time) AS total_ms,
calls,
round(mean_exec_time::numeric, 1) AS mean_ms,
left(query, 120) AS query
FROM pg_stat_statements
ORDER BY total_exec_time DESC
LIMIT 10;
Two patterns stand out. A query with a high mean time is slow on its own, often a sequential scan over a large table. A query with a modest mean but a huge number of calls is a loop: Python code running one query per record instead of one for all.
To see the queries for one specific action, Odoo can log every SQL statement with --log-sql (the same as --log-handler=odoo.sql_db:DEBUG). Use it on a staging copy: it is very verbose.
How do I add an index without stopping Odoo?
When a slow query filters or sorts a large table on a column that has no index, an index usually fixes it. Run EXPLAIN on the query first: a Seq Scan on a table with millions of rows is the sign.
Build the index concurrently. A normal CREATE INDEX blocks writes to the table until it finishes; with CONCURRENTLY, PostgreSQL builds it without taking locks that block inserts, updates or deletes:
CREATE INDEX CONCURRENTLY IF NOT EXISTS account_move_line_partner_state_idx
ON account_move_line (partner_id, parent_state);
Three rules keep this safe:
- Test on a copy first and compare
EXPLAIN ANALYZEbefore and after. - Do not add indexes everywhere. Each index slows every write to its table and takes disk space.
- Prefer a fix in the module when the field is yours:
index=Trueon the field definition keeps the index after upgrades and on other databases.
Are custom modules making Odoo slow?
Often, yes. The classic cases are a computed stored field that recomputes for thousands of records after every change, a loop that reads one record at a time, and an onchange or search override that runs extra queries on every screen.
Odoo has a built-in profiler to tell Python time from SQL time:
- Turn on developer mode, open the developer tools and click Enable profiling for the database, with an expiry.
- Enable profiling for your session, repeat the slow action, then disable it.
- Open the recorded
ir.profilesession. Each record opens a flame graph in speedscope. The sql (no gap) view shows only SQL; sql (density) shows gaps between queries, which reveal time spent in Python or many small queries that could be batched.
The profiler adds some overhead itself, so use it on staging or for short sessions, and switch it off afterwards. Odoo Online databases cannot be profiled.
Can cron jobs slow Odoo down?
Yes. Scheduled actions (email queues, recurring invoices, stock rules, imports from other systems) run in cron workers and compete with users for CPU and database time. max_cron_threads sets how many run at once.
Look at Settings, Technical, Scheduled Actions for jobs that run every few minutes and touch many records. Move heavy ones to the night, and keep max_cron_threads at 1 or 2 on a small server so batch work cannot take all the CPU.
Steps to fix a slow Odoo database
- Measure first. Note which screens are slow, for whom and when. "Everything, always" points to the server; "one report" points to a query or module.
- Check workers and memory. Set
workersfrom the 1-per-6-users rule, check swap withvmstat, and read the Odoo log for killed workers. - Turn on pg_stat_statements and list the 10 statements with the most total time after a working day.
- Explain the worst query and add a concurrent index if it scans a large table.
- Profile the slow action on a staging copy to see whether Python or SQL is the problem.
- Review cron jobs and move heavy ones out of working hours.
- Upgrade PostgreSQL and Odoo when you are several versions behind. Odoo 19's release notes list cached data and translations for faster navigation; our Odoo upgrade guide covers the steps.
- Only then resize the server, with numbers that show what is short: CPU, memory or disk.
Finding slow queries without logging in to the server
Odotify turns on pg_stat_statements on the servers it manages and collects a report every 10 minutes: the statements that use the most time, generic query plans, index health and running statements. Statement texts are redacted twice, on your server and again before storage, so no customer values leave the server. From the Starter plan, you can connect Claude or another assistant through Odotify's MCP server and ask "why is this database slow?". The assistant can propose an index or a PostgreSQL setting, and the change runs only after a person approves it in the dashboard, with indexes built CONCURRENTLY. Server charts show CPU, memory and disk over time. Odotify works on your own server at Hetzner, DigitalOcean, AWS and others, for a flat fee from $0; see pricing.
FAQ
Is Odoo slow by nature?
No. A well-sized Odoo server with workers enabled serves dozens of concurrent users with fast page loads. Slowness usually comes from configuration (no workers, too little memory), a few slow queries or custom code, not from Odoo itself.
How many users can one Odoo server handle?
With Odoo's rule of one worker per 6 concurrent users and (CPU × 2) + 1 workers at most, a 4-core server runs about 8 workers, enough for around 50 to 60 concurrent users, as in Odoo's own example. Named users who are not all active at once can be many more.
Does Odoo.sh or Odoo Online perform better than my own server?
Not automatically. On Odoo.sh you buy workers; on Odoo Online you have no control over the server. On your own server you choose the CPU, memory and PostgreSQL settings, and you can add indexes yourself.
Should PostgreSQL run on a separate server?
Below about 50 concurrent users, one well-sized server is simpler and fast enough. Split Odoo and PostgreSQL when they compete for memory or CPU, so each can be sized on its own.
Does the Odoo version affect performance?
Yes. Each major version changes the ORM and the web client. Odoo 19's release notes mention cached data, cached translations and a control panel that shows before data has loaded. Upgrade on a copy first and compare.
Sources
- Odoo 19.0 documentation, system configuration (workers, memory, limits, example
odoo.conf): https://raw.githubusercontent.com/odoo/documentation/19.0/content/administration/on_premise/deploy.rst - Odoo 19.0 documentation, performance and profiling: https://raw.githubusercontent.com/odoo/documentation/19.0/content/developer/reference/backend/performance.rst
- Odoo 19.0 documentation, command-line options (
--log-sql,--max-cron-threads): https://raw.githubusercontent.com/odoo/documentation/19.0/content/developer/reference/cli.rst - PostgreSQL 16 documentation, pg_stat_statements: https://www.postgresql.org/docs/16/pgstatstatements.html
- PostgreSQL 16 documentation, CREATE INDEX (CONCURRENTLY): https://www.postgresql.org/docs/16/sql-createindex.html
- Odoo 19 release notes (technical section): https://www.odoo.com/de_DE/odoo-19-release-notes
Odotify team
Odotify hosts Odoo on servers its customers own. This article was researched against live search results and the Odotify codebase.


