Skip to main content

Keep GPU and CPU temperatures within given limit.

Project description

Sustainer

Cause it doesn't have to be like this.

Need an engineer license?

License: WTFPL PyPI Downloads Code style: black

Keep GPU and CPU temperatures within given limit.

With it you no longer have to worry about hardware heating up when running long time tasks, especially for your cheap GTX1660, P106 and P104 GPU cards.

Demo

You can use the command line tool sustainer:

sustainer # default target is 'all', so both cpu and gpu stats will be sustained
python3 -m sustainer # alternative syntax

# to specify only cpu or gpu as target
sustainer --target cpu 
sustainer --target gpu  

# changing default configuration:
env TARGET_TEMP=60 sustainer # default: 65
env MAX_POWER_LIMIT_RATIO=0.7 sustainer # default: 0.8
env MAX_FREQ_RATIO=0.7 sustainer # default: 0.8

Optionally run with a process manager such as pm2 to persist as daemon:

pm2 start -n sustainer_daemon sustainer
pm2 save

If you want to call it with code, check out the test files.

Install

First, install from PyPI:

pip install sustainer

Then, install the following binaries:

# Ubuntu
sudo apt install -y cpufrequtils lm-sensors

# Debian
sudo apt install -y linux-cpupower lm-sensors

For NVIDIA GPU, you need to install related drivers and make sure nvidia-smi is in PATH.

For AMD GPU, install ROCm drivers and make sure rocm-smi is in PATH.

Supported hardware

CPU: Intel, AMD, ARM

GPU: NVIDIA, AMD

Supported platform

Linux only currently.

Stargazers

Star History Chart

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

sustainer-0.1.7-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file sustainer-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: sustainer-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for sustainer-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 edf6f92c707dee49370d447e6b67eab02aa6bfdad23b6701a120116eeccccb41
MD5 208b1ace92755f286975ae32d30a506d
BLAKE2b-256 18d451a9449478345dbfb269353488df6a91bbe02fb7b5e1610c0ff48c5273a5

See more details on using hashes here.

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