Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[talos] Set cpu frequency scheduler to performance#1898

Draft
nbykov0 wants to merge 1 commit intomaincozystack/cozystack:mainfrom
talos-cpu-freq-scalingcozystack/cozystack:talos-cpu-freq-scalingCopy head branch name to clipboard
Draft

[talos] Set cpu frequency scheduler to performance#1898
nbykov0 wants to merge 1 commit intomaincozystack/cozystack:mainfrom
talos-cpu-freq-scalingcozystack/cozystack:talos-cpu-freq-scalingCopy head branch name to clipboard

Conversation

@nbykov0
Copy link
Collaborator

@nbykov0 nbykov0 commented Jan 21, 2026

What this PR does

Sets default cpu frequency scheduler to performance.
Disables cpu energy saving options.

Release note

Default cpu frequency scheduler set to performance.
Cpu energy saving options disabled.

Summary by CodeRabbit

  • Chores
    • Added kernel boot parameters to installable and image profiles (ISO, installer, metal, nocloud) to favor performance-oriented CPU governor and adjust idle handling, improving runtime performance and responsiveness.
    • Initramfs/kernel-style profiles remain unchanged (no extra boot parameters applied).

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 21, 2026

📝 Walkthrough

Walkthrough

A profile generation script was updated to inject a customization block containing three extra kernel arguments. Several Talos profile YAML files now include that customization block (iso, installer, metal, nocloud); initramfs and kernel remain without kernel args or only whitespace changes.

Changes

Cohort / File(s) Summary
Profile generation script
packages/core/talos/hack/gen-profiles.sh
Adds a customizationDefinition heredoc and logic to apply a customization block (extraKernelArgs) for iso, installer, metal, and nocloud profiles; leaves initramfs/kernel customization empty.
Talos profile YAMLs — with customization
packages/core/talos/images/talos/profiles/iso.yaml, packages/core/talos/images/talos/profiles/installer.yaml, packages/core/talos/images/talos/profiles/metal.yaml, packages/core/talos/images/talos/profiles/nocloud.yaml
Inserted a customization section containing extraKernelArgs: cpufreq.default_governor=performance, amd_pstate=active, and intel_idle.max_cstate=0.
Talos profile YAMLs — whitespace only
packages/core/talos/images/talos/profiles/initramfs.yaml, packages/core/talos/images/talos/profiles/kernel.yaml
Minor formatting: added a blank line after the version field; no functional customization added.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I nudged three args into each boot song,
Governor, AMD, idle—short and strong,
Profiles hopping into streamlined chore,
Quick boots, happy kernels—let's explore!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Set cpu frequency scheduler to performance' directly matches the main objective of the PR, which is to set the default CPU frequency scheduler to performance mode.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch talos-cpu-freq-scaling

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nbykov0, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request standardizes the CPU performance settings across various Talos profiles by configuring the kernel to prioritize performance over energy efficiency. By setting the CPU frequency governor to 'performance' and disabling specific energy-saving mechanisms, the changes aim to ensure that Talos systems consistently operate at their maximum potential, which is crucial for workloads requiring predictable and high computational throughput.

Highlights

  • CPU Performance Governor: The default CPU frequency governor is now set to 'performance' across various Talos profiles to ensure consistent high clock speeds and prevent throttling.
  • Energy Saving Options Disabled: CPU energy saving features, specifically amd_pstate and intel_idle.max_cstate, are explicitly disabled to ensure maximum CPU performance without power-saving interventions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@nbykov0 nbykov0 marked this pull request as ready for review January 21, 2026 14:00
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jan 21, 2026
@nbykov0 nbykov0 self-assigned this Jan 21, 2026
@dosubot dosubot bot added the enhancement New feature or request label Jan 21, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates Talos profiles to enhance performance by setting the CPU frequency governor to performance and disabling certain CPU power-saving features. The changes are made in the profile generation script and propagated to all generated profile YAML files. While the intent to boost performance is clear, one of the chosen kernel parameters, intel_idle.max_cstate=0, is very aggressive. My review includes a comment highlighting the potential negative side effects of this setting, such as increased power consumption and potential impacts on Intel Turbo Boost frequencies, and suggests a more balanced alternative.

packages/core/talos/hack/gen-profiles.sh Outdated Show resolved Hide resolved
@nbykov0 nbykov0 marked this pull request as draft January 22, 2026 18:36
@nbykov0 nbykov0 force-pushed the talos-cpu-freq-scaling branch from b9ecd08 to 1b3aadb Compare February 6, 2026 13:54
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
@nbykov0 nbykov0 force-pushed the talos-cpu-freq-scaling branch from 1b3aadb to 357887e Compare February 6, 2026 14:00
@nbykov0 nbykov0 marked this pull request as ready for review February 6, 2026 19:07
lexfrei
lexfrei previously requested changes Feb 6, 2026
Copy link
Contributor

@lexfrei lexfrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall: The kernel parameters are valid and match Talos Performance Tuning documentation. The kernel config confirms all required options are built-in (CONFIG_CPU_FREQ_GOV_PERFORMANCE=y, CONFIG_X86_AMD_PSTATE=y, CONFIG_INTEL_IDLE=y).

A few concerns:

  1. nocloud profile: This profile is typically used for cloud/VM environments (e.g., OpenStack). Inside a VM, the guest usually has no direct access to CPU frequency scaling or hardware C-states — the hypervisor manages that. Applying intel_idle.max_cstate=0 and amd_pstate=active inside a VM is either a no-op or potentially counterproductive. Is there a reason to include these kernel args in the nocloud profile?

  2. intel_idle.max_cstate=0 disables the intel_idle driver entirely, causing the kernel to fall back to acpi_idle, which also has its own C-states. For complete C-state control, processor.max_cstate=0 would also be needed. This is consistent with the Talos docs (which only mention intel_idle.max_cstate=0), but worth being aware of.

  3. Minor: Trailing whitespace after ;; in the initramfs|kernel case block (line 51 in the diff).

@lexfrei lexfrei dismissed their stale review February 6, 2026 21:25

Revised review: the nocloud concern was incorrect (nocloud is also used for bare-metal provisioning). Submitting updated review.

Copy link
Contributor

@lexfrei lexfrei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall: The kernel parameters are valid and match Talos Performance Tuning documentation. The kernel config confirms all required options are built-in (CONFIG_CPU_FREQ_GOV_PERFORMANCE=y, CONFIG_X86_AMD_PSTATE=y, CONFIG_INTEL_IDLE=y).

A couple of notes:

  1. intel_idle.max_cstate=0 disables the intel_idle driver entirely, causing the kernel to fall back to acpi_idle, which also has its own C-states. For complete C-state control, processor.max_cstate=0 would also be needed. This is consistent with the Talos docs (which only mention intel_idle.max_cstate=0), but worth being aware of.

  2. Minor: Trailing whitespace after ;; in the initramfs|kernel case block (line 51 in the diff).

@kvaps kvaps requested a review from IvanHunters as a code owner February 10, 2026 15:58
@nbykov0 nbykov0 marked this pull request as draft February 11, 2026 07:43
@nbykov0
Copy link
Collaborator Author

nbykov0 commented Feb 11, 2026

I'm investigating the best and most compatible options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.