[talos] Set cpu frequency scheduler to performance#1898
[talos] Set cpu frequency scheduler to performance#1898
Conversation
📝 WalkthroughWalkthroughA 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
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @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
🧠 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 AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
b9ecd08 to
1b3aadb
Compare
Signed-off-by: nbykov0 <166552198+nbykov0@users.noreply.github.com>
1b3aadb to
357887e
Compare
lexfrei
left a comment
There was a problem hiding this comment.
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:
-
nocloudprofile: 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. Applyingintel_idle.max_cstate=0andamd_pstate=activeinside a VM is either a no-op or potentially counterproductive. Is there a reason to include these kernel args in thenocloudprofile? -
intel_idle.max_cstate=0disables theintel_idledriver entirely, causing the kernel to fall back toacpi_idle, which also has its own C-states. For complete C-state control,processor.max_cstate=0would also be needed. This is consistent with the Talos docs (which only mentionintel_idle.max_cstate=0), but worth being aware of. -
Minor: Trailing whitespace after
;;in theinitramfs|kernelcase block (line 51 in the diff).
Revised review: the nocloud concern was incorrect (nocloud is also used for bare-metal provisioning). Submitting updated review.
lexfrei
left a comment
There was a problem hiding this comment.
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:
-
intel_idle.max_cstate=0disables theintel_idledriver entirely, causing the kernel to fall back toacpi_idle, which also has its own C-states. For complete C-state control,processor.max_cstate=0would also be needed. This is consistent with the Talos docs (which only mentionintel_idle.max_cstate=0), but worth being aware of. -
Minor: Trailing whitespace after
;;in theinitramfs|kernelcase block (line 51 in the diff).
|
I'm investigating the best and most compatible options. |
What this PR does
Sets default cpu frequency scheduler to performance.
Disables cpu energy saving options.
Release note
Summary by CodeRabbit