pi_stress(8)

πŸ“¦
version 2.11 Β· 2 versions
, in arch rolling, centos-stream 10, centos-stream 9, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu resolute, ubuntu stonking

✨ pi_stress β€” a whole manual page, but make it cute ✨

okay bestie, we're reading pi_stress from the Linux System Administrator's Manual (section 8, iykyk) and honestly? it's giving stress-test royalty. πŸ’…

SPDX-License-Identifier: GPL-2.0-or-later</purl>


🌸 NAME 🌸

pi_stress β€” a stress test for POSIX Priority Inheritance mutexes 🧚


πŸŽ€ SYNOPSIS πŸŽ€

pi_stress [-d|--debug] [-D|--duration [-g|--groups N] [-i|--inversions
INV] [--json FILENAME] [-m|--mlockall] [-p|--prompt] [-q|--quiet]
[-r|--rr] [-s|--sched OPTS] [-u|--uniprocessor] [-v|--verbose]
[-V|--version]

πŸ’– DESCRIPTION πŸ’–

so pi_stress is this program that stresses the priority-inheritance code paths for POSIX mutexes, both in the Linux kernel and in the C library. it runs as a realtime-priority task and launches inversion machine thread groups. each inversion group causes a priority inversion condition that will deadlock if priority inheritance doesn't work πŸ’€ like, that's the whole point. no cap.


✨ OPTIONS ✨

  • -d, --debug β€” run in debug mode; lots of extra prints πŸ—£οΈ
  • -D TIME, --duration=TIME β€” specify a length for the test run. append 'm', 'h', or 'd' to specify minutes, hours or days ⏰
  • -g N, --groups=N β€” the number of inversion groups to run. defaults to 10 🎯
  • -h, --help β€” display a short help message and options 🫢
  • -i N, --inversions=N β€” N number of inversion conditions. this is the total number of inversions for all inversion groups. default is -1 for infinite ♾️
  • --json=FILENAME β€” write final results into FILENAME, JSON formatted πŸ“„
  • -m, --mlockall β€” call mlockall to lock current and future memory allocations and prevent being paged out πŸ”’
  • -p, --prompt β€” prompt before actually starting the stress test πŸ™ˆ
  • -q, --quiet β€” suppress running output 🀫
  • -r, --rr β€” run inversion group threads as SCHED_RR (round-robin). the default is to run the inversion threads as SCHED_FIFO πŸ”
  • -s OPTS, --sched OPTS β€” scheduling options per thread type:
id=[high|med|low],
policy=[fifo,rr],priority=N,
policy=deadline,runtime=N,deadline=N,period=N
  • -u, --uniprocessor β€” run all threads on one processor. the default is to run all inversion group threads on one processor and the admin threads (reporting thread, keyboard reader, etc.) on a different processor πŸ–₯️
  • -v, --verbose β€” run with verbose messages πŸ“’
  • -V, --version β€” print version number πŸ‘‘

πŸ¦‹ CAVEATS πŸ¦‹

bestie. listen. the pi_stress test threads run as SCHED_FIFO or SCHED_RR threads, which means they can starve critical system threads. 😭

it is advisable to change the scheduling policy of critical system threads to be SCHED_FIFO prior to running pi_stress and use a priority of 10 or higher, to prevent those threads from being starved by the stress test. protecting your babies fr fr 🫢


πŸ’€ BUGS πŸ’€

no documented bugs. iconic behavior, honestly. not a single one. ✨


πŸ‘‘ AUTHOR πŸ‘‘

Clark Williams <williams@redhat.com> πŸ’œ


and that's the whole thing bestie, go stress some mutexes responsibly 🌈⭐

this page came from the Linux System Administrator's Manual, dated Nov 27, 2006, and it's pi_stress(8) β€” mwah, take care of her πŸŽ€πŸ’…

πŸ“¦ where this page comes from