skillfed

cpuset-py3

Fork of cpuset (https://github.com/lpechacek/cpuset) by Alex Tsariounov that works with python3

cpuset-py3 v1.0.2 363.9K downloads/30d#7,215 on PyPI4
License unclear Abandoned released

What it is and what it does

cpuset-py3 is a Python wrapper around the Linux cpuset kernel facility, which controls CPU and memory resource allocation for processes and groups. It abstracts the low-level filesystem calls needed to create, modify, and manage cpusets—logical groupings of CPUs and memory nodes that constrain process execution. The package is a Python 3 port of the original cpuset utility, intended for system administrators and developers who need programmatic control over CPU affinity and NUMA resource binding on Linux systems.

The package has no external dependencies and installs easily, but it is abandoned—the last commit was in 2016 and no releases have been made since 2020. It requires root privileges, a Linux kernel with cpuset support, and the cpuset filesystem to be mounted. The license is stated as GPLv2 in the description but not formally declared in package metadata, creating ambiguity for downstream use.

Use it for:

  • Isolate CPU cores for latency-sensitive workloads by binding processes to specific cpuset groups.
  • Enforce NUMA-aware memory allocation and CPU binding on multi-socket systems.
  • Programmatically manage CPU resource limits for containerized or multi-tenant applications.
  • Restrict process execution to specific CPU cores for performance testing and benchmarking.
  • Implement CPU affinity policies in system administration scripts on Linux servers.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Wraps Linux cpuset kernel facilities through Python to manage CPU and memory resource allocation on multi-core systems.

No—the package is abandoned (last commit 2016-01-21, no releases since 2020-12-01) and will receive no maintenance or security updates. The license is ambiguous in metadata. If you need cpuset control, use the system cpuset command directly, interact with cgroups v2 via standard Python libraries, or adopt a maintained alternative. Install only if you are maintaining legacy code that already depends on it.

Install

cpuset-py3 on PyPI

pip

pip install cpuset-py3

uv

uv add cpuset-py3

poetry

poetry add cpuset-py3

Installing cpuset-py3

Before you install

Low install friction with no runtime dependencies, but the project is abandoned—last commit was 2016-01-21 and no releases since 2020-12-01. Expect no maintenance or security updates.

License in practice

License treatment is unclear: the description excerpt cites GNU General Public License version 2, but the package metadata does not declare it formally. Verify the actual license terms before use in proprietary or restrictive-license projects.

Quickstart

pip install cpuset-py3

import cpuset
# Requires root access and Linux cpuset filesystem mounted
cpuset.create_cpuset('mygroup', cpus='0-3')

Requires Linux kernel with cpuset support enabled, root privileges to modify cpuset filesystem, and /dev/cpuset or /sys/fs/cgroup/cpuset mounted.

Verify before relying

  • Whether the package works with modern Python 3 versions (last release 2020-12-01, no version constraint specified).
  • Actual license declaration: description cites GPLv2 but metadata does not formalize it.
  • Whether the cpuset filesystem API it wraps has changed in recent Linux kernels.

Package facts

License not declared (unclear)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 2,082 days since the last release
Last repo commit
First released
Downloads 363,856/month — #7,215 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cpuset_py3-1.0.2-py3-none-any.whl

Programming Language :: Python :: 3 :: Only

Tags

linux cpu affinity managementcpuset kernel wrappercpu memory resource allocationprocess cpu bindinglinux cgroup cpu controlnuma node managementcpu core isolation
linux-kernelsystem-adminabandoned

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

pysigset

Provides Python access to POSIX signal masking…

copyleft · top 15,000 on PyPI

intbitset

intbitset provides a fast, memory-efficient set…

copyleft · top 15,000 on PyPI

hip-python

Provides low-level Python and Cython bindings…

permissive · top 15,000 on PyPI

spidev

Provides Python bindings to interact with SPI…

permissive · top 15,000 on PyPI

ephemeral-port-reserve

Reserves an ephemeral port reliably and…

permissive · top 15,000 on PyPI

intel-openmp

Provides Intel's OpenMP runtime library for…

unclear · top 5,000 on PyPI

tbb

Provides Python bindings to Intel's oneAPI…

unclear · top 5,000 on PyPI

bash_kernel

Enables running and interacting with bash…

permissive · top 15,000 on PyPI

jupyter-kernel-client

Connects to live Jupyter Kernels over HTTP and…

permissive · top 15,000 on PyPI

kernels

Loads optimized compute kernels from Hugging…

permissive · top 5,000 on PyPI