In this paper, the authors deals with running the lowest number of virtualized datacenter machines with the least completion time and efficient consumption of electricity. Cloud computing is based on the concept of offering computation services that are executed in datacenters. These datacenters require huge amount of power if they are at the peak load or the tasks are not distributed efficiently in their machines. Reducing power consumption has been an essential requirement for cloud resource providers not only to decrease operating costs, but also to improve the system reliability. This paper addresses the issue of minimizing power consumption in datacenter servers and improving their load balancing simultaneously.