# Classification and Merging Techniques to Reduce Brokerage Using Multi-Objective Optimization
## 4 CMRBC: System Model
From Equation (9), we can expand it, as shown below:

\[\text{B}_{\text{c}}=\text{a}_{1\times 1}+\text{a}_{2\times 2}+\text{a}_{3 \times 3}+\text{a}_{4\times 4}\]

\[=1\times\text{T}_{1}+0\times\text{T}_{2}+0\times\text{T}_{3}+0\times\text{T}_{ 4}\ldots\ \leq 0.50\]

\[=0\times\text{T}_{1}+1\times\text{T}_{2}+0\times\text{T}_{3}+0\times\text{T}_{ 4}\ldots\ \leq 0.75\]

\[=0\times\text{T}_{1}+0\times\text{T}_{2}+1\times\text{T}_{3}+0\times\text{T}_{ 4}\ldots\ \leq 0.90\]

\[\text{B}_{\text{c}}=0\times\text{T}_{1}+0\times\text{T}_{2}+0\times\text{T}_{ 3}+1\times\text{T}_{4}\ldots\ \leq 0.120\]

The cost of the jobs is considered from Amazon Web Services EC2 (AWS), the total number of jobs are 10, and for each VM, the cost in AWS is 0.50, 0.75, 0.90, and 0.120 (USD) based on the size of the job being small, medium, large, and extra-large, respectively, as shown in Figure 3g. The cost for each VM creation is USD 0.10 in AWS. As based on the classified and merging results shown in Figure 3f, only four VMs are created, so the cost is only calculated for the number of VMs created. This optimizes the brokerage cost for VM creation. The CMRBC model reduced the brokerage cost to 60% of the actual price for a lesser number of VM creations. The total overall cost is USD 0.335 to execute 10 jobs, USD 0.40 is the cost of the creation of VMs for four larger_jobs instead of USD 0.100 for 10 jobs, and resource utilization is maximized to 80%. Total Cost = 0.335 \[Cl=\Sigma^{\text{ k}}\ _{\text{ i}}=\text{1}\ larger\_job\_i \tag{9}\]0= 0.375 \[Cl=\Sigma^{\text{ k}}\ _{\text{ i}}=\text{1}\ larger\_job\_i \tag{9}\]1

Time Complexity:

For every job, the CMRBC algorithm is applied and executed by using the classifier and merger function to obtain one _larger_job_. The time taken for the execution is determined as follows. Let \(n\) be the number of _Smaller_jobs_ present in the _larger_job_. Let \(t\) be the time taken to compute the brokerage and \(v\) the time taken to create and destroy the VM. The time complexity function for computing brokerage and the time taken for the creation and destruction of the VM for \(n\) jobs is given by the expression \(T(n)=n\times t\times v\). Therefore, the time complexity is of the order \(O(n)\). #### Model Evaluation Based on the Scenario

In this subsection, we discuss a model with an example by considering 500 jobs, 500 virtual machines, and 200 data centers in four different scenarios to evaluate the efficacy of the proposed model and compare the utilization of resources with virtual machines. The configuration of a VM involves _CPU cycles_ (HZ), _Memory_ (MB), and _Bandwidth_ (BPS or MBPS) (_CPU_ executes one or more instruction per clock cycle). **Scenario 1:**_The number of jobs is more than virtual machines._

If the job arrival rate is higher than the virtual machine creation rate, the utilization of resources leads to the scarcity of virtual machines. As a result, the execution of jobs is delayed, and the error rate is increased. For example, for 500 jobs and 200 VMs, merging takes place with some type of job to reduce the number of VMs. When there are fewer VMs, the time required to execute each job is more, which eventually leads to starvations. \[Cl=\Sigma^{\text{ k}}\ _{\text{ i}}=\text{1}\ larger\_job\_i \tag{9}\]2 (**a**) Jobs assigned by users, (**b**) classifier output, (**c**) segregating jobs, (**d**) merger output, (**e**) cloudlet output, (**f**) task assignment to virtual machines, (**g**) cost of each type of task. **Scenario 2:**_The rate of the arrival of the same type of job is lower than the number of virtual machines._

If the same type of job does not arrive with the expected timestamp, then each job needs to be executed on a single virtual machine. This leads to expensive brokerage, and it is very time consuming to create and destroy virtual machines, meaning charges are high. For example, if there are 100 jobs and 100 VMs, if no jobs arrive as small jobs out of 100 jobs, one job is assigned to one virtual machine, which leads to higher costs.