arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1901.04982cs.DCcs.PF
收藏

缓解AVX引起的频率降低的机制

Mechanism to Mitigate AVX-Induced Frequency Reduction

Mathias Gottschlag, Frank Bellosa

摘要:

现代英特尔CPU在执行宽向量操作(AVX 2和AVX-512指令)时会降低频率,因为这些指令会增加功耗。频率仅在包含此类指令的最后一个代码段已被执行之后两毫秒再次增加,以防止频率改变的次数过多。由于这种延迟,间歇性地使用宽向量操作可能会显着降低系统的其余部分。例如,以前的工作表明,如果SSL库使用AVX-512矢量指令,Web服务器的性能将降低10%。这些性能变化在软件开发期间很难预测,因为向量化的性能影响取决于特定的工作负载。我们描述了一种机制,以减少宽向量指令所造成的速度减慢,而不需要对现有软件进行大量的更改。我们的设计允许开发人员标记有问题的AVX代码区域。然后,调度器将该代码的执行限制在核的子集,使得仅这些核的频率受到影响。只要有必要,线程就会自动迁移到合适的核心。我们确定了一个合适的负载均衡政策,以确保所有可用的核心的良好利用率。我们的方法能够将AVX2和AVX-512指令引起的性能变化减少70%以上。

英文摘要:

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%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑