5.1. Fixed Simulation Analysis
Table 4,
Table 5 and
Table 6 further show the comparative percentage differences between Fog and Cloud computing. In addition,
Figure 3 depicts a graphical illustration of the Fog/Cloud comparison for all the smart IoT devices, including CCTV, CO
2, and lighting sensors, highlighting the benefits and efficiency of Fog computing compared to Cloud computing. The Fog and Cloud computing comparisons are simulated for (a) energy consumption, (b) latency, and (c) network bandwidth usage. Additionally, for energy consumption and network bandwidth usage, the use of the Fog-only simulation for data management on this floor initially shows that the lower number of devices is higher than that of the Cloud-only simulation. However, as the number of devices increases, the Fog computing paradigm becomes more efficient than the Cloud computing paradigm. This initial increase is due to multiple resources at the network edge, which require more energy overall when activated. Furthermore, it was observed that the Fog-only energy consumption results were higher than their Cloud equivalents for CCTV, which was 1.9% higher than Cloud. However, CO
2 was reduced by 0.06%, and light sensors were decreased by 0.14%, as shown in
Table 4. For latency, the Fog simulation results highlight a reduction of 70.65% for CCTV, 84.41% for CO
2, and 84.13% for light sensors compared to their Cloud equivalents, as shown in
Table 5. Lastly, analysing the network bandwidth usage, Fog-only simulation results show an increase in network use for CCTV data by 67%, while CO
2 and light sensors reduced by 38.95% and 38.02%, respectively, as shown in
Table 6.
In the Cloud computing layer, it is theoretically understood that storage and computational processing resources are infinitely available; therefore, data are typically transferred to the Cloud layer for processing [
32]. However, some of the costs and consequences associated with constantly forwarding homogeneous and heterogeneous data to the Cloud for processing are increased energy consumption, higher latency, and congested network bandwidth usage. Earlier aspects of this research have demonstrated, through previous studies, that introducing the Fog computing layer to the traditional Cloud computing architecture optimises energy consumption, latency, and network bandwidth usage. Consequently, this study compared the impact on energy consumption, latency, and network bandwidth usage for multiple smart IoT devices in a smart office building. From the results in
Table 4,
Table 5 and
Table 6 and
Figure 3 above, the Fog computing results for energy savings and network bandwidth usage were higher compared to their Cloud scenario equivalents. This highlights the limitations of Fog computing when evaluated in a fixed low-device environment, such as the smart office floor plan. The percentage difference for energy savings ranged between −1.19% for 7 CCTV devices and increased to 0.14% for 22 lighting sensors. Meanwhile, the network bandwidth usage results were similar, ranging from −67% for 7 CCTV devices, 38.95% for 17 CO
2 devices, and 38.02% for 22 lighting sensor devices. However, the benefits of Fog computing were clearly highlighted for latency compared to Cloud computing, ranging from 70.65% for 7 CCTV devices, 84.41% for 17 CO
2 devices, and 84.13% for 22 lighting sensor devices.
The fixed results highlight a higher energy consumption in the Fog computing simulation with fewer smart IoT devices such as CCTV. Meanwhile, the scalability result indicates that energy consumption efficiency benefits become more pronounced as the number of smart IoT devices increases. Furthermore, due to the high demand for processing, computation, and storage in the centralised Cloud computing scenario, the results confirm a direct correlation between the increase in energy consumption and the increase in the number of smart IoT devices. However, due to additional energy required by Fog computing nodes and resources, which are necessary for the core functions of Fog computing and the achievement of the Fog computing benefits, occasionally, the level of energy consumption was higher in the Fog computing scenario compared to the Cloud computing scenario.
Additionally, although Cloud computing possesses almost unlimited computation, processing, and storage capabilities and resources, consistent data transmission to the centralised Cloud computing layer can increase energy consumption. Meanwhile, in Fog computing, the results highlight more energy consumption savings compared to Cloud computing. However, the energy savings depend on the number and type of smart IoT devices, as shown by the energy consumption savings of 1.19% for 7 CCTVs and 0.14% for 22 light sensors. This result for the CCTV is negative, therefore highlighting increased energy consumption, which indicates a Fog computing challenge when managing a small number of fixed devices. The 0.14% saving for the 22 light sensors indicates an increased energy consumption saving for Fog computing for specific types of smart IoT devices. The high volume of data generated as the number of devices increases leads to increased network congestion and, subsequently, longer data transmission times. Therefore, the Cloud and Fog computing results highlight a direct correlation between the number of smart IoT devices and increased latency. Furthermore, the results demonstrate a consistently lower latency rate for Fog computing than Cloud computing. This highlights the efficiency benefit of Fog computing, which indicates that applications with real-time response requirements will benefit from Fog computing.
Additionally, the results highlight an enhancement in latency for all the smart IoT devices used in this study. The decrease in latency was significant for 7 CCTV cameras at 70.65%, 17 CO2 sensors at 84.41%, and 22 light sensors at 84.13%, indicating the benefits of Fog computing in reducing the request response times, which benefits decision-making and applications with real-time response requirements. Meanwhile, due to the distance between the device layer and the Cloud computing layer, data transmission takes longer, which is unsuitable for applications with real-time requirements. In both the Fog and Cloud scenarios, the scalable increase in the number of smart IoT devices leads to higher quantities of data generation and transmission, leading to higher network bandwidth usage. Meanwhile, the Fog computing scenario highlights the data management efficiency benefits of this approach by consuming slightly lower network bandwidth. Additionally, the results of network bandwidth usage varied, so that the 7 CCTV cameras output difference was −67%, which subsequently increased for 17 CO2 sensors to 38.95% and for 22 light sensors to 38.02%, indicating the varied impact of Fog computing on network bandwidth usage, dependent on the volume and type of smart IoT devices.
5.2. Scalability Simulation Analysis
The following is a compilation of the scalability simulation results from monitoring smart IoT device usage in the smart building. For the benefit of this study, an experiment was conducted to evaluate real-world IoT device data in layers 0, 1, and 2, as shown in
Figure 1 above, with IoT device scalability for smart office building use. The number of devices simulated was on scaled up in increments of 20 devices to capture energy consumption, latency, and network bandwidth usage and monitor performance metrics to demonstrate the benefits of Fog computing.
Table 7 below highlights the simulation results for the impact on energy consumption, focusing on managing CCTV IoT device data, CO
2 IoT device data, and lighting sensor IoT device data processed at both the Cloud and Fog layer at the network’s edge in the smart office building. Furthermore,
Table 7 shows varied numbers of devices, ranging from 20 to 200, in 20 device increments, simulating scalability for Cloud-only and Fog-only scenarios in the different (Cloud and Fog) columns. The difference % column represents the percentage difference between the Cloud-only and Fog-only simulations, comparing the energy consumption measured in megajoules (MJ).
In summary, the results highlighted in
Table 7 show that the level of energy consumption for all three IoT devices was steady for both Cloud-only and Fog-only simulations with minimal changes, as the number of devices increased from 20 to 200. However, there was a higher difference from 100 to 200 devices. The results for CCTV in the Fog-only simulation clearly showed a slightly lower energy consumption rate compared to the Cloud-only simulation with a percentage difference between −0.47% at 20 devices and 4.35% at 180 devices, which then decreased to 4.07% at 200 devices.
While the result for CO2 is similar regarding energy consumption for both the Cloud-only and Fog-only simulations, the results of the Fog-only simulation also showed a lower energy consumption rate than those of the Cloud-only simulation. However, the percentage difference was between −0.26% at 20 devices and 4.20% at 140 devices. It then plateaued to between 3.57% and 4.01% from 140 to 200 devices, indicating a direct correlation between an increase in devices and the increase in energy consumption, which is logical and to be expected. However, the energy consumption figures stabilised with subsequent increases in devices between 140 and 160 devices.
Furthermore, the light sensor results also follow the same pattern of a steady level of energy consumption for both Cloud and Fog scenarios, with the Fog scenario consuming a lower energy rate, as shown in
Figure 4. The percentage difference for the light sensors ranged between −0.58% at 40 devices and 3.89% at 180 devices.
In addition,
Figure 5 below highlights the simulation results for latency with a focus on the management of CCTV IoT device data, CO2 IoT device data, and light sensor IoT device data processed with computation and storage resources at both the data centre (Cloud) and the network’s edge (Fog) in the smart building.
Table 8 highlights the number of devices in 20 increments ranging from 20 to 200. The simulation was conducted for Cloud-only and Fog-only, respectively, with results in the different (Cloud latency and Fog latency) columns, and the difference % column represents the percentage difference between the Cloud-only and Fog-only simulations, comparing system latency measured in milliseconds (ms).
Table 8 highlights Cloud and Fog-only latency simulation results for managing CCTV, CO
2, and light sensor data in the smart building environment. The Cloud-only simulation is high at between 750.58 ms for 20 devices and 949.41 ms for 200 devices compared to the Fog-only simulation, which was significantly lower at 217.93 ms, a 70.97% difference for 20 devices, and 169.97 ms, an 82.10% difference for 200 devices. This highlights a direct correlation between an increased number of devices and latency for Cloud-only simulations. However, the Fog-only simulation results showed an indirect correlation between increased devices and decreased latency. This results from established scheduled routing and offloading activities within the Fog node cluster for data processing transfers.
Furthermore, some of the benefits of Fog computing are data process and storage optimisation, distributed resource availability and distributed load balancing capability, and optimising data processing locally at the network’s edge in a decentralised architecture design instead of processing at a centralised Cloud location further away from the network’s edge. This decentralisation also reduces data transfer distance and frequency, taking advantage of the distributed network resources at the network’s edge.
Table 8 displays the latency simulation results for CCTV, CO
2, and light sensor IoT devices, respectively, which showed a similar trend, i.e., a direct correlation between an increase in devices and an increase in latency for Cloud-only simulation. Conversely, there is an indirect correlation between the number of devices and latency with Fog-only simulation, where the increase in the number of devices showed a decrease in latency.
Table 8 shows the Cloud-only latency simulation at 672.76 ms for 20 devices, which increased to 922.16 ms for 200 devices, a difference of 249.39 ms. In contrast, the Fog-only simulation, compared to the Cloud-only simulation, shows significantly less latency by 84.78% at 102.42 ms for 20 devices and 87.15% less latency at 118.47 ms for 200 devices, a difference of 16.05 ms. This difference represents a significantly lower latency between Cloud-only and Fog-only data management and computation processing resources, clearly highlighting the benefits of Fog computing in the smart office building architecture.
There is a similar trend in the Cloud-only light sensor latency simulation at 684.74 ms for 20 devices, which increased to 926.42 ms for 200 devices, a difference of 241.68 ms. Compared to the Cloud-only simulation, the Fog-only simulation shows significantly less latency by 85.28% at 100.78 ms for 20 devices and 87.33% less latency at 117.38 ms for 200 devices, a latency difference of 16.60 ms. There is a significantly lower latency between Cloud and Fog-only data management and computation processing resources, clearly highlighting the benefits of Fog computing in the smart building architecture. Data processing and computations are performed at the network’s edge, allowing the Fog nodes to act as resources closer to the smart IoT devices in the smart building. Hence, the data travels a shorter distance than the transfer and management of data at the Cloud (data centre) layer, which will include more network hops at a greater distance.
In continuation,
Figure 6 below graphically illustrates the simulation results for network bandwidth usage, focusing on the data management of CCTV IoT device data, CO
2 IoT device data, and light sensor IoT device data processed with computing and storage resources at both the data centre (Cloud) and the network’s edge (Fog) in the smart building.
Similarly,
Table 9 shows a similarity in the trends from earlier simulation results for energy consumption with a direct correlation between an increase in the number of devices and an increase in network bandwidth usage for both Cloud and Fog-only simulations. The network bandwidth usage simulation results for Cloud-only CCTV data management were 12.67 Gbps for 20 devices, which increased to 110.75 Gbps for 200 devices, a difference of 98.08 Gbps. In contrast, the Fog-only simulation, in comparison to Cloud-only simulation, shows a significantly lower network bandwidth usage by 31.02% at 8.74 Gbps for 20 devices and 23.72% less network bandwidth usage at 84.48 Gbps for 200 devices, a network bandwidth usage difference of 75.74 Gbps. Note that the percentage difference between the Cloud and Fog scenarios ranges from 31.02% at 20 devices, decreasing to 21.67% at 80 devices, then increasing steadily to 23.72% at 200 devices.
The trend continued, showing the network bandwidth usage simulation results for Cloud-only CO
2 data management at 15.05 Gbps for 20 devices and increasing to 111.27 Gbps for 200 devices, a difference of 96.23 Gbps. The Fog-only simulation, in comparison to the Cloud-only simulation, shows significantly lower network bandwidth usage by 35.97% at 9.63 Gbps for 20 devices and 31.04% less network bandwidth usage at 84.48 Gbps for 200 devices, a network bandwidth usage difference of 67.10 Gbps. Note that the percentage difference between the Cloud and Fog scenarios ranges from 35.97% at 20 devices, decreasing steadily to 31.04% at 200 devices.
Table 9 shows a direct correlation between the number of devices and the increase in the Cloud and Fog network bandwidth usage simulation results. The decentralised Fog computing results clearly show more than a 35% reduction in network bandwidth usage compared to the centralised Cloud computing results.
The simulation results for the light sensors maintained the same trends, with the Cloud-only data at 14.78 Gbps for 20 devices and increasing to 110.76 Gbps for 200 devices, a difference of 95.98 Gbps. At the same time, the Fog-only simulation, in comparison to Cloud-only simulation, shows significantly lower network bandwidth usage by 34.78% at 9.64 Gbps for 20 devices and 31.22% less network bandwidth usage at 76.18 Gbps for 200 devices, a network bandwidth usage difference of 66.54 Gbps. Note that the percentage difference between the Cloud and Fog scenarios ranges from 34.78% at 20 devices, decreasing steadily to 31.22% at 200 devices, showing a direct correlation between the increase in the number of devices and the increase in both Cloud and Fog network bandwidth usage simulation results. The decentralised Fog computing results clearly show more than a 34% reduction in network bandwidth usage compared to the centralised Cloud computing results.
In summary, this study used real-world IoT device data and real-world infrastructure data with multiple Raspberry Pi 4 model B parameter values representing Cloud data centres, proxy servers, and Fog nodes in a smart building’s Cloud–Fog network architecture. According to the simulation results, the management and computation of data processed at both the centralised Cloud data centre location and the decentralised Fog node clusters closer to the network’s edge, are highlighted and compared. The Cloud and Fog computing comparison also highlights the difference in energy consumption, latency, and network bandwidth usage output for Cloud and Fog computing data processing. Overall, the data processed at the Cloud layer had a relatively higher energy consumption, latency, and network bandwidth output. Conversely, the results from data processing at the Fog computing layer demonstrated the optimisation benefits of lower energy consumption, improved latency, and less congested network bandwidth usage.