Population size influence on the energy consumption of genetic programming
Abstract
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the Spanish Ministry of Economy and Competitiveness under project TIN2017-85727-C4-\{2,4\}-P. Grant PID2020-115570GB-C22 and PID2020-115570GB-C21 funded by MCIN/AEI/10.13039/501100011033. Junta de Extremadura under project GR15068.
Full text
Original Paper Measurement and Control 2022, Vol. 0(0) 1–14 © The Author(s) 2022 Article reuse guidelines: sagepub.com/journals-permissions DOI: 10.1177/00202940211064471 journals.sagepub.com/home/mac Population size influence on the energy consumption of genetic programming Josefa D´ ıaz- ´ Alvarez 1 , Pedro A Castillo 2 , Francisco Fern´ andez de Vega 1 , Francisco Ch´ avez 3 and Jorge Alvarado 4 Abstract Evolutionary Algorithms (EAs) are routinely applied to solve a large set of optimization problems. Traditionally, their performance in solving those problems is analyzed using the fitness quality and computing time, and the effect of evolutionary operators on both metrics is routinely used to compare different versions of EAs. Nevertheless, scientists face nowadays the challenge of considering the energy efficiency in addition to computational time, which requires studying the energy consumption of algorithms. This paper discusses the interest of introducing power consumption as a new metric to analyze the performance of standard genetic programming (GP). Two well-studied benchmark problems are addressed on three different computing platforms, and two different approaches to measure the power consumption have been tested. Analyzing the population size, the results demonstrates its influence on the energy consumed: a non-linear relationship was found between size and energy required to complete an experiment. This analysis was extended to the cache memory and results show an exponential growth in the number of cache misses as the population size increases, which affects the energy consumed. This study shows that not only computing time or solution quality must be analyzed, but also the energy required to find a solution. Summarizing, this paper shows that when GP is applied, specific considerations on how to select parameter values must be taken into account if the goal is to obtain solutions while searching for energy efficiency. Although the study has been performed using GP, we foresee that it could be similarly extended to EAs. Keywords energy consumption, evolutionary algorithms, energy-aware computing, performance measurements Date received: 24 October 2020; accepted: 2 September 2021 Introduction Energy efficiency has acquired a remarkable importance in the last decades for the scientific community, due to the growing need of information and communication technologies and therefore power-operated systems in society. 1 In recent years, attention has been paid on the management of the power consumption on the whole field of Information Technology (IT), from the circuit level—which includes microprocessors, network-based systems, hand-held devices, etc. Regarding microprocessors, the most successful technique, the Dynamic Voltage and Frequency Scaling (DVFS) is widely spread in available computer architectures. DVFS, initially aimed at single processors, saves energy by switching the processor’s frequency and voltage according to the workload needs. Relying on this technique, many algorithms have been developed, 2–4 also to minimize energy consumption of a real time parallel application with precedence-constrained tasks on a heterogeneous distributed system. 5 Multiple approaches have addressed the cache memory in order to save energy. Hu et al. 6 for instance, proposed a feedback mechanism to perform the data cache resizing. This Creative Commons CC BY: This article is distributed under the terms of the Creative Commons Attribution 4.0 License (https://creativecommons.org/licenses/by/4.0/) which permits any use, reproduction and distribution of the work without further permission provided the original work is attributed as specified on the SAGE and Open Access pages (https://us.sagepub.com/enus/nam/open-access-at-sage). 1 Computer architecture department, University of Extremadura, M´ erida, Spain 2 Department of Computer Architecture and Computer Technology, ETSIIT and CITIC, University of Granada, Granada, Spain 3 Computer and Telematics Systems Department, University of Extremadura, M´ erida, Spain 4 GEA group, University of Extremadura, M´ erida, Spain Corresponding author: Josefa D´ ıaz- ´ Alvarez, Computer architecture department, University of Extremadura, Santa Teresa Jornet, n o 38, M´ erida 06800, Spain. Email: [email protected]
approach blocks the low yields of cache resizing using the information of the cache footprint, improving the cache performance and saving 10% energy, compared with the cache without the feedback mechanism. Manohar et al. 7 presented a value-based refresh saving method for Mutilevel cache hierarchy with large sized last level caches (LLCs). The aim is minimizing the number of refreshes and save energy when embedded-DRAMs (eDRAM) are used as an alternative to SRAM. These techniques are directly applicable to different hardware components configuration. Nevertheless, power consumption can also be studied from the algorithm point of view, where optimizations can also be applied. Our approach is focused on this level, particularly the algorithms settings. If we focus on this area, we found several works that study algorithms considering energy consumption point of view. Mota et al. 8 tackled a comparative analysis, where commonly used symmetric and asymmetric encryption algorithms are analyzed using several metrics, including efficiency in terms of power consumption. Kong et al. 9 presented a routing protocol based on genetic algorithm to construct an energyaware middle layer oriented network. The schemes proposed consume less energy when compared to other methods, and they also extend the network lifetime. More recently, Rashid et al. measured in Ref. 10 the power consumption of several sorting algorithms. In that work, the algorithms were coded in different languages and were run on an ARM architecture and the key factors affecting energy consumption were identified. Same authors in Ref. 11 analyzed the power consumption of common image encoding and decoding algorithms such as JPEG and PNG on an ARM platform. They found JPEG consumes up to 37%more energy than PNG. As described above, a number of algorithms have already been analyzed from the point of view of power consumption. But in the case of EAs, this idea has only been presented in the literature very recently, and still needs development as Camacho et al. described in Ref. 12. Recently, Talbi et al. 13 proposed a unified view to guide the design and implementation of efficient and effective parallel evolutionary algorithms for multi-objective optimization, where the energy consumption of the MOEA itself is proposed to be considered as a metric. As we show below, few authors have ever considered that power consumption must be studied in the case of EAs, and the possible influence of the parameter values on the energy efficiency of the algorithm has never been studied. In this paper, we pursue that goal: to analyze the influence of population size on Genetic Programming (GP) power consumption. To the best of our knowledge, this is the first systematic study of such an issue. Thus, the main contribution of this paper is to show that energy consumption is not directly related to runtime for GP. Moreover, we show the relationship between population size and energy consumed, describe some anomalies detected and look for the reasons behind that behavior. Our results demonstrate the influence of the population size on the energy consumed: a non-linear relationship was found between size and energy required to complete an experiment. The extension of the study to the cache memory shows an exponential growth in the number of cache misses as the population size increases, which affects the energy consumed. Therefore, our study results contribute to confirm that not only computing time or solution quality must be analyzed, but also the energy required to find a solution. We thus hope this paper will pave the way towards energy efficiency of GP and EAs in the future. The rest of the paper is organized as follows: in Power Consumption and EAs we describe previous approaches in the area, the motivation for this analysis and the outlines of this study are presented. Methodology describes the methodology for the analysis and the benchmark problems selected. Results presents the results obtained, and finally Conclusion draws our conclusions and future work. Power consumption and EAs From a historic perspective, EA researchers have always considered the quality of solutions found and computing time required to find them as the most important metrics to evaluate the performance of the algorithm, while the energy consumption has usually been ignored. In regard of the computing time, it seems to be accepted that the relationship between the power consumption and runtime is linear, and the processor’s instantaneous energy consumption is constant, whatever the operation performed by the CPU. Thus, the power consumption could be easily calculated by multiplying the instantaneous consumption of energy, at any time during the experiment, by the total execution time. This assumption has probably kept researchers from considering energy consumption as something that deserves attention. But this is certainly not the case, as has already been shown when the power consumption is analyzed from the point of view of computer architectures. 14 Moreover, in a previous and preliminary research work, we detected some anomalies related to the parameter values employed when running the algorithm. 15 Although the relationship between power consumption and EAs is not new, the literature frequently describes works where the role of the EA is the standard one, an optimization method, and power consumption is simply the goal to be optimized in a given context. A proper review of this idea can be found in Refs. 16,17. In Ref. 18, for instance, researchers proposed a Genetic Algorithm (GA) to improve the warehouses energy management to minimize the impact on the environment and to reduce the associated costs. On the other hand, Liqat et al. developed in Ref. 19 a scheduling tool in charge of dividing a program into basic blocks; then an EA is applied to establish the maximum limit of energy for each block. Recently Ibrahim et al. 20 presented an adaptive GA to search the optimal scheduling solution to minimize the power consumption in a cloud computing infrastructure. A recent study 21 performed a systematic study of the energy complexity of several classic algorithms exploring the time/space/energy trade-off in order to reduce their energy complexity by applying Landauer’s principle. Similarly, as in the previous works, we share the quest for energy-efficient algorithms as the main goal. Nevertheless, some differences can be drawn. Our study is applied to GP, while above-mentioned work deals with several classical algorithms. We study some parameter values that affect the 2Measurement and Control 0(0)
algorithm behavior, while they focus on a lower level, particularly on word-level operations, and build pseudo-code for well-known and new programming structures, both in terms of control logic, memory allocation, garbage collection, logging, and unrolling operations. Therefore, our point of view is quite different since we focus on studying the optimal parameter values for EAs, particularly GP in this work, to achieve a trade-off between quality of solutions and energy consumption. Closer to our goals, Garc´ ıa-Mart´ ın et al. 22 presented a general literature review of different methods and power models to estimate power consumption in machine learning applications. Additionally, they presented the latest software tools available to estimate power consumption in this context. Some of the methods reviewed are applied in this work, as we describe below, although we also include additional measurement procedures, as we describe below. To the best of our knowledge, few research works deal with the problem of quantifying the energy required by evolutionary algorithms when tackling a real-world problem optimization. Closely related to that idea, Abdelhafez et al. 23 compared a sequential and a parallel genetic algorithm in terms of the power consumption. Regarding the parallel GA approach, authors analyzed both the synchronous and asynchronous version of the algorithm. They worked with a different number of cores and dimensions for several problems and focused on crossover and mutation operators. Lately, several works were presented related to this goal. Population and chromosome size were studied for the first time in Ref. 15, where the energy consumption patterns where analyzed using two well-known benchmarks of a simple GA. However, this analysis did not include GP. Power consumption in genetic programming The work presented here improves on some aspects of the previous work, allowing us to draw useful conclusions. First of all, the benchmark problems must be carefully selected, as described in Ref. 24. On the other hand, we should focus on the main parameters of the GP, and their influence on its energy footprint. Furthermore, this should be contextualized in relation to standard metrics, such as fitness quality and computation time. In terms of the benchmark issues to be tested, the GP community identified some issues over the last decade, 24 which were related to the quality of the traditionally employed GP benchmarks. In that work, the authors warned of the need to design a good benchmark suite. In this context, McDermott et al. 25 proposed a new set of GP benchmarks as better candidates for testing GP. With this in mind, we have selected two of them to work with, namely Lid and Order Tree. Lid is a GP benchmark, which can adjust its difficulty by changing maximum individual sizes and depths allowed. Order tree is a new GP benchmark that shares properties with other GP benchmarks and solves some shortcomings. The problem size and the linearity of the fitness structure can be increased and decreased, respectively, to tune the difficulty of the problem. In this paper, we focus on the population size and the rest of the alternatives will be addressed later. Based on the foregoing, in this paper, we consider the standard version of GP to be run on selected benchmark problems, and we decided to explore the influence of population size as one of its main parameters. The standard operations of the algorithm, fitness evaluation, selection, crossover, and mutation are repeated in each generation. But from the point of view of the CPU, running the algorithm, there are no major differences when CPU time is devoted to running the algorithm, although perhaps other issues may affect the energy consumed, such as cache memory operations, as we study below. In a previous work, we focused on a preliminary analysis of the algorithm, taking into account the hardware platform on which it can be run (see Ref. 26). As a result, a profile was generated for each platform that was then analyzed in Ref. 27. A preliminary study limited to the 6-bit multiplexer GP problem was conducted using small population sizes. Nevertheless, that work was aimed at studying the most energy-efficient platform, and the goal is now quite different. All in all, those results suggest that the idea is worth pursuing further. When we look at the number of generations and population size, as well as the running time of the algorithm, computing N+ 1 generations will take longer than N; evaluating a population size of I+ 1 individuals will take longer than I. In addition, a more complex fitness function needs more time to evaluate each individual and, consequently, the runtime grows. Similarly, a greater depth of the trees increases the difficulty of the problem and, consequently, the computing resources required. Therefore, the study of the influence of different parameter values is crucial for the analysis of energy consumption behavior. In this work, we consider two different perspectives to analyze the energy consumption behavior for each GP benchmark: (i) Running the algorithm for a given time without taking into account the quality of the solution found and (ii) Running the algorithm until a given quality solution or number of generations is reached. Both perspectives coincide with those proposed when considering real-world problems. We believe it is important to evaluate the influence of the main parameters on the energy required to run an EA, and to make decisions based on finding a compromise between solution quality, execution time and energy efficiency. In the following section, we describe the methodology applied to study the energy consumption of the GP. Three different computing platforms have been used and two different approaches have been applied to measure as accurately as possible the energy consumption. Our main goal here is to provide evidence on the importance of parameter selection if we want to achieve energy efficiency in the future for EAs; we also try to show that there is no linear relationship between computing time and energy consumption, and therefore studies like the one we present deserve attention. To the best of our knowledge, this is the first time this relationship has been studied with the precision described here. Methodology This work is based on the hypothesis that the main EA parameters not only influences computing time or quality of solutions, but they highly influence the total energy consumed by the algorithm when addressing a problem. D´ ıaz-´ Alvarez et al. 3
Moreover, previous work has shown that correlation between time and energy, that is assumed as a direct one, seems to be not so direct and deserves attention. Therefore, this study focuses particularly on this issue, specifically applied to GP. In this light, an appropriate selection of parameter values could further provide more energy-efficient algorithms. We have thus selected and studied the population size as one of the most influencing parameters and tackled the two GP benchmarks previously described: LID and ORDER Tree. The main objective is measuring accurately the energy consumption for a set of population size values and analyzing results obtained. Our experiments were carried out on three different computer platforms, which provide different computational resources. We consider that the use of multiple platforms allows the results to be extrapolated to any other hardware platforms. The first one was a Raspberry Pi 3 Model B+, 1 which is a Single-board computer equipped with a Quad Core 1.2GHz Broadcom BCM2837 64bit CPU 1GB RAM and connectivity with a BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board. The operating system was Raspbian 7. Raspberry Pi has been widely used as the target platform in many optimization process, some very recently. 28,29 The second platform was an ASUS Laptop with a processor Intel(R) Core(TM) i5-2450M 2.5 GHz, 4 cores and 8GB RAM and Ubuntu 14.04.1 LTS as the operating system. Finally, we also ran our experiments on a desktop personal computer (PC) provided with an Intel(R) Core TM i5-4430 processor, 3 GHz, 4 cores, 32GB RAM using as operating system Ubuntu 14.04.1 LTS. The reason for including the Raspberry Pi platform is due to previously published results describing it as the most energy-efficient platform for running an EA. 26 Once the target platforms were selected, we needed to choose the measurement system to quantify the energy consumption of the algorithm. We decided to use two different methodologies. On the one hand, we measured the power consumption on the Raspberry Pi and Laptop platforms with a professional digital power meter. On the other hand, we used a software tool for measuring the power consumption on the PC platform taking advantage of the specific registers of the CPU. This decision was taken as the PC is integrated into a rack at another research center, making it impossible to install the professional digital power meter to obtain the energy consumption data. The following elements composes the instrumentation tools used to measure the energy consumption: •A digital power meter, particularly the WT310E model from Yokogawa, 30 which is a power measurement instrument that can measure parameters such as voltage, current, and power at customized regular intervals (between 100ms to 20s), when running the algorithm on the target platforms, Laptop and Raspberry Pi in this case. Moreover, it provides of the WTViewer software application to save the samples taken in a complete log for further analysis and visualizing. •The APPPowerMeter 2 software application, which is a powerful tool for monitoring CPU power with Intel’s RAPL interface. 31–34 AppPowerMeter monitors an application and takes samples of the CPU every 100ms. Thus, it is able of measuring the total energy and average power of the CPU while an application is run. As previously mentioned, two well-known GP benchmark problems were chosen for this study: LID and ORDER Tree problems. The evolutionary engine ECJ 35,36 was used to carry out the experiments. All experiments used ECJ’s default values for evolutionary parameters. Particularly, probabilities of crossover and mutation equal to 0.9 and 0.1, respectively. The trees initialization method applied was ramped half-and-half. The number of generations is selected large enough to exceed 300 s and population size corresponds to the customized settings of each experiment. We must bear in mind that a run will finish always after a given number of generations is completed, or when the running time is longer that 300 s. Six different population size values were tested, 256, 512, 1024, 2048, 4096, and 8192. Once the specific parameters settings are established, the generational version of the algorithm is launched (30 independent runs for each population size). As a result, the average values are obtained. The setup establishes that each independent run will finish when exceeding 300 s (maximum time allowed per run), which may correspond to different number of generations computed, given variable individual size that GP features. In order to gather results and energy consumption data, a differentiation needs to be made between the experiments carried out on the PC platform, and those on the Laptop and Raspberry Pi platforms. Both collect evolutionary information from the evolutionary engine ECJ, which provides a log with evolutionary data such as the best fitness value for each generation. This log was enlarged to add the total system time to complete each generation. However, the measurement of the energy consumed is carried out of the tool, using two different approaches. When the PC platform is employed, we use the AppPowerMeter software, which receives as an argument the application to be executed and when finishing it returns the average total energy consumed, power, and time, obtained from the registers of the CPU via the Intel’s RAPL interface. The idea behind the use of different methods to monitor the energy consumption allows us to evaluate the reliability of the results. The energy consumed running the experiments on the Laptop and Raspberry Pi platforms is measured using the digital power meter and the WTViewer software application, which stores all samples taken during the algorithm run into a log file. This information is further processed for obtaining the energy consumed. Results obtained are summarized and analyzed in the following section. Results Three different experiment settings, detailed in the next subsections, have been designed, that are summarized as follows: •Experiment #1: Running experiments for 300 s, and analyzing energy consumption for every population size considered. •Experiment #2: Running experiments until solutions with a given fitness values are found. •Further Experiments: The conclusions reached in the previous stages led us to conduct further experiments that may shed light into results and behaviors found. 4Measurement and Control 0(0)
Experiments with time limit 300 s The initial experiment aims at evaluating all benchmark problems on hardware platforms and testing all population sizes selected. Thus, 30 independent runs were launched and each run was stopped when a given generation ends and the running time overpass 300 s, which is the maximum allowed time. Therefore, time monitoring is performed just after each generation is completed. Given that some runs will for sure exceed the limit of 300 s, two types of graphs are shown for this kind of experiment. •Figure type #1 consists of two graphs (a) and (b), where graph (a) represents the results obtained when exceeding 300 s after the completion of a generation, and graph (b) shows the results at the previous generation to exceed 300 s. Despite the fact that the study of the fitness value is not the objective for this experiment, it has been included on the graph to observe and analyze its behavior. The X axis represents the population size, Y-left axis is the fitness value and Y-right axis corresponds to the power consumption. We must bear in mind that the larger the population size, the longer the time to evaluate each generation. We consider this time limit to be enough for our purposes. •Figure type #2 also contains two graphs corresponding to the growth rate of energy consumption and runtime in the graph (a) until 300 s are exceeded, and the energy consumption in the graph (b) before 300 s are surpassed, both between consecutive population sizes. X axis represents the population sizes compared, while the Yaxis is the growth rate values. Raspberry Pi platform We focus first on the Raspberry Pi platform, where only five different population size values were tested, due to its limited hardware resources. The energy consumption was measured through the digital power meter Yokogawa WT310E. Results obtained for the LID problem are shown in Figure 1, which belongs to figure type #1. Regarding the fitness value, we can notice in both graphs included in the figure that in this experiment, with this time limit, the fitness value not only does not improve but also it gets worst when population size grows. This kind of behavior has already been shown in the literature, particularly in 2006 it was first described in Ref. 37: when a time limit is imposed a best population size exist to find the best possible solution in the allotted time. We focus next on our main goal, the energy consumption. In order to do so, the energy consumption in graph (a) is analyzed and then an interesting behavior is observed: the larger the population size, the longer the runtime. We must remember that the experiment can only finish when a generation is completed and the 300s time limit is surpassed. We can see in Figure 2 averaged fitness values and energy over 30 runs per population size: smaller population sizes produce short generations, and this influences shorter differences with the 300s time limit. Similarly, large populations require longer time per generation, and this means that the last generation after 300 s will be completed in a much longer time. Similarly, the larger the population size, the larger the energy required to complete the experiment, given that more time is required to complete the experiment. Yet, if we check Figure 2(a), we see that growth rate is not the same for running time as for power consumption. Moreover, some anomalies are found for some specific values (check the growth when comparing 1024 and 2048 for energy consumption). It can be observed that the growth rate when small population sizes are used, is similar for both the energy consumption and execution time, although the growth rate of energy consumption is always a bit higher (i.e., population sizes = 256 and 512). However, it shoots up from size 1024 to 2048, being 26% higher than the time increase rate and, although between 2048 and 4096 the growth rate is more similar, this represents a 6%more. On the other hand, Figure 2(b) represents the energy consumption at exactly 300 s. In this second experiment, we are measuring power consumption exactly at that time step, although it is not possible to catch fitness values at that point, given the way ECJ tool works, providing fitness values only after a generation is completed. Therefore, we include fitness values obtained in the last generation computed before 300 s are surpassed, so that we have an idea of the algorithm behavior. We notice that differences found when comparing population sizes at 300 s are narrow, although some anomaly appears when comparing 1024 and 512 population sizes. Even though the difference is small, the energy consumption is a bit lower for 1024 individuals. Again, growth rates are shown in Figure 2(b), where the anomaly for 512 and 1024 population sizes is clearly shown. Figure 1. LID problem on Raspberry Pi. Analyzing the power consumption for different population sizes. X axis represents the population sizes, Y-left axis is the average fitness values obtained in 30 runs; and Y-right axis corresponds to the average power consumption. Graph (a) represents results including the excess time (when 300 s are overpassed after a given generation completed), and graph (b) results at the 300 s. D´ ıaz-´ Alvarez et al. 5
This behavior could be seen at first sight as counterintuitive given that the CPU is working at any time regardless of the operation performed. In the next sections, we try to confirm the anomalies detected, and then describe further experiments that tries to study why this is so. We address now the ORDER Tree problem. Figure 3 (Type #1) is described in the same terms as the previous one for the LID problem. As in the case of the fitness value for LID, the fitness value does not improve when population size grows: the smaller the size, the larger the fitness value. Similarly, if we analyze the energy consumption and we put the spotlight on Figure 3(a), we observe how energy consumption is increased as the size of the population grows. Despite the fact that this increase is not constant and the highest increases happen in the changes of population sizes from 512 to 1024 and from 2048 to 4096, differences are now smaller when compared to those obtained for LID. The evolution at 300 s Figure 3(b) is similar for both runtime and energy consumption. As it can be noticed in Figure 4 (Type 2), the growth rates are again narrow, but again differences are found even when all the measures are taken after exactly 300 s. Results obtained in this specific experiment show significant variations in energy consumption across different Figure 2. LID problem on Raspberry Pi. Analyzing the growth rates of execution time versus power consumption for each population size. X axis represents the population sizes and, Y axis is the growth rate values. Figure 3. ORDER Tree problem on Raspberry Pi. Analyzing the power consumption for different population sizes. X axis represents the population size, Y-left axis is the fitness value and Y-right axis corresponds to the power consumption. Graph (a) represents results including the excess time, and graph (b) results at the 300 s. Figure 4. ORDER Tree problem on Raspberry Pi. Analyzing the growth rates of execution time versus power consumption for each population size in a Raspberry Pi. X axis represents the population sizes and, Y axis is the growth rate values. 6Measurement and Control 0(0)
population sizes, particularly for LID, and not so much for ORDER tree, at least in this hardware platform. This suggests that when addressing a real problem, power consumption should be a metric to be considered in the configuration of the algorithm’s parameters, although the problem itself induce differences in the energy required. In any case, as the Raspberry Pi platform has limited hardware resources, more experiments on two additionally hardware platforms have been performed as described below, trying to confirm that the relationship between runtime and energy consumed is not linear, and that differences are influenced by parameter values selected for the algorithm. x86 architecture. Once Raspberry Pi -ARM architecture— has been analyzed, we decided to repeat the experiments using the widespread x86 architecture. In this case, a Laptop and a PC have been considered. Moreover, given the availability of internal equipment to measure energy consumption, we have also employed this one together with the previous approach, as described in Methodology. We begin this analysis using the laptop and still using the digital power meter Yokogawa WT310E for measuring the energy consumption. With higher capacity in computing resources than a Raspberry Pi, we included the population size 8192 as a value to be analyzed in this experiment. Figure 5 (Type #1) shows results obtained for LID.Ifwe analyze both graphs (a) and (b), we observe a growing general trend similar to the one observed in previous experiments: the larger the population size, the higher the energy consumption. However, an exception appears with population size 256. Actually, the energy required to run a population size of 512 is 8.36%smaller than that of 256. We may notice that the total energy required for 256, is larger than the values for 512, 1024, and 2048. Therefore, although fitness value obtained using 256 individuals is slightly better, the larger energy consumption required, clearly shows for the first time, that specific values for population size are sometimes better when the goal is energy savings. This is quite an interesting behavior, given that it deviates from what we expected: the larger the population size, the higher energy consumption when we wait until a generation finished after more than 300 s. In any case, the most interesting result is shown in (b) graph: even when exactly 300 s have elapsed for each of the experiments, the 512 seems to be the population size tested that requires the smallest energy to reach that time step. Figure 6 (Type #2) shows the respective growth rates between consecutive population sizes for LIDs on the laptop. We may notice that the highest growth rates appear when changing from 512 to 1024, 2048 to 4096, and 4096 to 8192, with 5.4%, 5.39%, and 5.87%percentages, respectively. These values are far from the growth rates for runtime 0.14%, 0.65%, and 1.23%, respectively. Although in most of the results shown when increasing runtime, the energy consumption also increases, the intensity with which it increases Figure 5. LID problem on Laptop. Analyzing the power consumption for different population sizes on a laptop platform. X axis represents the population size, Y-left axis is the fitness value and Y-right axis corresponds to the power consumption. Graph (a) represents results including the excess time, and graph (b) results at the 300 s. Figure 6. LID problem on Laptop. Analyzing the growth rates of execution time versus power consumption for each population size on a laptop platform. X axis represents the population sizes and, Y axis is the growth rate values. D´ ıaz-´ Alvarez et al. 7
is not the same. There is not a perfect linear correlation. Could the reason behind this behavior be due to additional hardware or software resources, beyond the cpu, required for larger population sizes? As we will show below, this question requires further analysis. In similar terms, the results for ORDER, plotted in Figures 7and 8, are analyzed and shown. The highest increase occurs from 1024 to 2048 with 8.32%and more sustained among the next consecutive population sizes. As it happens to LID, the time increase is lower than the energy consumption increasing with 0.58%as the highest percentage reached between 4096 and 8192, which confirm the trend shown before for the laptop. So, these differences need further research. Therefore, in the next section, we analyze a second x86 endowed device, and we apply energy measurement using a second method. x86 & AppPowerMeter. In this case, a more powerful platform has been used to perform the experiments. As we previously mentioned, the measurements on this platform were taken through the AppPowerMeter software, which provides values for the energy consumed, the average power and the total Figure 7. ORDER Tree problem on Laptop. Analyzing the power consumption for different population sizes on a laptop. X axis represents the population size, Y-left axis is the fitness value and Y-right axis corresponds to the power consumption. Graph (a) represents results including the excess time, and graph (b) results at the 300 s. Figure 8. ORDER Tree problem on Laptop. Analyzing the growth rates of execution time versus power consumption for each population size on a laptop. X axis represents the population sizes and, Y axis is the growth rate values. Figure 9. Analyzing the power consumption for different population sizes on PC platform. X axis represents the population size, Y-left axis is the fitness value and Y-right axis corresponds to the power consumption. Graph (a) represents results for LID problem and graph (b) results for ORDER Tree. 8Measurement and Control 0(0)
time. Figure 9 shows the average values for both the energy consumption and fitness values. The graphs (a) correspond to results for LID and graph (b) for ORDER Tree. Regarding the fitness value, the trend is identical to the previous ones for Raspberry Pi and Laptop platforms. At the time established as limit, a degradation is produced on the fitness value. The behavior observed in relation to the energy consumption is also the same as that seen in the previous platforms and closer to the laptop for obvious reasons, in terms of the capacity of computing resources. On average, the amount of energy consumed on the laptop is higher than on the PC. Figure 10(a) and (b) presents the growth rates of energy consumption and runtime, between consecutive population sizes for LID and ORDER Tree, respectively. The more relevant are differences when large population sizes are employed: For both benchmark problems, the time increase between consecutive population sizes never reaches 1%. However, the growth rate of energy consumption for larger population sizes exceeds 10%in all cases. In case of LID peaks at 12.28%and 12.96%, when changing from 1024 to 2048 and 2048 to 4096, respectively. With respect to ORDER Tree, a peak of 17.31%is registered when moving from 2048 to 4096. On the other hand, the energy increase we found when doubling population size from 4096 to 8192 is just around 10%. And comparatively, energy increase when doubling population size is never the double. In any case, this confirms that the energy consumption is affected by parameters configuration, particularly in our case, by the population size. The main conclusion is that energy consumed when running GP for 300 s varies influenced by population sizes, with some anomalies that show specific values as the best ones to reduce power consumption. Given that traditionally population sizes are chosen to optimize the fitness, this result shows that a new perspective should be considered: both measures should be taken into account when looking for an efficient way of finding solutions. We are aware of differences found in each of the hardware platforms, that are due to different number of generations computed per experiment in each case, given hardware differences. Table 1 presents the evolution of fitness values and number of generations computed for each device. For each problem and population size, the average number of generations is also shown. As we see, large differences are found among platforms tested. Yet, all of them have shown a common trend regarding energy consumption: energy required depends on populations size employed. As we had previously seen, every hardware platform features some differences that affect power consumption: memory hierarchy, particularly cache sizes and levels, number of cores available, processor frequency, etc. Given that population size is related to memory consumption, processor frequency determines the time required to compute Figure 10. Analyzing the growth rates of execution time versus power consumption for each population size on PC platform. X axis represents the population sizes and, Y axis is the growth rate values. Graph (a) corresponds to LID and (b) to ORDER Tree. Table 1. Summary of the average fitness values for each population size and both Lid and ORDER Tree problems. Fv corresponds to the fitness value and Ge represents the average number of generations. Evolution in fitness value for experiments with time limit 300 s. Raspberry Pi Laptop PC Pop. Size Lid ORDER Lid ORDER Lid ORDER Fv Ge Fv Ge Fv Ge Fv Ge Fv Ge Fv Ge 256 50.08 52.67 229.27 124.50 58.33 8708.53 579.07 4883.93 48.56 7499.70 709.47 4953.80 512 47.96 30.70 201.67 81.27 55.57 4041.83 793.73 2137.43 55.57 4861.40 694.63 2519.60 1024 40.57 18.33 179.30 53.13 53.23 1794.37 909.40 912.60 53.25 2195.33 902.47 1339.83 2048 30.55 13.00 129.53 35.57 55.57 936.27 756.73 442.23 53.23 1076.53 959.47 701.50 4096 29.85 10.80 103.23 24.30 41.59 230.63 627.47 276.70 41.54 312.77 802.13 387.10 8192 - - - - 36.87 65.90 493.63 155.73 41.54 151.30 609.10 211.30 D´ ıaz-´ Alvarez et al. 9