• Ei tuloksia

4.2 Results

4.2.9 Disk Array Management

In CloudSimDisk, the persistent storage of a data center is a pool of HDD devices.

When Cloudlets are processing, new les are eventually stored in the persistent storage, more specically in one HDD of the pool. Hence, the simulator follows a dened algorithm to choose the target HDD.

CloudSim implements a FIRST-FOUND algorithm (see Figure 43a). It scans the list of available HDD and adds the le on the rst one which has enough free space.

This algorithm is simple and work well with one HDD, but it does not provide eciency when the persistent storage is composed of several devices.

CloudSimDisk implements additionally a new algorithm called ROUND-ROBIN (see Figure 43b). Files are added sequentially to each disk of the persistent storage, so the rst le on the rst disk, the second le on the second disk, etc. When no more disks are in the pool, the algorithm restarts from the rst disk. If one disk is full, the algorithm tries the next disk. If all the persistent storage is full, the algorithm returns a tag number corresponding to FILE_ADD_ERROR_STORAGE_FULL event. If the le is stored with success, the algorithm returns a tag number corresponding to FILE_ADD_SUCCESSFUL event.

(a) (b)

Figure 43. Disk array management algorithm: (a) FIRST-FOUND; (b) ROUND-ROBIN.

To observe how Round-Robin algorithm aects the simulation, Figure 44 presents the results of three similar scenarios with a variable persistent storage size of 1 HDD, 2 HDDs and 3 HDDs. Table 10 lists the input parameters used during the experiments.

Table 10. Common input parameters for ROUND-ROBIN experiments.

CLOUDLET No. REQUEST No. FILENAME FILE

SIZE ARRIVAL

TIME

Cloudlet #1 Request #1 FileA 1 MB 0.311 s

Cloudlet #2 Request #2 FileB 7 MB 0.321 s

Cloudlet #3 Request #3 FileC 3 MB 0.356 s

Cloudlet #4 Request #4 FileD 1 MB 0.366 s

Cloudlet #5 Request #5 FileE 5 MB 0.368 s

Cloudlet #6 Request #6 FileF 3 MB 0.370 s

Cloudlet #7 Request #7 FileG 1 MB 0.387 s

Cloudlet #8 Request #8 FileH 7 MB 0.390 s

Cloudlet #9 Request #9 FileI 3 MB 0.401 s

Cloudlet #10 Request #10 FileJ 10 MB 0.402 s

Cloudlet #11 Request #11 FileK 7 MB 0.419 s

Cloudlet #12 Request #12 FileL 3 MB 0.436 s

Cloudlet #13 Request #13 FileM 1 MB 0.467 s

Cloudlet #14 Request #14 FileN 2 MB 0.478 s

Cloudlet #15 Request #15 FileO 3 MB 0.490 s

When the persistent storage is composed of only 1 HDD, the incoming requests tend to accumulate in the disk queue, leading to poor performances. For example, Cloudlet #15 spent around 90% of its processing time in the "waiting queue". In fact, in this case, the Round-Robin algorithm cannot balance the workload with other devices, and the input load is more important than the processing capability of the HDD.

When the persistent storage is composed of 2 HDDs, the Round-Robin algorithm can balance the incoming requests on both drives, reducing signicantly their "waiting time" and improving the overall performances of the persistent storage. For example, the waiting time of Cloudlet #15 has been divided by 9. However, for most of the Cloudlet, the "waiting time" is still more than 50% of their total processing time.

When the persistent storage is composed of 3 HDDs, the load balancing is even more eective. Most of the Cloudlet has a null "waiting time" and others are waiting for less than 50% of their total processing time. Moreover, the system is more resilient due to the number of devices in the persistent storage, but it consumes more energy.

CloudSimDisk can be used to study this dilemma.

Figure44.CloudSimDisksimulationwith1HDD,2HDDsand3HDDsinthepersistentstorageusingRoundRobinalgorithmmanagement.

Table 11 summaries the eect of ROUND-ROBIN on the persistent storage perfor-mances. It shows that the algorithm acts as a load balancer and reduces the number of request waiting in the disks queues. Consequently, requests are executed more rapidly and the overall performances of the persistent storage are improved.

Table 11. Maximum "waiting queue" length for ROUND-ROBIN examples.

HDDNAME MAX "WAITING QUEUE" LENGTH (Requests) for 1 HDD for 2 HDDs for 3 HDDs

hdd1 8 Req 4 Req 2 Req

hdd2 - 3 Req 2 Req

hdd3 - - 2 Req

4.3 Summary

Chapter 4 presented some results obtained with CloudSimDisk module. Inputs and outputs of the CloudSimDisk simulations have been explained in detail. The se-quential processing has been proved by an analysis of the console output. The randomness of the seek time and the rotation latency, and the variation of the data transfer time, obtained with CloudSimDisk, are in accordance with the HDD model parameters and the stated assumptions. The computation of the energy consump-tion has been analytically described and simulaconsump-tion results have demonstrated the validity of the implementation. Finally, the ROUND-ROBIN algorithm, managing the incoming requests to the persistent storage, has been validated with three dif-ferent experiments. Further algorithm can be implemented, for example to study the trade-o between performances and energy savings.

5 CONCLUSIONS AND FUTURE WORK

The thesis topic was centered on energy ecient data storage in data center, with the objective to look at the energy consumed to store each bit of digital information.

As a result, the present work introduced CloudSimDisk, a module for energy-aware storage simulation in the widely used CloudSim simulator. This chapter discusses the thesis contribution, its limitations and future work.

5.1 Thesis Contribution: CloudSimDisk

CloudSimDisk module allows modeling and simulation of energy-aware Hard Disk Drive (HDD) technology in CloudSim simulator. It implements new HDD models with capacity, average seek time, average rotation latency and maximum internal data transfer rate parameters. Additionally, it implements HDD power model with idle and active power requirements. The data center, data center broker and cloudlet models in CloudSim have been extended to allow simulation of energy-aware storage.

Classes and methods names in CloudSimDisk follow the same pattern used in CloudSim v.3.0.3, so users will be able to use later implemented features or ex-tend them with a minimum learning curve. From a software engineering point of view, CloudSimDisk has been developed according to scalability and modularity qualities attributes. Consequently, users can test their algorithms and add new input parameters, so that CloudSimDisk can be improved over time.

The source code has been released as Open Source software10 on GitHub11, where it is possible to follow future developments of CloudSimDisk.