odoo-performance-tuner
What it does
This agent helps find and fix issues that make Odoo slow. It analyzes slow database queries, memory settings, and other causes of sluggishness.
When to use it
- βWhen Odoo is taking a long time to load pages.
- βIf you are getting memory errors or timeouts in the system.
- βTo understand which database queries are running slowly.
Skill link
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-performance-tuner/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βMy Odoo is very slow, can you help me figure out why?β
5 new skills a week. 1 minute to read.
How it works
You describe the slowness issue and share information like error messages or configurations. The agent analyzes this and suggests the necessary changes to improve performance.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Odoo Performance Tuner
Overview
This skill helps diagnose and resolve Odoo performance problems β from slow page loads and database bottlenecks to worker misconfiguration and memory bloat. It covers PostgreSQL query tuning, Odoo worker settings, and built-in profiling tools.
When to Use This Skill
- Odoo is slow in production (slow page loads, timeouts).
- Getting
MemoryErrororWorker timeouterrors in logs. - Diagnosing a slow database query using Odoo's profiler.
- Tuning
odoo.conffor a specific server spec.
How It Works
- Activate: Mention
@odoo-performance-tunerand describe your performance issue. - Diagnose: Share relevant log lines or config and receive a root cause analysis.
- Fix: Get exact configuration changes with explanations.
Examples
Example 1: Recommended Worker Configuration
# odoo.conf β tuned for a 4-core, 8GB RAM server
workers = 9 # (CPU_cores Γ 2) + 1 β never set to 0 in production
max_cron_threads = 2 # background cron jobs; keep β€ 2 to preserve user-facing capacity
limit_memory_soft = 1610612736 # 1.5 GB β worker is recycled gracefully after this
limit_memory_hard = 2147483648 # 2.0 GB β worker is killed immediately; prevents OOM crashes
limit_time_cpu = 600 # max CPU seconds per request
limit_time_real = 1200 # max wall-clock seconds per request
limit_request = 8192 # max requests before worker recycles (prevents memory leaks)
Example 2: Find Slow Queries with PostgreSQL
-- Step 1: Enable pg_stat_statements extension (run once as postgres superuser)
CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
-- Step 2: Also add to postgresql.conf and reload:
-- shared_preload_libraries = 'pg_stat_statements'
-- log_min_duration_statement = 1000 -- log queries taking > 1 second
-- Step 3: Find the top 10 slowest average queries
SELECT
LEFT(query, 100) AS query_snippet,
round(mean_exec_time::numeric, 2) AS avg_ms,
calls,
round(total_exec_time::numeric, 2) AS total_ms
FROM pg_stat_statements
ORDER BY mean_exec_time DESC
LIMIT 10;
-- Step 4: Check for missing indexes causing full table scans
SELECT schemaname, tablename, attname, n_distinct, correlation
FROM pg_stats
WHERE tablename = 'sale_order_line'
AND correlation < 0.5 -- low correlation = poor index efficiency
ORDER BY n_distinct DESC;
Example 3: Use Odoo's Built-In Profiler
Prerequisites: Run Odoo with ?debug=1 in the URL to enable debug mode.
Menu: Settings β Technical β Profiling
Steps:
1. Click "Enable Profiling" β set a duration (e.g., 60 seconds)
2. Navigate to and reproduce the slow action
3. Return to Settings β Technical β Profiling β View Results
What to look for:
- Total SQL queries > 100 on a single page β N+1 query problem
- Single queries taking > 100ms β missing DB index
- Same query repeated many times β missing cache, use @ormcache
- Python time high but SQL low β compute field inefficiency
Best Practices
- β
Do: Use
mapped(),filtered(), andsorted()on in-memory recordsets β they don't trigger additional SQL. - β
Do: Add PostgreSQL B-tree indexes on columns frequently used in domain filters (
partner_id,state,date_order). - β Do: Enable Odoo's HTTP caching for static assets and put a CDN (Cloudflare, AWS CloudFront) in front of the website.
- β
Do: Use
@tools.ormcachedecorator on methods pulled repeatedly with the same arguments. - β Don't: Set
workers = 0in production β single-threaded mode serializes all requests and blocks all users on any slow operation. - β Don't: Ignore
limit_memory_softβ workers exceeding it are recycled between requests; without the limit they grow unbounded and crash. - β Don't: Directly manipulate
prefetch_idson recordsets β rely on Odoo's automatic batch prefetching, which activates by default.
Limitations
- PostgreSQL tuning (
shared_buffers,work_mem,effective_cache_size) is highly server-specific and not covered in depth here β use PGTune as a starting baseline. - The built-in Odoo profiler only captures Python + SQL traces; JavaScript rendering performance requires browser DevTools.
- Odoo.sh managed hosting restricts direct PostgreSQL and
odoo.confaccess β some tuning options are unavailable.
β¦
FAQ
What are 'workers' in Odoo?
Workers are processes that perform tasks in Odoo. Adjusting their number and memory limits is crucial for performance.
How does the agent find slow queries?
It can use Odoo and PostgreSQL tools to identify which database commands are taking longer than expected.
Can I use this if my Odoo is hosted on Odoo.sh?
Some settings, like direct PostgreSQL or odoo.conf configurations, might not be accessible on Odoo.sh.
Details
Original description by the author
Expert guide for diagnosing and fixing Odoo performance issues: slow queries, worker configuration, memory limits, PostgreSQL tuning, and profiling tools.
Popularity
- GitHub stars
- 48k
- Ranking position
- #5346
- License
- MIT
- Updated
- 10/15/2026
Comments
- β¦
More skills from this repository
00-andruia-consultant
48kHelps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
007
48kLets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
10-andruia-skill-smith
48kHelps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
20-andruia-niche-intelligence
48kLets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.