Skip to content

Concurrency & Resource Limits

Bruin runs assets in parallel based on their dependencies. Assets without dependencies on each other execute simultaneously.

Workers (CLI)

The --workers flag controls how many assets run at once:

bash
bruin run --workers 8
WorkersUse Case
1-4Memory-heavy Python assets, local development
8-16General use (default: 16)
16-32Lightweight SQL assets pushing work to the warehouse

Pipeline Concurrency (Bruin Cloud)

The concurrency setting in pipeline.yml controls how many runs of the same pipeline can overlap:

yaml
concurrency: 2  # Allow 2 runs simultaneously (default: 1)

Keep this low (1-2) unless you're backfilling independent date ranges.

Instance Types & Weighted Slots (Bruin Cloud)

Larger instances consume more of your tenant's resource pool:

InstanceMemorySlots Used
b1.nano256 MB1
b1.small1 GB~2
b1.large4 GB~4
b1.xlarge6 GB~6

Example: With 32 available slots, you can run:

  • 32 nano instances, OR
  • 8 large instances, OR
  • A mix (e.g., 4 large + 16 nano)

This means memory-intensive pipelines naturally run fewer assets in parallel.

Quick Reference

SettingControlsDefaultScope
--workersAssets running simultaneously16Single run
concurrencyPipeline runs overlapping1Cloud only
instanceCPU/memory per assetb1.nanoCloud only

Platform Notes

  • DuckDB: Cannot share database files across parallel processes. Use --workers 1 for shared files.
  • Cloud warehouses (BigQuery, Snowflake): Handle high concurrency well since computation happens on their infrastructure.