psrset(8) on Solnix vs Linux and the BSDs

psrset is the illumos command at /usr/sbin/psrset for creating processor sets and binding processes or LWPs to them. Linux taskset and FreeBSD cpuset pin a process to a CPU mask and have no create/assign/bind subcommands. NetBSD psrset is the closest match, with a smaller option set.

What Solnix runs

A default Solnix system runs the illumos psrset at /usr/sbin/psrset. No other variants are shipped. The page says psrset cannot change processor disposition when resource pools are enabled; use pooladm(8) and poolcfg(8) then.

Differences

Compared withTopicWhat differs
Linux, FreeBSDmodel: named sets vs affinity masksSolnix psrset creates numbered processor sets (-c), assigns CPUs to them (-a) and binds processes to them (-b). Processors in a set run only LWPs bound to that set. Linux taskset only sets a process's CPU affinity mask.
Source: Solnix psrset(8) DESCRIPTION, -a, -b, -c; Linux taskset(1) DESCRIPTION
LinuxCPU specification syntaxSolnix psrset takes processor IDs as operands: single numbers, space-separated lists, and ranges such as 1-3 5 7-8. Linux taskset takes a hex bitmask, or a comma-separated list with -c/--cpu-list, which also supports a :N stride.
Source: Solnix psrset(8) OPERANDS processor_id; Linux taskset(1) DESCRIPTION, -c
Linuxrunning a command in a setSolnix uses psrset -e processor_set_id command [argument(s)]. The command and its children run only on that set's processors. Linux uses taskset mask command, which sets an affinity mask and does not use a set.
Source: Solnix psrset(8) -e; Linux taskset(1) SYNOPSIS, USAGE
FreeBSDset IDs and default setFreeBSD cpuset starts processes in set 1 and has an immutable root set 0 of all CPUs, queried with -r. The Solnix page documents no default or root set ID. Its -c prints the ID of the new set.
Source: FreeBSD cpuset(1) DESCRIPTION, -r; Solnix psrset(8) -c
Linux, FreeBSDflags differ in meaningOn Solnix, -c creates a set, -p lists the set assignments of processors, and -d deletes a set. On FreeBSD cpuset, -c refers to the target's cpuset, -p takes a pid, and -d names a NUMA domain. On Linux taskset, -p means a pid and -c means a CPU list.
Source: Solnix psrset(8) -c, -p, -d; FreeBSD cpuset(1) -c, -p, -d; Linux taskset(1) -c, -p
FreeBSDno NUMA or jail/irq targetsFreeBSD cpuset can target a jail (-j), thread (-t), irq (-x) or NUMA domain policy (-n). The Solnix psrset page documents none of these. It binds by pid, with an optional /lwpid, or by zone with -b -z.
Source: FreeBSD cpuset(1) -j, -t, -x, -n; Solnix psrset(8) SYNOPSIS, -b
NetBSDzone binding and LWP selectionSolnix psrset -b -z zone binds every process and thread in a zone to a set. It also accepts pid/lwpid, with ranges like 2,3,4-8, to bind or query a subset of LWPs. The NetBSD synopsis has neither and binds whole processes.
Source: Solnix psrset(8) SYNOPSIS, -b, OPERANDS lwpid; NetBSD psrset(8) -b
NetBSDextra Solnix optionsSolnix adds -F (unbind LWPs first when using -a, -r or -c), -f and -n (disable and enable interrupts for a set), -q and -Q (show bindings), and -U (remove all bindings of sets). NetBSD psrset has none of these.
Source: Solnix psrset(8) -F, -f, -n, -q, -Q, -U; NetBSD psrset(8) SYNOPSIS
NetBSDdeleting a setSolnix psrset -d accepts several set IDs and releases all associated processors and processes. NetBSD -d takes one setid and re-binds any bound LWPs to the default processor set.
Source: Solnix psrset(8) SYNOPSIS, -d; NetBSD psrset(8) -d
NetBSDunbinding and removing CPUsOn NetBSD, -u binds processes to the system default set and -r returns a CPU to the default set. Solnix -u removes the set bindings so the process can run on any on-line processor, and -r returns processors to the general pool.
Source: NetBSD psrset(8) -u, -r; Solnix psrset(8) -u, -r
all fourprivilegeSolnix -a, -b, -c, -d, -e, -f, -n and -r need the PRIV_SYS_RES_CONFIG privilege. Other users may unbind with -u only from sets without PSET_NOESCAPE, and only for processes they may control. The NetBSD page does not describe privileges.
Source: Solnix psrset(8) -a, -b, -c, -u; NetBSD psrset(8)
all fourCPU online/offline is separateSolnix psrset -f and -n toggle interrupts and refer to psradm(8). NetBSD does CPU online/offline and interrupt control through cpuctl(8). The Solnix page does not describe taking CPUs offline.
Source: Solnix psrset(8) -f, -n; NetBSD cpuctl(8) offline, online, intr, nointr

Everyday tasks

TaskSolnixLinuxFreeBSDNetBSD
run a command on a set of CPUspsrset -c CPUs, then psrset -e setid commandtaskset -c cpu-list commandcpuset -l cpu-list commandpsrset -e setid command
create a processor setpsrset -c [processor_id...]—cpuset -C -p pid (new cpuset for a process)psrset -c [cpuid ...]
bind a running processpsrset -b processor_set_id pidtaskset -p mask pidcpuset -l cpu-list -p pidpsrset -b setid pid ...
show a process's CPU bindingpsrset -q pidtaskset -p pidcpuset -g -p pid—
list sets and member CPUspsrset -i—cpuset -g -s setidpsrset -i
remove a bindingpsrset -u pid——psrset -u pid ...
delete a setpsrset -d processor_set_id——psrset -d setid

Standards

  • POSIX: psrset is not a POSIX.1-2024 utility.

Writing portable scripts

  • Do not assume psrset exists: Linux has taskset and FreeBSD has cpuset. Branch on the tool present, and keep set-creation logic separate for Solnix and NetBSD.
  • Among psrset implementations, use only -a, -b, -c, -d, -e, -i, -p, -r and -u, which both the Solnix and NetBSD pages document. Note the Solnix and NetBSD pages differ in what -d, -r and -u do.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.