1. Introduction
The rising environmental and financial costs of large-scale computing [
1] necessitate energy-efficient system design. This research investigates how hardware and software optimisations affect energy efficiency in cluster computing. The goal is to demonstrate that integrating energy-aware strategies at both levels can enhance performance while reducing energy consumption.
Higher-level languages offer improved usability; however, they often introduce resource overhead compared to lower-level languages [
2]. Similarly, the performance gains obtained through parallelisation may improve energy efficiency by reducing execution time but can also increase total energy consumption if additional power draw is not offset. Additionally, algorithmic improvements in software design can enhance energy efficiency. For instance, reducing the complexity of a program from
to a lower order reduces unnecessary computation, thereby conserving energy [
3].
From a hardware perspective, strategies such as cooling, clock-speed adjustment, and alternative hardware architectures may contribute to energy savings [
4]. Cooling components like the CPU and GPU help prevent thermal throttling, thereby maintaining higher performance and utilisation. However, this can also lead to increased overall energy consumption, as the system operates more efficiently and performs more computations per second, unlike throttled components, which consume less energy as a consequence of reduced computational activity. Adjusting the clock speed of computing components directly affects the rate at which computations are performed. While increasing the clock speed typically leads to higher power draw, it can also reduce overall energy consumption if the performance gain significantly shortens execution time. Conversely, underclocking may lower power draw but prolong computation, potentially increasing the total energy consumed. Additionally, as novel computing paradigms continue to evolve, system architectures may increasingly shift away from traditional models toward designs that prioritise energy efficiency, such as heterogeneous systems or domain-specific accelerators.
This study introduces a generalizable set of measurement approaches and metrics that can be used to show the trade-off between power usage and system performance and bridge the gap between software optimisations and hardware configurations—areas often studied separately. A validation experiment was performed to show how these measurements can be used on a custom Raspberry Pi cluster, demonstrating how energy consumption differs depending on the choice of language, the efficiency of the algorithm, parallelisation strategies and implementations, cooling, underclocking, overclocking, and on-demand computing.
The setup consists of three Raspberry Pis running Raspbian Lite, networked via a switch and monitored by an Arduino Uno with an SCT-013 current sensor. A fourth Pi acts as coordinator and energy logger, with workloads (e.g., Monte Carlo Pi) executed using MPI and OMP in Python and C to evaluate energy efficiency.
To calculate continuous energy (the running draw of energy), the following equation can be applied:
To calculate the total energy consumption of a software workload, continuous power readings are taken throughout its execution. Since power consumption can fluctuate based on workload intensity, a weighted average of these readings is computed, then multiplied by the total runtime to estimate energy usage. In this study, workloads varied from a few seconds to several minutes in duration, with some extending to over an hour. As such, energy is expressed in Watt hours (Wh):
To evaluate the impact of different strategies on energy consumption, it is first essential to define what is meant by energy efficiency in this context. Here, energy efficiency refers to the ability to complete a fixed set of computations while limiting the total amount of energy used.
This notion of efficiency can be formalised using the metric of the Energy Factor (
), which quantifies the relative change in energy consumption when applying a new strategy compared to a baseline. An
greater than 1 indicates improved efficiency, whereas an
less than 1 implies greater energy use for the same output.
To complement this, Speedup is used to measure the improvement in execution time:
Again, a value above 1 indicates a faster execution, while a value below 1 indicates a slowdown. In both metrics, the desired outcome is for the new configuration to use less time or energy, resulting in a score greater than 1.
A simple combined metric could be a direct division of
and Speedup:
However, this approach may be overly influenced by extreme values in either energy or performance. To address this, a geometric mean is used—a simple approach to reduce the impact of extreme outliers as seen in real-world experimentation, resulting in a more balanced metric called the Efficiency–Performance Score (
):
This formulation ensures that both energy efficiency and performance contribute equally to the final score, preventing one from disproportionately dominating the result.
It is anticipated that results will highlight the interdependency of software and hardware optimisations, revealing that neither approach alone can fully address energy inefficiency. Instead, a combined strategy is expected to yield significant reductions in energy consumption without compromising performance. Moreover, applying both software optimisations (e.g., parallelisation and algorithmic refinement) and hardware strategies (e.g., overclocking and cooling) may reveal a positive correlation between energy efficiency and performance.
2. Literature Review
This literature review covers key aspects of green computing, including its principles and importance. It examines the environmental and financial impacts of computing, highlights hardware and infrastructural strategies to reduce energy consumption, and explores software-level optimisations for energy efficiency in cluster computing. In addition to this, few studies have directly compared software and hardware optimisations working in tandem, and there are gaps in the existing literature, as will be made clear, as well as proposed approaches for addressing these gaps.
2.1. Green Computing
Green computing focuses on designing and optimising computer systems, networks, and software to maximise energy efficiency and reduce environmental impact [
5]. Notably, none of the top 10 systems on the recent GREEN500 list appears in the TOP500 list’s top 10 [
6].
Why does green computing matter? Environmental impacts arise throughout the computing life cycle, from resource extraction and hardware manufacturing to energy consumption during operation. The HPC sector alone consumes approximately 5.2 TWh of energy annually, which is equivalent to a 600 MW load [
4]. According to a 2023 UK government report, the carbon intensity of electricity was 0.225 kgCO2e/kWh [
7], meaning that, potentially, HPC systems contribute around 1.17 million metric tonnes of CO
2 yearly, corresponding to about 0.003% of the global total of 37.4 billion tonnes [
8]. However, this figure does not take into account the number of organisations that use sustainable methods to power their HPC centres; for example, Google, Facebook and Microsoft claim to have renewable energy consumption levels of 100%, 50% and 50% respectively [
9]. In addition to the companies mentioned above, Amazon also claims to use 100% renewable energy [
10]. Meanwhile, the trend of countries, as a whole, moving towards renewables continues; in 2019, China, Germany, and the USA used 22%, 40% and 17% renewable energy [
11]. Strubell et al. they claim that a more accurate way of measuring CO
2 would be to take this into account, resulting in a measurement of CO
2 = 0.477 pounds per kWh, which would result in a figure closer to 0.22 million metric tonnes yearly. However, this estimation is based on limited publicly available data from companies, which may lead to a difference in the actual figures. There is a gap in research into more accurate measurements for the amount of carbon emissions from electricity used in computing, which is understandable due to the dynamic nature of energy production. This lack of transparency complicates accurate assessment of carbon emissions associated with computing workloads.
The broader computing industry also has a significant environmental footprint. In 2022, global data centres consumed an estimated 240–340 TWh of electricity, representing about 1–1.3% of global final electricity demand [
1]. This figure excludes cryptocurrency mining, which added approximately 110 TWh, accounting for 0.4% of global electricity consumption. Combined, a potential 101.25 million metric tonnes of CO
2 are produced, representing nearly 0.3% of global CO
2 production. Despite efficiency improvements, rising workloads in large data centres have driven a 20–40% annual increase in energy use in recent years [
1]. There will also be a further rise in the energy usage of large computation centres with the evolution of LLMs, given that the energy used to train these models, then used to allow for requests to be sent to these models, is increasing. The models introduced by OpenAI began with 117 million parameters in 2018, while the latest model has more than a trillion parameters. The previous model, GPT-3, was estimated to require 1287 MWh, and in January 2023, the energy consumption of ChatGPT was projected to be over 1500 MWh [
12]. These energy costs will only rise with the training of new models and the necessity for more hardware—specifically, GPUs. In addition to this, more organisations are looking at developing their own models for their specific use cases, which will require specialised training per model. The costs of training LLMs and the further costs of hosting and exploiting these new technologies are becoming difficult to determine; as industry attempts to shore up competitive moats and restrict information regarding their underlying LLM technologies, these details can become less reliable and available [
13].
Beyond environmental concerns, financial costs are significant. Rising energy prices increase the need for either more funding or improved efficiency. While it is difficult to obtain an average statistic for the cost of energy worldwide, an average may be calculated by examining the statistics provided by different organisations. The EU provides an average non-household consumer cost of
$0.21 per kWh for the first half of 2024 [
14]. The US Bureau of Labor provides an average of
$0.179 [
15]. Meanwhile, in China, the average cost for businesses is
$0.87 [
16]. This results in an average of
$0.42 per kWh. While this method of calculating the energy costs of computing is not ideal, it provides a useful statistic. The annual energy expense for HPC systems totals approximately £1.664 billion, while the cost for the wider community, including the costs for crypto mining, could reach £144 billion.
2.2. Physical Strategies for Reducing Energy Consumption
There are many physical and hardware strategies for reducing energy consumption. Using liquid cooling systems to reduce heat and save on cooling costs is one measure. For example, Microsoft’s experiment with immersion cooling at its data centres resulted in a 90% reduction in cooling energy consumption, illustrating the potential of this technology. Furthermore, the transition to green refrigerants, like ammonia or CO
2, highlights a conscious effort to reduce the ecological impact of cooling systems [
4].
Another promising approach is hardware-enforced power bounding, as discussed in “Beyond DVFS: A First Look at Performance Under a Hardware-Enforced Power Bound” [
17]. This technique involves dynamically limiting processor power consumption through mechanisms such as Intel’s Running Average Power Limit (RAPL). By setting power limits, the hardware adjusts CPU performance to remain within the specified power budget, enabling predictable energy use. However, this can cause performance variation due to differences in processor efficiency. Additionally, power clamping emerges as a powerful alternative to traditional DVFS, offering more precise energy management by directly limiting the power a processor can draw during operation. This approach can be dynamically adjusted based on workload demands, thereby ensuring system stability while controlling energy consumption [
17]. This is an important consideration as the CPU accounts for over a third of power consumption as shown in
Figure 1 [
18].
In FPGA-based systems, combining undervolting and overclocking can improve energy efficiency by reducing static and dynamic power consumption while enhancing performance, as shown in [
19]. However, this approach risks bit-level faults in critical components like on-chip memory and data paths, requiring robust error correction and hardware design. Moreover, this is a specific use case when most HPC clusters do not feature FPGA devices, and the paper [
19] does not consider the impact of following the above on traditional computing systems.
Fine-grained tuning of supply voltages and clock speeds can cut power usage by up to 60% while keeping error rates manageable. Adaptive power management further optimises performance in real-time applications. Similar energy-saving techniques have also been applied to modern HPC processors, achieving significant gains with minimal tuning effort [
20].
Another strategy for saving energy is to suspend or power down idle components or nodes using techniques such as sleep modes, Wake on LAN (WoL), or hibernation. As noted in [
21], “Since the WoL technology is common in modern PCs, employing EnergySave in networks of PCs can represent a cheap solution that can bring high savings under the energy (kWh), economic (€), and greenhouse gases (tons of CO
2)”. More advanced approaches include Intel’s Demand-Based Switching, which dynamically scales down CPU clock speeds or powers off idle chip regions to reduce power consumption [
22].
Incorporating heterogeneous architectures, such as GPUs and other accelerators, alongside traditional CPUs has been shown to enhance energy efficiency in HPC environments. GPUs, designed for parallel processing, offer significant energy savings over CPUs, particularly in applications that benefit from massive parallelism. Studies have demonstrated that for simple computational tasks, GPUs can reduce energy consumption by a factor of 1.1 to 3.2 times compared to CPUs [
23]. As the complexity of tasks increases, FPGAs outperform both CPUs and GPUs, achieving energy reduction ratios of 1.2 to 22.3 times for complex vision pipelines [
23]. However, these figures come from a study focused on the specific use case of computer vision.
In contrast, CPU-only solutions, while versatile, often consume more energy due to their sequential processing nature, which is often less energy-efficient for workloads that benefit from parallel execution. A holistic approach, like the GreenGPU framework, has been proposed to optimize energy efficiency by dynamically splitting workloads between GPUs and CPUs and by adjusting the frequencies of both components based on their utilization. This method has been shown to achieve up to 21.04% energy savings [
24]. By utilising the strengths of each hardware type—GPUs for high-throughput parallel tasks and CPUs for more sequential tasks—heterogeneous architectures can significantly reduce energy consumption without compromising performance. Therefore, integrating GPUs and other accelerators into HPC systems represents a promising direction for achieving green computing goals while maintaining computational power.
2.3. Software Strategies for Reducing Energy Consumption
Software optimisation, coupled with hardware enhancements, is essential. Effective algorithms, particularly in fields such as deep learning, demonstrate the ability to diminish energy usage considerably. Code optimisation can prompt reductions in computation time and, thus, lower energy consumption. Studies have indicated that software-level enhancements may reduce energy consumption by up to 50%, highlighting the latent potential in this area [
4]. However, it is important to note that these indications focus on their own software and will vary depending on the software and system in question.
The simple rule that Energy = Power × Time suggests two general ways to save energy: (1) faster speed, given a constant power, and (2) lower power without increasing runtime [
25]. This would lead to the belief that in all situations, the processing time can be decreased by increasing performance. However, improving performance and efficiently managing power may conflict with each other because faster speeds frequently result from the use of more resources less efficiently, which may excessively increase power consumption [
25].
One software strategy for reducing energy consumption is to use less accurate data types that incur lower resource costs so that the accuracy of data can be sacrificed slightly for improved energy efficiency [
26]. Through porting applications such as Monte Carlo Pi to use approximations of nearly all floating-point operations, gains of up to 15% in energy efficiency have been achieved. However, the paper [
26] failed to give an example of software for which reducing the accuracy of data may have a larger impact on the correctness of the output, so this should be a consideration in any development plan.
Virtualisation is an effective strategy for partitioning hardware resources, enabling multiple services to run within virtual machines (VMs) on a single physical system. This consolidation increases overall energy efficiency by reducing the need for additional hardware. As multiple VMs share the same hardware, utilisation improves, and energy demands decrease, particularly for cooling, since fewer physical machines are required to deliver the same functionality [
22].
At the organisational level, scheduling plays a crucial role in improving the energy efficiency of data centres. Liu et al. explored this by designing an energy-aware scheduler for data-grid systems that support both real-time and data-intensive applications. Their approach considers both the physical location of data and the characteristics of the applications to optimise scheduling decisions. The proposed distributed scheduler integrates task scheduling with data placement strategies to minimise energy usage. Significant energy savings are achieved by reducing unnecessary data replication and limiting task migration across nodes [
22,
27].
2.4. Energy Measurement and Metrics in Computing
A substantial body of work exists on the measurement and modelling of energy efficiency in computing systems, particularly within high-performance computing (HPC) and data centre contexts. Early work by Hennessy and Patterson [
28] formalised the relationship between performance and power through the well-known identity expressed as
, highlighting the inherent trade-off between execution speed and energy consumption.
Energy efficiency metrics such as performance per watt have been widely adopted, particularly in benchmarking initiatives such as the Green500 list [
29], which ranks supercomputers based on FLOPs per watt. While useful at system scale, such aggregate metrics often obscure workload-specific behaviour and do not capture the interaction between software and hardware optimisation strategies.
More granular approaches have been proposed through power modelling and measurement frameworks. For example, the use of hardware counters and interfaces such as Intel’s Running Average Power Limit (RAPL) enables fine-grained energy measurement at the CPU and memory levels [
30]. Similarly, tools such as PowerPack [
31] and JouleMeter [
32] provide software-based estimation of energy consumption across distributed systems and virtualised environments.
At the application level, several studies have explored energy-delay metrics to capture the trade-off between performance and energy. The Energy-Delay Product (EDP) and Energy-Delay
2 Product (ED
2P) are commonly used composite metrics that penalise both high energy consumption and long execution times [
33]. These metrics are particularly relevant when evaluating optimisation strategies where improvements in runtime may come at the cost of increased instantaneous power draw.
In parallel computing, analogous concepts measuring the trade-off of speed against resources to measure “efficiency” exist in the form of speedup and parallel efficiency. Speedup, defined as the ratio of serial to parallel execution time, and efficiency, defined as speedup divided by the number of processors, provide insight into how effectively computational resources are utilised [
34].
Despite these advances, there remains a lack of generalisable, workload-agnostic metrics that simultaneously capture energy consumption and performance in a balanced manner. Existing approaches either focus on system-level benchmarking (e.g., FLOPS/W) or introduce composite metrics (e.g., EDP) that may disproportionately weight one dimension. This gap motivates the development of alternative formulations, such as the Energy Factor (EF) and the Efficiency–Performance Score (EPS) proposed in this work, which aim to provide a more interpretable, straightforward, and balanced representation of the energy–performance trade-off that can be applied across heterogeneous optimisation strategies.
2.5. Gaps in the Existing Literature and How This Approach Differs
Despite the depth of research into hardware and software energy-saving techniques, a key gap lies in the lack of empirical studies that examine both in tandem. Most literature treats hardware and software strategies independently, leaving open questions about their combined effects or synergies. Additionally, industry confidentiality often limits access to accurate data on real-world energy consumption and optimisation effectiveness, further complicating cross-layer comparisons. However, it should be considered that this lack of an overarching review may be due to the uniqueness of energy efficiency in individual projects; a problem that is embarrassingly parallelisable may lead to more energy savings than one that requires more sequential operations, for example. In contrast, this review lays the groundwork for an experimental evaluation of cross-layer strategies using a Raspberry Pi cluster, a novel test bed that facilitates real-time measurement and control of both software and hardware parameters.
3. Technical Approach
This section outlines the methodology used to investigate energy efficiency within a small-scale cluster computing environment. The goal is to quantify how software and hardware optimisations affect energy usage and performance using controlled, repeatable experiments.
3.1. Investigating the Problem
As high-performance computing continues to scale, energy consumption has emerged as a critical bottleneck, not just in terms of cost but also in terms of environmental impact. Measuring energy efficiency is no longer optional; it is a necessary step toward sustainable system design. This project seeks to investigate how and why different decisions in software and hardware affect energy usage and whether gains in performance come at the cost of higher power draw. For the purposes of this work, energy efficiency in computing is defined as the change in total energy consumption required completing the same computational workload.
While Raspberry Pis are not directly representative of industrial HPC clusters, they allow for cost-effective, scalable experimentation and are particularly suitable for investigating trends related to parallelisation, energy consumption, and thermal effects. Limitations such as Amdahl’s Law and thermal throttling are considered when interpreting results.
3.2. Assumptions and Experimental Constraints
The voltage supply to the cluster is assumed to be stable at 230 V throughout testing. All tests are conducted with identical operating system images; system load at boot time is minimised, and no background services are allowed to run during workloads. Within the work, we distinguish between compute/node energy, which is measured, and total system-level energy, for example, including cooling, which we do not measure.
The Arduino-based current sensor setup introduces minor latency between sampling and logging, which may slightly affect precision for extremely short workloads. However, due to the averaging of current over longer intervals, the overall effect is expected to be negligible.
In order to ensure a fair and consistent measurement of energy usage, baseline power values were established for the Raspberry Pi cluster at various operational stages. At idle, each Raspberry Pi was observed to draw approximately 3.27 W ± 10%, resulting in a combined idle consumption of around 9.81 W ± 10% for the three-node cluster. These values were calculated using current readings obtained from the SCT-013 current sensor and Arduino setup and confirmed by the Tapo smart plug.
In contrast, when all four CPU cores were fully utilised on each of the three Raspberry Pis (using CPU stress tests), the total power draw increased significantly, ranging between 16 and 18 W. This value represents the system under sustained computational load and serves as the upper bound for evaluating the energy efficiency of software workloads under test conditions.
3.3. Measuring Energy Usage
Quantifying energy usage is essential for evaluating the impact of different software and hardware strategies. In this project, energy consumption is calculated based on electrical power, derived from the product of current and voltage, as shown in Equation (
1). The power metric is then combined with execution time (Equation (
2)) to determine total energy consumed. For the scale of experiments conducted on the Raspberry Pi cluster, energy usage is most commonly reported in watt hours.
To measure current in real time, a YDHT SCT-013 non-invasive current sensor manufactured by Beijing YaoHuadechang Electronic Co., Ltd. in Beijing, China, is used in conjunction with an Arduino Uno. The sensor clamps onto the live wire of the Raspberry Pi cluster’s power strip and outputs analogue current readings to the Arduino, which are then streamed via serial connection to a coordinating Raspberry Pi node. The accuracy of the SCT-013 sensor was validated by comparing its readings with those from a Tapo smart plug and validated against the expected demand from the hardware specification. The close alignment of values across idle and workload states supports the reliability of the chosen measurement setup.
This measurement pipeline is tightly integrated with a custom job-runner script that automates workload execution and synchronises energy logging. When a job is submitted, the script initiates the energy monitoring process, executes the selected workload (e.g., Monte Carlo Pi), records the runtime, and logs corresponding power readings. These logs are then parsed to compute the average power, total energy consumed, and efficiency metrics such as the Energy Factor (EF) and Efficiency–Performance Score (EPS). This integration enables consistent, low-overhead experimentation and ensures accurate energy tracking across test scenarios.
3.4. Hardware
The experimental setup consists of a Raspberry Pi “bramble” cluster composed of three compute nodes and one coordinator node. Each Raspberry Pi is connected via Ethernet through a central switch to facilitate low-latency communication and synchronised workload distribution. The coordinator Pi also handles energy measurement and logging from the Arduino-based current sensor system. A visual schematic of the cluster setup is shown in
Figure 2.
To investigate thermal effects on performance and energy usage, an external cooling fan is used during selected runs. While the Raspberry Pi does not have active cooling by default, under high computational load, the CPU is prone to thermal throttling, which reduces clock frequency and, in turn, performance. Cooling mitigates this throttling, potentially improving runtime but at the cost of additional energy as the nodes are able to perform more computation.
Clock speed is another key hardware variable explored in this study. Underclocking reduces the maximum frequency of the CPU, which theoretically lowers power draw but may lead to longer execution times that negate energy savings. Conversely, overclocking increases performance, potentially reducing runtime and total energy used, provided the increase in power is offset by the decrease in time. However, overclocking may also increase thermal output, leading to throttling or instability if not properly managed. Moreover, as will be encountered later, there are also stability issues when changing the clock speed of components. The Raspberry Pi 3B+ that was employed in this setup has a recommended clock speed of 1.4 GHz, and through testing, operating at 1.6 GHz resulted in system instability on multiple nodes. Therefore, a minimum clock speed of 0.6 GHz to 1.5 GHz was tested.
Another tested strategy is “on-demand computing“, where idle nodes are powered off when not participating in a computation. In principle, this reduces idle energy draw, but in practice, it introduces challenges in coordination, system responsiveness, and reinitialisation time. Additionally, the energy cost of restarting or reconfiguring nodes may outweigh savings from temporary shutdowns in short workloads.
Although Raspberry Pis are not directly comparable to industrial HPC hardware in terms of performance, memory, or thermal management, they provide a scalable and accessible platform for prototyping and controlled experimentation. The insights gained, while not directly transferable in magnitude, are valuable in understanding trends in energy–performance trade-offs and can inform energy-aware practices in larger, more powerful cluster systems.
3.5. Software
Each Raspberry Pi in the cluster runs Raspbian OS Lite, a lightweight Debian-based distribution optimised for performance and minimal overhead. This ensures that background processes do not distort energy measurements. Communication between nodes is handled via Secure Shell (SSH), while distributed workloads are executed using the Message Passing Interface (MPI). For shared-memory parallelism within individual nodes, OpenMP is employed.
The role of software design in energy efficiency is central to this research. Optimisation can occur at several levels—algorithmic (e.g., reducing computational complexity), architectural (e.g., multithreading and workload distribution), and linguistic (e.g., using low-level languages with minimal runtime overhead). To explore these dimensions, all workloads are implemented in both Python and C. While Python offers ease of development and high readability, it introduces significant overhead due to its interpreted nature. In contrast, C provides lower-level memory and execution control, often resulting in faster runtimes and reduced energy consumption.
The Monte Carlo Pi algorithm estimates by generating random points within a square and counting how many fall inside a quarter circle. It is used as the primary benchmark for parallel performance due to its embarrassingly parallel nature. The algorithm scales well across cores and nodes, requiring minimal communication overhead.
To complement this, the recursive Fibonacci algorithm, which computes each term as the sum of the two preceding terms, is used to represent more sequential workloads. Comparing it with Monte Carlo Pi enables an evaluation of how workload parallelisation influences energy efficiency under different configurations.
Graph traversal algorithms, including Breadth-First Search (BFS), which explores nodes level by level; Depth-First Search (DFS), which explores as deep as possible before backtracking; and Dijkstra’s algorithm, which finds the shortest paths from a source node to all others in a weighted graph, are also included. These reflect real-world data-centre workloads such as Web crawling, social network analysis, and routing. Their performance is assessed in both sequential and parallel contexts.
Finally, sorting algorithms such as Bubble Sort, Merge Sort, and Quick Sort are applied to identical randomised arrays. These allow for direct comparisons of energy consumption across different computational complexities. By observing the relationship between input size, algorithmic efficiency (Big-O notation), and actual energy usage, the study reveals how theoretical complexity translates into real-world power consumption.
The variation in algorithmic complexity is visualised in
Figure 3.
4. Results and Analysis
4.1. Results
4.1.1. Impact of Language
Language choice plays a significant role in the energy efficiency of software. In this project, the same Monte Carlo Pi approximation algorithm was implemented in both Python 3.9 and C (using gcc 15.2) to assess the effect of language-level optimisation on execution time and energy usage. Python, while easy to develop and maintain, is an interpreted language and introduces considerable overhead due to its runtime environment. C, on the other hand, is compiled to native machine code and provides lower-level memory and execution control, resulting in faster runtimes and reduced energy consumption.
This result highlights that, even for compute-light workloads, compiled languages like C can provide significant energy savings. Over repeated runs or at scale, the efficiency gap between high-level and low-level languages becomes environmentally and financially significant. The results are shown in
Table 1 and
Table 2 and
Figure 4 and
Figure 5.
4.1.2. Impact of Parallelisation
To investigate the role of parallelisation in energy efficiency, two distinct workloads were compared: a non-parallelisable recursive Fibonacci sequence and an embarrassingly parallel Monte Carlo Pi approximation. As the two scripts differ in computational length, their input values were tuned such that the execution time on a single core was approximately the same, providing a fair baseline for comparison. Specifically, fib (1,000,000) took 34.01 s, while a Monte Carlo Pi approximation with 175 million points took 35.69 s on a single core. Once a baseline was established, both workloads were executed across 1 to 12 cores, measuring total time; energy consumed; and derived metrics such as EF, EPS, and parallel efficiency. The results in
Table 3 and
Figure 6 and
Figure 7 clearly show that Monte Carlo Pi benefits significantly from parallelisation. At 12 cores, it achieved a 5.43× speedup and a peak EPS of 1.71, indicating that parallel execution not only reduced runtime but also led to higher energy savings. In contrast, as shown in
Table 4 Fibonacci achieved diminishing returns as cores increased, speedup actually decreased slightly, and energy usage rose. By 12 cores, Fibonacci’s EPS dropped to just 0.23, compared to Monte Carlo’s 1.57 at the same point. This highlights a key insight: workloads with minimal inter-process communication and independence (like Monte Carlo, where placing dots on a square does not require previous dots or where the other dots are used to calculate Pi) are much more energy-scalable across multiple cores. Conversely, inherently sequential workloads (like Fibonacci recursion) suffer from overhead, resource contention, and idle cycles during parallel execution, making them less suitable for energy-efficient parallelism. It is also observed that while the general trend in the Monte Carlo workload, i.e., that the EPS increases with an increasing number of cores, that due to the smaller workload of 175 million (Monte Carlo Pi can go for much larger values), there is not only a flattening out as the workload approaches 12 cores in terms of EPS, but it can also be seen that there is a decrease for 12 cores, as shown in
Figure 8.
4.1.3. Impact of Cooling
Cooling reduces thermal throttling and should, in theory, improve sustained performance. However, any performance gain must be weighed against the fact that cooling systems, themselves, consume additional energy, a factor not measured in this experiment; therefore, it is excluded from the energy analysis but acknowledged as a factor.
In practice, improved cooling may lead to two outcomes: either (1) execution time decreases and, thus, overall energy consumption drops or (2) performance increases at the cost of higher power draw, resulting in greater total energy usage. This section explores this trade-off using two executed Monte Carlo workloads (with
and
), comparing cooled vs. non-cooled conditions across core counts ranging from 1 to 12 with results shown in
Table 5,
Table 6,
Table 7 and
Table 8. The motivation for testing this configuration with inputs =
and
was to increase the time spent in operation, leading to an increased likelihood of thermal throttling; the ability to check whether or not a node is throttling comes from the CLI of that node, which gives the temperature and whether the node is throttling.
Across the cooled and uncooled workloads for
, it is evident that there is a slight increase in performance for a growing processor count when the bramble is being cooled. This suggests that while a small number of processors is pegged, this does not massively increase the temperature on the chip; however, when all processors are pegged, the temperature increases to the point where they are throttling and, therefore, gain more of a speedup. For
, this difference is more pronounced, as with increasing amounts of time spent in the workload, there is an increase in the temperature, which causes throttling; as such, cooling the system will result in a better speedup. In terms of EF, as can be viewed in
Figure 9, there is a clear trend that for a rising number of processorsthe EF increases, showing an increased energy efficiency for an increasing number of processors; it is clear that the gains found in terms of the decrease in time spent working outweighs the higher energy use through calculations. Moreover, for the EPS in
Figure 10, this trend is similar to that of EF; however, as this statistic also takes speedup into account, it can also prove that there is a positive correlation in this case between performance and energy efficiency.
4.1.4. Impact of On-Demand Computing
On-demand computing refers to the dynamic powering of nodes only when required rather than keeping all resources powered continuously. While there is some overhead in spinning resources up or down, for predictable workloads with known resource requirements, this model can significantly reduce energy waste from idle components. In terms of pure energy usage, as can be seen in
Figure 11, the actual amount of energy used for not powering all three nodes provides a much higher energy savings. However, due to the way that the measurements created for this research operate, i.e.,
(where one core is the initial energy requirement and n cores is the new energy requirement), and the EPS, which multiplies speedup and EF due to the much lower starting energy values (due to only powering one node), the EF and EPS for on-demand operation are much lower than those for non-demand operation, even though the trend in speedup is the same. This experiment does show, however, that for workloads that do not require all of the nodes, on-demand computing is a potential solution for energy efficiency with results shown in
Table 9 and
Table 10 as well as
Figure 11,
Figure 12 and
Figure 13.
4.1.5. Impact of Clocking
Adjusting the clock speed of processors, either through underclocking or overclocking, offers a direct mechanism to influence both performance and energy consumption. At higher clock speeds, processors can execute instructions more rapidly, reducing the overall execution time. However, this typically comes at the cost of increased power draw per unit time. Conversely, underclocking reduces energy consumption per second but prolongs the execution time of workloads. To investigate this trade-off, a Monte Carlo Pi workload (
) was executed on all 12 cores of a Raspberry Pi 3B+ cluster under different clock frequencies, ranging from 600 MHz to 1500 MHz. As shown in
Table 11 and
Figure 14, increasing the clock speed consistently improved both the speedup and energy efficiency metrics (EF and EPS), indicating that the gains in performance outweighed the rise in energy consumption per second. Notably, the data reveals that the fastest configuration (1500 MHz) resulted in the best EPS value (4.08), suggesting that the shorter execution time more than compensated for the increased instantaneous power draw. The EF metric also increased with clock speed, demonstrating improved energy-to-performance scaling. However, attempts to increase the clock speed beyond 1500 MHz caused instability—devices failed to boot and required reflashing. This limitation highlights a practical ceiling for overclocking on the Raspberry Pi 3B+ hardware used in this study.
4.1.6. Sorting Algorithms and the Impact of Big-O Complexity
Sorting algorithms were selected to empirically explore how algorithmic complexity impacts both execution time and energy usage. Sorting algorithms provide well-defined theoretical complexities:
Bubble Sort: —simple but inefficient;
Merge Sort: —efficient;
Quick Sort: , on average—fast but can degrade to .
This made them ideal candidates to test whether energy profiles align with theoretical performance expectations. The results below show that Bubble Sort performs significantly worse than the compared algorithms, with its execution time and energy usage ballooning as the input size
N increases. Merge and Quick Sort remain efficient, even with larger
N values, both in terms of runtime and Wh consumed. The results (
Table 12,
Table 13 and
Table 14 and
Figure 15 and
Figure 16 show inconsistencies, as validated in multiple experimentations. At lower values of
N, impacts of system or environmental conditions are significant. At higher values of
N, as the required computation grows in size, the impact reduces and results become more consistent with what was expected.
4.1.7. Graph Algorithms and the Impact of Traversing an Increasing Number of Nodes
Graph traversal algorithms are critical in many domains of HPC, from network analysis to optimisation problems. This experiment evaluated three classic algorithms—the Dijkstra, Breadth-First Search (BFS), and Depth-First Search (DFS) algorithms—under increasing graph sizes using adjacency matrices.
Due to the memory-intensive nature of storing full adjacency matrices, a hard cap emerged around 4000 nodes. Beyond this point, the Raspberry Pis lacked sufficient memory and killed the process. Therefore, this is the experiment for which there is least amount of accuracy when considering the usage of Pis as an analogue for real HPC nodes. Energy usage remained low across all three algorithms, even as the number of nodes scaled with results shown in
Figure 17 and
Figure 18 and
Table 15,
Table 16 and
Table 17. This reinforces the idea that well-designed algorithms with efficient data-access patterns can perform admirably to provide energy savings.
4.2. Analysis
This research confirms that energy efficiency and performance are deeply linked but not always in straightforward ways. Across all experiments, performance optimisations, whether via compiled languages, parallelisation, or overclocking, generally led to improved energy efficiency. Notably, the Monte Carlo Pi workload achieved a 4× improvement in EPS when moving from Python to C and an improvement of over 5× in EPS when parallelised across 12 cores. These results underscore the impact of well-matched workloads and system configurations.
However, the study also highlights that speed and efficiency are not always synonymous. For workloads like recursive Fibonacci operation, increased parallelism led to worse energy metrics, showing that not all workloads lead to gains to justify their energy cost when parallelised. This pattern repeated with clocking experiments: overclocking offered significant speedups and energy gains up to a point, beyond which system instability prevented further gains.
Importantly, system-level strategies like cooling and on-demand computing demonstrated meaningful improvements, especially under heavy workloads. Cooling mitigated thermal throttling, resulting in smoother scaling, while on-demand computing significantly reduced overall energy usage.
Crucially, this study reveals an under-appreciated cost in energy-aware software development: developer time and skill. Writing parallel, efficient code for workloads that are not embarrassingly parallelisable is difficult. The benefit of such optimisation is only worthwhile when the workload is performed frequently or at scale; otherwise, the human and financial cost of optimisation may outweigh the energy savings. While our work focusses on small clusters and is not completely generalisable, the same challenge exists for real-world HPC and green computing: balancing development overhead with sustainability goals.
Moreover, the findings of this project emphasise the need to embed energy awareness into the early stages of system design and software development. As energy costs rise and environmental concerns grow, future computing systems, from data centres to edge devices, will need to be optimised not only for performance but also for energy efficiency in every layer. This research reinforces the value of empirical testing over assumptions, showing that even small-scale, low-power clusters can reveal meaningful insights about workload behaviour. Encouragingly, it also shows that many gains can be achieved through software and configuration alone, offering a low-barrier entry point to greener computing without requiring expensive new hardware.