PERFALLOC(1)
π PERFALLOC β bestie edition π
okay so quick vibe check: this is the manual page for perfalloc, from the Performance Co-Pilot family of tools. she's a little command with one job and she does it iconically. let's get into it π
β¨ NAME β¨
perfalloc β notify pmdaperfevent(1) to disable hardware counter allocation. that's it. that's the whole personality. no cap π
πΈ SYNOPSIS πΈ
$PCP_PMDAS_DIR/perfevent/perfalloc [-D] [-d] [-f lockfile] [-h] [-v]
[commandline]
yes she lives way down in $PCP_PMDAS_DIR/perfevent/, she's not out here in your $PATH like some people π
π¦ DESCRIPTION π¦
so perfalloc is a command that pings pmdaperfevent(1) and is like "hey bestie, turn OFF hardware counter event collection." and the whole point of that is this allows unprivileged processes to use the hardware counters. it's giving "sharing is caring" energy fr fr π«Ά
here's the tea on how the lifecycle goes:
- if the reservation request fails,
perfallocdips out immediately with exit codeEXIT_FAILURE. no waiting around, no small talk. - if it succeeds,
perfallocjust chills and runs until it receives a kill signal. and the reservation request persists the entire timeperfallocis running. so like, don't close the tab, babe π
heads up:pmdaperfeventis affected by the value of thekernel.perf_event_paranoidsetting, which you can adjust withsysctl(8). iykyk π
and ooh, one more thing: if a commandline is given, it gets executed as a subprocess of the agent. and the way that this works is β when the command dies, so does the agent. they're ride or die. literally. ππ
a brief description of the command line options follows (okay she said "brief" but we're gonna be thorough because you deserve the full picture, bestie):
-Dβ run in the foreground (this is the default, so it's basically the "i'm already doing this" flag π )-dβ run in the background-fFILE β use FILE as the lock file (the default is$PCP_PMDAS_DIR/perfevent/perflock)-hβ display a help message and exit (our fave, the little "help me help you" π₯Ί)-vβ output version number and exit (she's telling you who she is β¨)
π BUGS π
okay so, not everything is perfect and we have to be honest about it:
- there may be a delay of up to 100 milliseconds between
perfallocrequesting the hardware counter disabling and the perfevent PMDA actually processing the request. so like... a tiny little lag. blink and you'll miss it, but it's real. β³ - the
perfallocprocess 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 actually disabled. so she asks, and then she just... trusts. bestie has faith in the universe π no receipt, no proof, just vibes. and honestly? that's a little scary but we move π«Ά
π SEE ALSO π
go read these, they're all part of the lore:
pmdaperfevent(1)perfevent.conf(3)sysctl(8)
and that's the page, bestie!! π this little manual is brought to you by Performance Co-Pilot, aka PCP, and it's the PERFALLOC(1) page β so now you know her, you love her, you understand her lock file defaults. go forth and allocate responsibly. mwah ππβ¨
π¦ where this page comes from
- arch rolling: pcp 7.2.2-2 Β· GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
- centos-stream 10: pcp-doc 7.1.5-6.el10 Β· GPL-2.0-or-later AND CC-BY-3.0
- centos-stream 9: pcp-doc 6.3.7-14.el9 Β· GPL-2.0-or-later AND CC-BY-3.0
- debian trixie: pcp 6.3.8-1
- fedora 43: pcp-doc 7.0.1-1.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 43: pcp-doc 7.2.1-1.fc43
- fedora 43: pcp-doc 7.2.2-1.fc43
- fedora 43: pcp-doc 7.2.2-2.fc43 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.1.0-6.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- fedora 44: pcp-doc 7.2.1-1.fc44
- fedora 44: pcp-doc 7.2.2-1.fc44
- fedora 44: pcp-doc 7.2.2-2.fc44 Β· GPL-2.0-or-later AND CC-BY-3.0
- ubuntu questing: pcp 6.3.8-1
- ubuntu resolute: pcp 7.1.1-1
- ubuntu stonking: pcp 7.2.1-2build1
- Copyright (c) 2014 Joseph White
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms