功耗数据采集是绿色计算的前提,也是软件能耗测量的基础工作。在功耗数据采集中,通常内置功率传感器采集软件能耗面临功率迟滞、程序能耗受启动时间影响等问题,产生的原因在于内置传感器的硬件构成及其使用的功耗算法。该文针对内置传感器的功耗算法问题,提出了一种基于逼近函数的功率数据矫正方法。该方法根据程序运行时间长短,分别采用数据拟合方法和基于误差方向的逼近函数进行矫正。最后,在代表性的K20系列GPU实验平台上进行验证,实验结果表明该方法能较好地解决传感器采集功耗数据存在的问题,且使用该方法和经验参数法获得的能耗数据相比误差小于1%,具有较高的精度。
Power data acquisition is the premise of the green computing and the basic work of the software energy consumption measurement. In power data acquisition, using the built-in power sensor to get the software energy usually faces the problem of power hysteresis and software energy affected by its start time because of the built-in sensor constitution as well as its power computation algorithm. Aiming at the problem of the built-in power sensor algorithm, this paper proposes a power data correction approach based on approximation function. According to the length of time the program runs, this approach uses the data fitting method and the approximation function method based on the error direction to correct power sensor data respectively. Finally, this approach is verified on the typical K20 GPU series experimental platform. Experimental results show that this approach can better solve the problems with high accuracy and the data obtained by our approach compared to that of the empirical parameter approach is less than 1% error.