## 5 Performance Evaluation
### Experimental Settings  
Cloud and Fog nodes have different processing power as well as resource usage cost. We assumed that each node has its own processing capacity represented by processing rate (measured by MIPS (million instructions per second)), along with CPU, memory and bandwidth usage cost. Thirteen processing nodes constructed the Cloud-Fog system, with the characteristics shown in Table 3. In the Fog layer, Fog nodes such as routers, gateways, workstations, or personal computers have limited processing capacity. In Cloud layer, servers or virtual machines in high performance data centers are responsible for handling tasks. Therefore, the processing speed of Cloud nodes is much faster than Fog nodes. In contrast, the cost of using resources in the Cloud is more expensive than in the Fog. These costs are calculated according to Grid Dollars (G$)--a currency unit used in the simulation to substitute for real money. The Cloud-Fog system is responsible for executing all requests from users. Each request is decomposed into a set of tasks, which are analyzed and the resources that they need are estimated. It was assumed that each tack has some attributes: number of instructions, memory required, input file size, and output file size. Depending on the workload of each request, the set of tasks may vary widely in size. Thus, 11 datasets with from 40 to 500 tasks were created to participate in our simulation. Each task in datasets was generated randomly with its attributes following Table 4. With randomness, the experiment could cover various scenarios because many types of tasks were created, some of them requiring a huge amount of processing while others needing more memory or bandwidth usage, and so on. Note that we proposed these benchmarks (e.g., Tables 3 and 4) because of no benchmarks published in the literature in this research area. The settings of the experimental environment are shown in Table 5, the simulation was developed in Java with Eclipse editor, and using iFogSim [26]. iFogSim Was chosen because it is developed based on CloudSim, a Cloud computing platform that has been widely used and validated in numerous studies over the years; iFogSim supports modeling and simulation of architecture as well as services in Cloud-Fog environment. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Property** & **Value** & **Unit** \\ \hline Number of instructions & \([1,100]\) & \(10^{9}\) instructions \\ Memory required & \([50,200]\) & MB \\ Input file size & \([10,100]\) & MB \\ Output file size & \([10,100]\) & MB \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Attributes of tasks. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameter** & **Fog Environment** & **Cloud Environment** & **Unit** \\ \hline Number of nodes & 10 & 3 & node \\ CPU rate & \([500,1500]\) & \([3000,5000]\) & MIPS \\ CPU usage cost & \([0.1,0.4]\) & \([0.7,1.0]\) & G$/s \\ Memory usage cost & \([0.01,0.03]\) & \([0.02,0.05]\) & G$/MB \\ Bandwidth usage cost & \([0.01,0.02]\) & \([0.05,0.1]\) & G$/MB \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Characteristics of the Cloud–Fog infrastructure. Since our proposed TCaS algorithm is based on Genetic Algorithm, we compared our method with some other evolutionary algorithms: (1) Modified Particle Swarm Optimization (MPSO); and (2) Bee Life Algorithm (BLA) [4]; as well as a traditional algorithm: (3) simple Round Robin (RR) scheduling. BLA was introduced by [PERSON] with the following idea. BLA is an optimization method that is inspired from the two most important behaviors of bees, namely marriage (or reproduction) and food foraging. First, \(\mathbb{N}\) individuals, which form the initial population, are evaluated by a fitness function. After sorting the population, the best individual is chosen as the queen, the next \(D\) bees are identified as drones, and the remaining bees \(W\) are workers bee. Population is changed through each generation; the bee's life cycle consists of two main behaviors: reproduction and food foraging.