Sustainer
Cause it doesn't have to be like this.
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
Metadata
Release files for sustainer 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sustainer-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Release files / sustainer-0.1.7-py3-none-any.whl
| Download URL | sustainer-0.1.7-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edf6f92c707dee49370d447e6b67eab02aa6bfdad23b6701a120116eeccccb41
|
|
BLAKE2b-256 checksum How to use checksums |
18d451a9449478345dbfb269353488df6a91bbe02fb7b5e1610c0ff48c5273a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Security for sustainer 0.1.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.