Workers & Performance
import { Aside } from ‘@astrojs/starlight/components’;
Odoo uses a multi-process architecture with workers to handle concurrent requests. Properly configuring workers is key to good performance.
What Are Workers?
Section titled “What Are Workers?”Odoo workers are separate processes that handle incoming HTTP requests. More workers means more concurrent requests can be processed simultaneously.
- 0 workers — Single-threaded mode (development only)
- 1 worker — Handles one request at a time, suitable for light usage
- 2+ workers — Handles multiple concurrent requests
Worker Configuration
Section titled “Worker Configuration”Recommended Settings by Usage
Section titled “Recommended Settings by Usage”| Usage | Concurrent Users | Workers | RAM | CPU |
|---|---|---|---|---|
| Development | 1-2 | 1 | 2 GB | 1 vCPU |
| Small team | 5-10 | 2 | 4 GB | 2 vCPU |
| Medium team | 10-30 | 4 | 8 GB | 4 vCPU |
| Large team | 30-100 | 8 | 16 GB | 8 vCPU |
Changing Workers
Section titled “Changing Workers”- Go to your instance → Settings → Performance
- Adjust the worker count
- Click Save — Deploy Monkey restarts the instance with the new configuration
Plan Limits
Section titled “Plan Limits”| Plan | Max Workers |
|---|---|
| Free | 1 |
| Base | 2 |
| Pro | Unlimited |
| Agency | Unlimited |
Cron Workers
Section titled “Cron Workers”Odoo uses a separate cron worker to execute scheduled actions (automated emails, inventory checks, etc.). Deploy Monkey allocates:
- 1 cron worker by default for all instances
- This worker does not count toward your worker limit
Memory Limits
Section titled “Memory Limits”Each worker has memory limits to prevent runaway processes:
| Setting | Default | Description |
|---|---|---|
limit_memory_soft | 2 GB | Worker is recycled after exceeding this |
limit_memory_hard | 2.5 GB | Worker is killed immediately |
limit_time_cpu | 60s | Max CPU time per request |
limit_time_real | 120s | Max wall-clock time per request |
Worker Usage Monitoring
Section titled “Worker Usage Monitoring”Deploy Monkey monitors your worker processes in real-time to help you understand when scaling is needed.
What’s Measured
Section titled “What’s Measured”During regular server health checks (every 5 minutes), Deploy Monkey:
- Identifies all Odoo/Python worker processes in your container
- Measures CPU usage over a 0.5-second window
- Classifies workers as busy (consumed CPU) or idle
- Calculates usage percentage: busy workers ÷ configured workers × 100
Viewing Worker Data
Section titled “Viewing Worker Data”Worker usage appears in two places:
- Instance Monitoring tab — worker usage chart alongside health metrics
- Worker Usage API —
GET /api/v1/instances/{id}/worker-usagefor programmatic access
Scaling Recommendations
Section titled “Scaling Recommendations”| Usage Level | Recommendation |
|---|---|
| < 60% | Normal — no action needed |
| 60-80% | Moderate — monitor during peak hours |
| > 80% | High pressure — consider adding workers |
| > 95% | Critical — users may experience slow responses |
Performance Tips
Section titled “Performance Tips”Database Optimization
Section titled “Database Optimization”- Vacuum regularly — Odoo runs auto-vacuum, but large databases benefit from manual vacuum during maintenance windows
- Index custom fields — If you query custom fields frequently, add database indexes
- Archive old records — Move old sales orders, leads, and logs to archive
Odoo Configuration
Section titled “Odoo Configuration”- Enable proxy mode — Already configured by Deploy Monkey (
proxy_mode = True) - Tune
db_maxconn— Database connections per worker. Default is 64, which works for most setups - Use
--load=base,web— Only load necessary server-wide modules
Server-Level
Section titled “Server-Level”- Use SSDs — Odoo is I/O intensive; SSDs make a significant difference
- Adequate RAM — Underprovised RAM leads to swap usage, which kills performance
- Fast CPU — Single-thread performance matters more than core count for Odoo
Application-Level
Section titled “Application-Level”- Minimize custom module complexity — Avoid heavy computations in
computefields - Use
read_groupfor reporting — Instead of loading all records and computing in Python - Batch operations — Use
writeon recordsets instead of looping with individual writes
Longpolling
Section titled “Longpolling”Odoo uses longpolling for real-time features like chat and notifications. Deploy Monkey configures a dedicated longpolling port and routes it through Nginx automatically.
The longpolling process:
- Runs on a separate port (default 8072)
- Handles WebSocket-like connections for real-time updates
- Is proxied through Nginx at
/longpolling/poll - Does not count toward your worker limit