---
title: "subprocess"
description: "Runs anywhere, such as a laptop or CI, with best-effort limits."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.cpbenchy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# subprocess

## What it does

Runs every worker as a plain child process, pinned to its CPUs on Linux. The time limit is enforced by
killing the process; a CPU time limit is the kernel's (`RLIMIT_CPU`), for the worker process only. There
is no memory limit, and memory is that of the main process only, so measurements are best effort.

For laptops and CI without cgroups. `auto` falls back to it where [`runlimit`](/library/runlimit/)
doesn't work.

## Use it

```python
import cpbenchy

cpbenchy.run("instances/", solvers=["ortools"], time_limit=60, executor="subprocess")
```

```sh
cpbenchy run instances/ -s ortools -t 60 --executor subprocess
```

## Implementation

Source: https://docs.cpbenchy.com/library/subprocess/index.mdx
