Small devices are frequently used in IoT and smart-city applications to perform periodic dedicated tasks with soft deadlines. This work focuses on developing methods to derive efficient power-management methods for periodic tasks on small devices. We first study the limitations of the existing Linux built-in methods used in small devices. We illustrate three typical workload/system patterns that are challenging to manage with Linux's built-in solutions. We develop a reinforcement-learning-based technique with temporal encoding to derive an effective DVFS governor even with the presence of the three system patterns. The derived governor uses only one performance counter, the same as the built-in Linux mechanism, and does not require an explicit task model for the workload. We implemented a prototype system on the Nvidia Jetson Nano Board and experimented with it with six applications, including two self-designed and four benchmark applications. Under different deadline constraints, our approach can quickly derive a DVFS governor that can adapt to performance requirements and outperform the built-in Linux approach in energy saving. On Mibench workloads, with performance slack ranging from 0.04 s to 0.4 s, the proposed method can save 3% - 11% more energy compared to Ondemand. AudioReg and FaceReg applications tested have 5%- 14% energy-saving improvement. We have open-sourced the implementation of our in-kernel quantized neural network engine. The codebase can be found at: https://github.com/coladog/tinyagent.
翻译:小型设备常用于物联网和智能城市应用中,执行具有软截止期限的周期性专用任务。本研究旨在开发针对小型设备周期性任务的高效功耗管理方法。首先,我们分析了现有Linux内置方法在小型设备中的局限性,并展示了三种典型的负载/系统模式,这些模式难以通过Linux内置方案进行有效管理。我们提出了一种基于时序编码的强化学习技术,以构建能够在上述三种系统模式下有效工作的动态电压频率调整(DVFS)调节器。该调节器仅使用单一性能计数器(与Linux内置机制相同),且无需为负载建立显式的任务模型。我们在Nvidia Jetson Nano开发板上实现了原型系统,并使用六个应用(包括两个自设计应用和四个基准测试应用)进行了实验验证。在不同截止期限约束下,我们的方法能够快速生成适应性能需求的DVFS调节器,并在节能方面优于Linux内置方案。在Mibench负载下,当性能松弛时间在0.04秒至0.4秒之间时,所提方法相比Ondemand调节器可节省3%-11%的能耗;在AudioReg和FaceReg应用中,节能提升幅度达到5%-14%。我们已开源内核内量化神经网络引擎的实现,代码库地址为:https://github.com/coladog/tinyagent。