Skip to content
EASIFY.AI

easify-ai.com :: machine-readable view

# Optimization Tips: Speeding Up Your n8n Workflows and Reducing Resource Use

- **url:** https://easify-ai.com/optimization-tips-for-n8n-workflows-reduce-usage/
- **published:** 2025-10-03
- **updated:** 2026-11-16
- **topics:** ai-automation-in-business
- **publisher:** Easify AI, part of Easify Technologies

Slow or expensive n8n workflows usually have the same few causes: triggers that fire too often, too much data carried between nodes, one API call per item, and an execution history nobody prunes.

The fixes are mostly design choices, not bigger servers. This guide covers what to change first, with the settings and node names as they stand in n8n 2.x, as of November 2026.

## What "usage" means in n8n

Before optimising, be clear about what you are paying for.

| Where n8n runs | What costs money | What to optimise |
|---|---|---|
| n8n Cloud | Executions per month, and concurrency limits by plan | Number of workflow runs |
| Self-hosted | CPU, memory, database size, your time | Data volume, saved executions, heavy nodes |

On n8n Cloud, n8n defines an execution as a single run of your entire workflow. A run with 40 steps counts once. That changes the usual instinct: merging small workflows into fewer, larger runs saves money, while adding nodes to a run costs nothing extra.

> **Note:** Cloud plans also cap how many executions run at once (5 on Starter and 20 on Pro, as of November 2026) and how long one can run (5 minutes on Starter, 40 minutes on Pro). Our [n8n Cloud vs self-hosting cost guide](/cost-comparison-guide-n8n-cloud-vs-self-hosting/) has the full plan comparison.

## Find the problem first

Don't optimise blind. Open **Executions** and sort out which workflows run most often and which run longest. If your plan includes the Insights dashboard, it shows production executions, failure rate and average run time per workflow.

| Symptom | Likely cause | First fix |
|---|---|---|
| Execution count far above expectations | Polling too often, or one run per record | Slow the trigger, batch on a schedule |
| Runs take minutes | One API call per item, sequential waits | Batch requests, use bulk endpoints |
| Memory spikes, crashes | Large payloads or files held in memory | Trim fields early, process in chunks |
| Database grows every week | Every successful run saved in full | Save failures only, prune old runs |
| Rate limit errors | Bursts of calls with no pause | Batching option or Loop Over Items with a Wait node |

## 1. Cut executions at the trigger

Triggers decide how many runs you get, so they are where most savings are.

- **Use webhooks instead of polling** where the other system supports them. A webhook runs only when something happens.
- **Poll less often.** A trigger that checks every minute can start up to 43,200 runs in a 30-day month. Every 15 minutes, that drops to 2,880. Ask whether anyone needs the data within a minute.
- **Filter before the run starts.** Many trigger nodes have options to only fire on certain events or fields. Use them rather than starting a run and discarding it.
- **Batch on a schedule.** If a spreadsheet or database gets 500 new rows a day and nobody needs them instantly, one scheduled run that processes all new rows replaces 500 runs.

> **Example:** A lead form sends a webhook for every submission, and each run enriches the lead and adds it to the CRM. Sales wants new leads within minutes, so the webhook stays. A separate nightly report that used to run per lead is moved to a single scheduled run that reads the day's leads in one go.

## 2. Carry less data through the workflow

Every node receives the full output of the one before it. A 200-field API response passed through ten nodes is held and copied all the way.

1. **Filter early.** Put a **Filter** or **IF** node straight after the trigger so irrelevant items stop there.
2. **Keep only what you need.** Use the **Edit Fields (Set)** node to keep the handful of fields later steps actually use.
3. **Paginate.** Fetch large datasets page by page with the HTTP Request node's pagination options rather than in one huge call.
4. **Cache reference data.** If every run looks up the same price list or mapping table, store it once (a data table, a database or a static file) instead of calling the API each time.

For files, n8n 2.0 removed the old in-memory binary data mode. Binary data now goes to the filesystem in regular mode and to the database in queue mode, with S3 as an option on paid plans. That helps with memory, but large files still take disk space, so drop them once they are processed.

## 3. Make fewer, smarter API calls

Calls to other services are usually the slowest part of a run.

- **Use bulk endpoints.** Many APIs accept 100 records in one call. One call beats 100.
- **Use the HTTP Request node's Batching option.** It controls how many requests go out before a pause, with **Batch Interval** setting the gap.
- **Loop Over Items with a Wait node** for rate-limited APIs: batch the items, call the API, wait, repeat.
- **Retry sensibly.** **Retry On Fail** handles brief errors, but n8n caps it at five tries and 5,000 ms between them. Hammering a struggling API with retries makes things worse. Our [n8n error handling guide](/error-handling-in-n8n-monitor-workflow-failures/) covers retries in detail.

## 4. Use native nodes first, Code where it earns its place

The old Function node is gone; custom logic now lives in the **Code** node. Since n8n 2.0, Code node runs go through task runners, which isolate your code from the n8n process. That is safer, but each Code node has some overhead.

- **Prefer native nodes** for common jobs: Filter, IF, Switch, Merge, Aggregate, Summarize, Remove Duplicates, Sort and Split Out. They are easier for the next person to read.
- **Use a Code node** when it replaces a long chain of glue nodes, or when you need logic the native nodes cannot express.
- **Pick the right mode.** **Run Once for All Items** processes the whole list in one pass and is usually faster for bulk work than **Run Once for Each Item**.

> **Watch out:** Since n8n 2.0, Code nodes cannot read environment variables by default (`N8N_BLOCK_ENV_ACCESS_IN_NODE` is `true`). Store secrets as credentials and use them in regular nodes.

## 5. Split large workflows into sub-workflows

One 80-node workflow is hard to debug and holds all its data in one run. Splitting it with the **Execute Workflow** node gives you smaller pieces that can be tested, reused and changed on their own.

Sub-workflows also let you process a big list in chunks: the parent sends 200 items at a time, and each sub-workflow run finishes and frees its memory before the next.

> **Note:** In n8n 2.0, if a sub-workflow pauses (for a Wait node over 65 seconds, a form or a human approval) and then resumes, the parent now receives the sub-workflow's final output rather than its original input. Check workflows that relied on the old behaviour. Our guide to [modular n8n workflows](/modular-scalable-n8n-workflows-best-practices/) has patterns for splitting.

## 6. Stop saving what you never read

On a self-hosted instance, saved execution data is often the biggest drain. Each saved run stores the data every node produced.

| Setting | Recommended | Why |
|---|---|---|
| `EXECUTIONS_DATA_SAVE_ON_ERROR` | `all` | You need failed runs to debug them |
| `EXECUTIONS_DATA_SAVE_ON_SUCCESS` | `none` for high-volume workflows | Successful runs are rarely opened |
| `EXECUTIONS_DATA_SAVE_MANUAL_EXECUTIONS` | `false` in production | Test runs clutter the history |
| `EXECUTIONS_DATA_PRUNE` | `true` (the default) | Deletes old finished runs |
| `EXECUTIONS_DATA_MAX_AGE` | `168` to `336` hours | The default is 336 (14 days) |
| `EXECUTIONS_DATA_PRUNE_MAX_COUNT` | Fit to your volume | The default keeps 10,000 |

You can also override these per workflow in **Settings** (**Save successful production executions**, **Save execution progress** and so on). Leave **Save execution progress** off unless you need to resume long runs: it writes to the database after every node.

> **Tip:** On SQLite, pruned space is not handed back to the disk automatically. Set `DB_SQLITE_VACUUM_ON_STARTUP` or run `VACUUM` to reclaim it. For production, PostgreSQL is the better choice anyway; n8n 2.0 dropped MySQL and MariaDB as storage databases.

## 7. Tune the instance

Only once the workflows are lean is it worth looking at the server.

1. **Cap concurrency.** `N8N_CONCURRENCY_PRODUCTION_LIMIT` limits how many production executions run at once. It is off by default; a sensible cap stops a burst of webhooks from exhausting memory.
2. **Set timeouts.** Turn on **Timeout Workflow** in a workflow's settings so a stuck run cannot hold resources forever.
3. **Give it enough memory.** Watch CPU and memory under real load before buying a bigger server. Most slowness traces back to steps 1 to 6.
4. **Move to queue mode when one instance is not enough.** Queue mode (`EXECUTIONS_MODE=queue`) puts executions on a Redis queue and runs them on separate workers. It needs PostgreSQL, every worker needs the same `N8N_ENCRYPTION_KEY`, and each worker runs 10 jobs at once by default. It is available in the free Community Edition; only multi-main high availability needs Enterprise.

## A worked example: a nightly order sync

Here is how the steps above combine on a typical workflow that copies new shop orders into an accounting system.

**Before:** a trigger polls every minute, fetches every order of the day, sends each order to the accounting API one by one, and saves every successful run in full.

**After:**

```flow
trigger | Every 15 minutes      | Only orders since last run | n8n
tool    | Trim the fields       | Keep the 12 fields needed | n8n
tool    | Bulk upload           | 100 orders per API call | n8n
human   | Finance checks the log | Reviews failed orders weekly
output  | Orders in accounts    | Failures saved, successes not | PostgreSQL
```

The polling change alone takes the trigger from up to 43,200 runs a month to at most 2,880. Fetching only new orders and uploading in bulk shortens each run, and saving only failures stops the database growing every week. We have not quoted a speed-up figure here because it depends entirely on the APIs involved; measure your own before and after.

## Optimisation checklist

| Check | Done when |
|---|---|
| Triggers | No polling faster than the business needs; webhooks where possible |
| Early filtering | Irrelevant items stop in the first two nodes |
| Field trimming | Edit Fields (Set) keeps only what later steps use |
| API calls | Bulk endpoints or batching; no one-call-per-item loops on large lists |
| Code | Native nodes first; Code nodes in the right mode |
| Execution data | Failures saved, successes pruned or not saved |
| Instance | Concurrency cap and workflow timeouts set |

Before a newly optimised workflow goes back into production, run it through our [n8n go-live checklist](/n8n-go-live-checklist-before-workflows-touch-real-data/). If you want someone to review and tune your whole instance, that is part of our [reliable n8n automations](/use-cases/reliable-n8n-automations/) work.

## Summary

- **Count what you pay for:** on Cloud, one execution is one full run, so fewer, larger runs cost less.
- **Start at the trigger:** slower polling, webhooks and scheduled batches cut the most executions.
- **Carry less data:** filter early, keep only needed fields, paginate and cache reference data.
- **Call APIs less:** bulk endpoints and batching beat one call per item.
- **Save less:** keep failed runs, prune or skip successful ones.
- **Scale last:** concurrency caps and timeouts first, queue mode when one instance is genuinely not enough.

## FAQ

### What counts as an execution in n8n?

According to n8n's pricing page, an execution is a single run of an entire workflow. The number of steps and the amount of data in that run do not change the count, so one run with 40 nodes counts the same as one run with three.

### How do I reduce the number of n8n executions?

Start with triggers. Poll less often, filter events before they start a run, and process items in batches on a schedule instead of starting one run per record where real-time handling is not needed.

### Why is my self-hosted n8n database so large?

Usually because every successful execution is saved with its full data. Set EXECUTIONS_DATA_SAVE_ON_SUCCESS to none, keep pruning on with a sensible EXECUTIONS_DATA_MAX_AGE, and on SQLite run VACUUM or set DB_SQLITE_VACUUM_ON_STARTUP to reclaim the space.

### When should I use queue mode in n8n?

When one n8n instance can no longer keep up, for example when executions queue up or the editor slows during busy periods. Queue mode needs Redis and PostgreSQL and runs executions on separate worker processes. It is available in the free Community Edition.