Every change is backed by numbers
"Odoo is slow" can mean a small server, a missing database index, a badly written report or one heavy scheduled job. Buying a bigger server fixes only the first. The work starts by finding which one it is.
Common causes and their signs
Workers and memory
Sign: the site freezes when several people work at once.
Odoo workers, memory limits and timeouts sized to the server and to how many people use it.
PostgreSQL
Sign: lists and searches get slower as data grows.
Memory settings, missing indexes and table maintenance for large tables.
Web server
Sign: pages load slowly even when the server is idle.
Compression, caching of images and static files, and correct proxy settings.
Custom code and scheduled jobs
Sign: one screen, report or time of day is always slow.
Slow computed fields, database queries inside loops and heavy scheduled jobs, rewritten or moved.
From measurement to fix
-
Find the slow queries
PostgreSQL is told to log every query slower than half a second, and its statistics show which queries use the most time overall.
postgresql.conflog_min_duration_statement = 500ms shared_preload_libraries = 'pg_stat_statements'Top 10 queries by total timeSELECT round(total_exec_time) AS total_ms, calls, round(mean_exec_time::numeric, 1) AS avg_ms, left(query, 90) AS query FROM pg_stat_statements ORDER BY total_exec_time DESC LIMIT 10; -
Size the workers to the server
Too few workers and users wait in line; too many and the server runs out of memory. A common start is (CPU cores Γ 2) + 1, then adjusted to the memory each worker really uses.
odoo.conf for a 2-core, 8 GB server (example)workers = 5 max_cron_threads = 1 limit_memory_soft = 2147483648 ; recycle a worker above 2 GB limit_memory_hard = 2684354560 ; stop it above 2.5 GB limit_time_cpu = 600 limit_time_real = 1200 -
Give PostgreSQL the right memory
The defaults are made for tiny machines. Common starting points, adjusted to your server:
postgresql.conf for 8 GB of RAM (example)shared_buffers = 2GB # about 25% of RAM effective_cache_size = 5GB # about 60% of RAM work_mem = 32MB maintenance_work_mem = 512MB random_page_cost = 1.1 # SSD storage -
Cache what never changes
Odoo's scripts, styles and images are served from nginx's cache and compressed, so Odoo workers spend their time on real work.
nginxlocation ~* /web/static/ { proxy_cache_valid 200 90m; proxy_buffering on; expires 864000; proxy_pass http://odoo; } gzip on; gzip_types text/css text/plain application/json application/javascript text/xml; -
Fix slow custom code
The most common problem in custom modules: one database query per record inside a loop. Rewritten as one grouped query, it stays fast no matter how many records there are.
Before: one query per customerfor partner in partners: partner.order_count = self.env['sale.order'].search_count( [('partner_id', '=', partner.id)])After: one query for all customerscounts = dict(self.env['sale.order']._read_group( [('partner_id', 'in', partners.ids)], ['partner_id'], ['__count'])) for partner in partners: partner.order_count = counts.get(partner, 0)Fields that are searched or filtered often get a database index (
index=True), and heavy scheduled jobs are moved out of office hours or split into batches.
A short report with real numbers
Example of the before/after table, with illustrative values:
| Action | Before | After |
|---|---|---|
| Open sales orders list | 4.8 s | 0.9 s |
| Customer search | 3.1 s | 0.4 s |
| Stock valuation report | 52 s | 11 s |
- What was slow and why
- Every change made, and how to undo it
- Advice on server size for the next year
A faster day for everyone
Seconds saved on every screen add up to hours each week across a team.
Often the server you have is enough once it is set up properly.
Fixes that keep working as your data and team grow.
Common questions
Do you change my live system during the analysis?
No. Measuring is read-only; changes are tried on a copy first and applied to live only with your approval.
Can you speed up a module someone else wrote?
Yes, as long as the source code is available. Changes are made in a way that survives later updates.
