Skip to main content

Inspect and manage Linux hugepages

Project description

hugepages: inspect and manage Linux hugepages

hugepages

PyPI Python Test

Inspect and manage Linux hugepages.

Install

pipx install hugepages

Or standalone (single-file, stdlib only, no pip needed):

curl -fsSL https://raw.githubusercontent.com/xnvme/hugepages/main/src/hugepages/hugepages.py \
  -o ~/.local/bin/hugepages && chmod +x ~/.local/bin/hugepages

Shell completion

hugepages --print-completion bash > ~/.local/share/bash-completion/completions/hugepages

Open a new shell (or source the file) and tab-completion is live: hugepages <TAB> lists info setup mount.

Usage

$ hugepages --help
usage: hugepages [-h] [--version] [--verbose] [--print-completion SHELL]
                 {info,setup,mount} ...

Inspect and manage Linux hugepages

positional arguments:
  {info,setup,mount}
    info                Show hugepage status and capabilities
    setup               Configure hugepage pool
    mount               Mount hugetlbfs

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --verbose             Enable verbose logging
  --print-completion SHELL
                        Print shell completion script to stdout and exit

A few common invocations:

hugepages info                                  # current pool state + supported sizes
sudo hugepages setup --count 512                # reserve 512 pages at the smallest supported size
sudo hugepages setup --size 1048576 --count 4   # reserve 4 x 1 GiB pages
sudo hugepages mount                            # mount hugetlbfs at /dev/hugepages

hugepages info sample output (pool not yet reserved):

Hugepage Support:
  Size: 2048kB  Total: 0  Free: 0  Reserved: 0
  Size: 1048576kB  Total: 0  Free: 0  Reserved: 0

Related

  • devbind: inspect and control PCI device-driver binding in Linux.
  • iommu: inspect and configure the IOMMU isolation level in Linux.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hugepages-0.2.8.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hugepages-0.2.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file hugepages-0.2.8.tar.gz.

File metadata

  • Download URL: hugepages-0.2.8.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hugepages-0.2.8.tar.gz
Algorithm Hash digest
SHA256 7cdb5f9908411f7fc9d038616a6a1c40665da74f859027c4ec723f7ce7c3c21c
MD5 b23065efed7bed42d9693f451e0098e8
BLAKE2b-256 a9b925d12a8ac8107640f9282919478f58dae1cba1533a0a45a2d39c6cf906a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugepages-0.2.8.tar.gz:

Publisher: publish.yml on xnvme/hugepages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hugepages-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: hugepages-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for hugepages-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 971001251e762c2bff2971163c6936096d7af7512797db12d07a2a8653772cbb
MD5 c6bc1da45f18c8f1fee35db1426c5d1f
BLAKE2b-256 fcb8b6313547e037d365656d3e050c6aba37401fc4f9a240006c7f0aa442e1da

See more details on using hashes here.

Provenance

The following attestation bundles were made for hugepages-0.2.8-py3-none-any.whl:

Publisher: publish.yml on xnvme/hugepages

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page