ALPHA: wire is a tool to deploy nixos systems
wire.althaea.zone/
1---
2comment: true
3title: Use Parallelism
4description: How to use parallelism with wire Tool.
5---
6
7# {{ $frontmatter.title }}
8
9{{ $frontmatter.description }}
10
11## Controlling CPU Usage
12
13wire evaluates, builds, pushes, and deploys each node completely independently
14from each other. Internally wire calls this process a "node execution".
15
16The default number of parallel _node executions_ is `10`, which can be
17controlled with the `-p` / `--parallel` argument.
18
19```sh
20$ wire apply -p <NUMBER>
21```
22
23## Interaction with Nix's `max-jobs`
24
25Nix has an overall derivation build limit and core limit.
26If executing a node fills Nix's `max-jobs` all other nodes will bottleneck. You
27should read [the relevant
28documentation](https://nix.dev/manual/nix/2.28/advanced-topics/cores-vs-jobs) to fine tune these settings.
29
30When a Node is built remotely due to
31[`deployment.buildOnTarget`](/reference/module.html#deployment-buildontarget)
32that node will not push up the _local machine's_ max-jobs limit.