본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)48k · #5346

odoo-performance-tuner

하는 일

이 에이전트는 Odoo를 느리게 만드는 문제를 찾아 고치도록 돕습니다. 느린 데이터베이스 쿼리, 메모리 설정, 기타 느려지는 원인을 분석합니다.

사용하는 경우

  • ✓Odoo 페이지가 로드되는 데 오래 걸릴 때.
  • ✓시스템에서 메모리 오류나 시간 초과가 발생하는 경우.
  • ✓어떤 데이터베이스 쿼리가 느리게 실행되는지 알고 싶을 때.

스킬 링크

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-performance-tuner/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/odoo-performance-tuner/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“제 Odoo가 매우 느린데, 이유를 찾는 것을 도와주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

느린 현상을 설명하고 오류 메시지나 설정 같은 정보를 공유합니다. 에이전트는 이를 분석하고 성능을 개선하기 위해 필요한 변경 사항을 제안합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 MemoryError or Worker timeout errors in logs.
  • Diagnosing a slow database query using Odoo's profiler.
  • Tuning odoo.conf for a specific server spec.

How It Works

  1. Activate: Mention @odoo-performance-tuner and describe your performance issue.
  2. Diagnose: Share relevant log lines or config and receive a root cause analysis.
  3. 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(), and sorted() 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.ormcache decorator on methods pulled repeatedly with the same arguments.
  • ❌ Don't: Set workers = 0 in 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_ids on 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.conf access — some tuning options are unavailable.

…

자주 묻는 질문

Odoo의 ‘워커(workers)’란 무엇인가요?

Odoo에서 작업을 수행하는 프로세스입니다. 워커의 수와 메모리 한도를 조정하는 것이 성능에 매우 중요합니다.

에이전트는 느린 쿼리를 어떻게 찾나요?

Odoo와 PostgreSQL의 도구를 사용해 어떤 데이터베이스 명령이 예상보다 오래 걸리는지 찾을 수 있습니다.

제 Odoo가 Odoo.sh에서 호스팅되어도 사용할 수 있나요?

Odoo.sh에서는 직접적인 PostgreSQL이나 odoo.conf 설정 같은 일부 설정에 접근할 수 없을 수 있습니다.

상세 정보

작성자의 원본 설명

Expert guide for diagnosing and fixing Odoo performance issues: slow queries, worker configuration, memory limits, PostgreSQL tuning, and profiling tools.

repo: sickn33/agentic-awesome-skills

인기도

GitHub 스타
48k
순위
#5346
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬