Skip to main content

cpufreqizer recommends optimal CPU scaling governors and kernel params based on workload, balancing power and performance.

Project description

CPUFreqRizer

PyPI version License: MIT Downloads LinkedIn

Balancing Power Efficiency and Performance with CPU Scaling Configuration

Overview

CPUFreqRizer is a Python package that determines the optimal CPU scaling configuration for your system based on your workload. It takes user input, such as task type, expected load, and performance requirements, and generates a structured response with recommended CPU scaling policies.

Installation

pip install cpufreqizer

Overview of Functionality

CPUFreqRizer uses an LLM (Large Language Model) to generate a structured response with CPU scaling recommendations. The user provides details about their workload, and the package returns a list of recommended CPU scaling policies, including the appropriate governor and kernel parameters.

Using the Package

from cpufreqizer import cpufreqizer

response = cpufreqizer(user_input={"task_type": "cpu-intensive", "expected_load": 0.8, "performance_requirements": "high"})

Default Behavior

By default, CPUFreqRizer uses the llm7 LLM from the langchain_llm7 package. This is a free-tier LLM with sufficient rate limits for most use cases. You can safely pass your own llm instance (based on these docs) if you want to use a different LLM. For example, to use the openai LLM:

from langchain_openai import ChatOpenAI
from cpufreqizer import cpufreqizer

llm = ChatOpenAI()
response = cpufreqizer(user_input={"task_type": "cpu-intensive", "expected_load": 0.8, "performance_requirements": "high"}, llm=llm)

Obtaining a Free API Key

To use a different LLM with a higher rate limit, you can obtain a free API key on the llm7.io website. You can then pass this API key via environment variable LLM7_API_KEY or directly to the cpufreqizer function:

cpufreqizer(user_input={"task_type": "cpu-intensive", "expected_load": 0.8, "performance_requirements": "high"}, api_key="your_api_key")

GitHub and Contact Information

You can find the source code for this package on GitHub.

If you have any questions or need help with using the package, please don't hesitate to reach out to me at hi@euegne.plus.

Citing the Package

If you use the cpufreqizer package in your research, please cite it as follows:

E. Evstafev, "CPUFreqRizer: A Python Package for Determining Optimal CPU Scaling Configuration"

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

cpufreqizer-2025.12.21234021.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

cpufreqizer-2025.12.21234021-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file cpufreqizer-2025.12.21234021.tar.gz.

File metadata

  • Download URL: cpufreqizer-2025.12.21234021.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for cpufreqizer-2025.12.21234021.tar.gz
Algorithm Hash digest
SHA256 ee5392e3cfa442cbf2850071c2c16a169c80127b65f28e20251000056999dafa
MD5 1e593efbcbaa1487a5e3d69227560865
BLAKE2b-256 af490532f00eb61627ee46096b4856952944cc8e281e5e2e3430976e22cb35c9

See more details on using hashes here.

File details

Details for the file cpufreqizer-2025.12.21234021-py3-none-any.whl.

File metadata

File hashes

Hashes for cpufreqizer-2025.12.21234021-py3-none-any.whl
Algorithm Hash digest
SHA256 00c8840da677f31d8ede8107295b48868117ab70bdd6267bb68f0a316fb88e52
MD5 8ab6512885451d320c9512bb3488e593
BLAKE2b-256 b33a0b33d4115ff0c341cecdac64bec3fe9e70b89b817464b1b186c66c2de1be

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