Skip to main content
QUICK REVIEW

[Paper Review] Mechanism to Mitigate AVX-Induced Frequency Reduction

Mathias Gottschlag, Frank Bellosa|arXiv (Cornell University)|Dec 20, 2018
Cardiac Arrhythmias and TreatmentsMedicine14 references4 citations
TL;DR

This paper proposes a software-based core specialization mechanism to mitigate AVX-induced frequency reduction in Intel CPUs by restricting execution of wide vector instructions (AVX2/AVX-512) to a subset of cores, thereby isolating frequency slowdowns. Using thread migration via a scheduler interface, it reduces performance variability by over 70% without requiring application-level changes beyond manual code annotation.

ABSTRACT

Modern Intel CPUs reduce their frequency when executing wide vector operations (AVX2 and AVX-512 instructions), as these instructions increase power consumption. The frequency is only increased again two milliseconds after the last code section containing such instructions has been executed in order to prevent excessive numbers of frequency changes. Due to this delay, intermittent use of wide vector operations can slow down the rest of the system significantly. For example, previous work has shown the performance of web servers to be reduced by up to 10% if the SSL library uses AVX-512 vector instructions. These performance variations are hard to predict during software development as the performance impact of vectorization depends on the specific workload. We describe a mechanism to reduce the slowdown caused by wide vector instructions without requiring extensive changes to existing software. Our design allows the developer to mark problematic AVX code regions. The scheduler then restricts execution of this code to a subset of the cores so that only these cores' frequency is affected. Threads are automatically migrated to a suitable core whenever necessary. We identify a suitable load balancing policy to ensure good utilization of all available cores. Our approach is able to reduce the performance variability caused by AVX2 and AVX-512 instructions by over 70%.

Motivation & Objective

  • To address performance degradation in heterogeneous workloads caused by AVX2/AVX-512 instruction-induced frequency scaling on Intel CPUs.
  • To reduce performance variability and restore performance composability in systems where vectorized code negatively impacts unrelated scalar workloads.
  • To design an unobtrusive mechanism that limits frequency reduction to only affected cores, preserving performance on other cores.
  • To evaluate the feasibility and effectiveness of thread migration as a transparent solution for core specialization in homogeneous CPU architectures.

Proposed method

  • The mechanism uses a scheduler interface to mark code regions that use AVX2 or AVX-512 instructions, enabling automatic thread migration to designated cores.
  • Only a subset of cores is allowed to execute wide vector instructions, so frequency reduction affects only those cores, not the entire system.
  • Thread migration is triggered when a thread attempts to execute a wide vector instruction on a core not designated for such operations.
  • The system leverages existing fault-and-migrate mechanisms, using instruction exceptions to initiate migration to a core with AVX support.
  • The prototype integrates with the MuQSS scheduler and uses manual instrumentation to identify vectorized code sections.
  • Future work aims to automate detection using disassembling, performance counters, and last-branch records to identify short AVX-heavy code segments.

Experimental results

Research questions

  • RQ1Can isolating AVX2/AVX-512 execution to a subset of cores reduce system-wide performance degradation caused by frequency scaling?
  • RQ2To what extent can thread migration serve as an unobtrusive mechanism to achieve core specialization in homogeneous CPU architectures?
  • RQ3How effective is a scheduler-level interface for marking vectorized code regions in minimizing performance variability?
  • RQ4Can automatic detection of AVX-heavy code regions be achieved using hardware performance counters and last-branch records?

Key findings

  • The proposed mechanism reduces the performance impact of AVX-induced frequency reduction by over 70% in evaluated workloads.
  • The approach successfully isolates frequency slowdowns to only the cores executing vectorized code, preserving full performance on other cores.
  • Evaluation with nginx and OpenSSL workloads confirmed that the mechanism maintains high throughput while minimizing performance variability.
  • Manual instrumentation of vectorized code regions enables transparent thread migration without application modifications.
  • The prototype demonstrates that software-defined core specialization is viable and effective on existing Intel server CPUs.
  • Future automation via fault-and-migrate techniques—using FXSTOR size restriction to trigger exceptions—shows promise for eliminating manual instrumentation.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.