---
name: "perfalloc"
section: "1"
platform: "linux"
package: "pcp"
version: "7.2.2-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/perfalloc"
---

# perfalloc(1)

notify pmdaperfevent(1) to disable hardware counter allocation.

## NAME

**perfalloc** - notify [**pmdaperfevent**(1)](/pmdaperfevent/1.md) to disable hardware counter allocation.

## SYNOPSIS

**$PCP\_PMDAS\_DIR/perfevent/perfalloc** \[**-D**\] \[**-d**\] \[**-f** *lockfile*\] \[**-h**\] \[**-v**\] \[*commandline*\]

## DESCRIPTION

**perfalloc** is a command that notifies the [**pmdaperfevent**(1)](/pmdaperfevent/1.md) to disable hardware counter event collection. This allow unprivileged processes to use the hardware counters.

If the reservation request fails, then perfalloc exits immediately with exit code EXIT\_FAILURE. If successful, the perfalloc will run until a kill signal is received. The reservation request persists while perfalloc is running.

Note that **pmdaperfevent** is affected by the value of the *kernel.perf\_event\_paranoid* setting, which can be adjusted by [**sysctl**(8)](/sysctl/8.md).

If a commandline is given, this is executed as a subprocess of the agent. When the command dies, so does the agent.

A brief description of the command line options follows:

- **-D**

  run in the foreground (the default)

- **-d**

  run in the background

- **-f FILE**

  use FILE as the lock file (default $PCP\_PMDAS\_DIR/perfevent/perflock)

- **-h**

  display a help message and exit

- **-v**

  output version number and exit

## BUGS

There may be a delay of up to 100 milliseconds between perfalloc requesting the hardware counter disabling and the perfevent PMDA processing the request.

The perfalloc process does not check the status of the request and therefore is not able to provide a positive confirmation that the request succeeded and the hardware counters are disabled.

## SEE ALSO

[**pmdaperfevent**(1)](/pmdaperfevent/1.md), **perfevent.conf**(3) and [**sysctl**(8)](/sysctl/8.md).
