PAID: Power-Efficient AI-Optimized Databases
摘要
Traditionally, query processors (QPs) have been designed to optimize response time, but not energy consumption. Heeding this new optimization goal, during the last decade, the database community turned its attention to enhancing the energy efficiency (EE) of QPs, but there are still major challenges. By analyzing recent work on EE of QPs, we observe that even though Machine Learning (ML) models can accurately predict energy consumption, they do not modify the core QP functionality (software) nor dynamically adjust CPU configuration parameters (hardware: # of cores and clock frequency), to actually save energy for a query. To address this gap, we introduce PAID, a subsystem integrated with the query optimizer that combines old AI with new AI: a Genetic Algorithm (GA) with a Neural Network (NN). The NN model predicts query energy consumption, whereas GA determines the optimal CPU configuration, deciding clock speed frequency and core allocation for each query. The GA configuration is then fed back into the NN model to tune prediction accuracy. Our experiments, conducted on the TPC-H benchmark with PostgreSQL, show that PAID effectively finds CPU configurations that exceed the performance of default settings, achieving significant energy savings.