Skip to content

Feature: Add SMT/hyperthreading control for AKSNodeClass via VMSizeProperties #1541

@fabioaraujopt

Description

@fabioaraujopt

Summary

Azure Karpenter currently does not expose a first-class API to control SMT/hyperthreading behavior for nodes provisioned from AKSNodeClass.

AWS users can influence SMT behavior in their provider workflows, but Azure AKSNodeClass has no equivalent provider-native setting, creating a cross-provider capability gap.

Problem

For workloads where SMT policy matters, the current Azure provider behavior is too rigid:

  • No explicit way to request 1 vCPU per physical core (SMT disabled)
  • No provider-level API field for users to express this intent in AKSNodeClass
  • Teams must accept defaults or rely on non-ideal workarounds

Impact

Lack of SMT controls affects users that need:

  • Performance consistency for CAE/HPC-like workloads
  • Security hardening scenarios where disabling SMT is part of mitigation policy
  • Provider parity between AWS and Azure Karpenter experiences

Proposed Solution

Add support for Azure VM vCore customization in AKSNodeClass:

  • Add vmSizeProperties to AKSNodeClassSpec
  • Support vmSizeProperties.vCPUsPerCore with validation range 1-2
  • Apply the value to VM hardwareProfile at VM creation time
  • Regenerate CRDs and include tests for validation + conversion/mapping logic

Constraints / Notes

  • Azure requires support at VM size/image/API level
  • Configuration is applied at VM creation time (not mutable on running VMs)
  • Expected values:
    • 1 = SMT disabled
    • 2 = SMT enabled/default

References

Outcome

Users can declaratively control SMT policy in Azure through AKSNodeClass, improving performance/security posture and reducing provider capability gaps.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions