## 1 Introduction  
With the exploitation and usage of green energy, more and more attention has been paid to green energy generation and management issues of the smart grid. It is predicted that the domestic total solar power generation will reach 150 GW by the end of 2020 [1]. Although renewable energy generation is of great importance to environmental sustainability in the future, there are still various problems to widely penetrate renewable energy into the grid due to its instability and intermittency. With the large-scale integration of renewable energy generation, the power flow distribution of the grid will change and the power flow might be reversed. Meanwhile, problems such as voltage fluctuation or over-limit violations will occur, which will affect the safe and reliable operation of the grid. In order to maintain the reliability of the grid, traditional grids usually adopt a passive regulation mode where the power supply changes with power demand. For example, large-scale batteries as an energy storage element, combined with corresponding control strategies, could help achieve the stability of the grid [2; 3]. An analysis of three potential future technical regulation systems has been presented [4] in which wind power and small and medium-scale CHP (combined heat and power) units are involved in balancing and grid stabilizing tasks. The results indicated that such systems could improve the ability to integrate renewable energy. Compared to traditional batteries, this system could reduce carbon dioxide emissions effectively. However, such passive methods might result in an increase in grid operations. Moreover, the movement of electricity over distances results in losses, leading to a great amount of economic expense, as reported in Reference [5]. According to statistics, the global electric power transmission and distribution losses account for nearly 8.3% of the output [6], which shows that the power transmission and distribution losses are worthy of consideration due to the possible capital costs they might bring. In other words, the operational costs of the regional grid could be remarkably reduced by a reduction in transmission losses. Hence, it is necessary to adopt a strategy to make full use of loads to realize the demand response to balance the power supply and demand, to improve the efficiency, and to maintain the reliability of the grid with renewable energy sources incorporated. On the other hand, with the development and wide-spread usage of large-scale datacenters, the power consumption of one datacenter could reach 50 MW or even more. In China, the total power consumption of domestic datacenters has exceeded the annual power generation of the Three Gorges Dam since 2015. Besides, the power of the datacenter is still growing up by 10-20% every year, which is a similar rate to that of renewables [7]. Studies have shown that the power of the datacenters is flexible to adjust, which implies that the datacenter is a potentially controllable load to achieve a demand response. Meanwhile, as a large consumer of electricity, connecting the datacenters into the grid with renewable sources can also reduce energy expenses effectively. In this paper, we attempted to explore dynamic load adjustment approaches for multiple datacenters, holistically in the smart grid, in order to balance the varying renewable energy input into the grid. By our approach, the total power losses of the whole grid could be reduced, which showed the value of datacenters participating in demand response programs for the balance of power generation and consumption. Furthermore, although the power of the datacenters was flexible to adjust, the actual adjustment actions would have to spend some time, which we called \"the action delay\" hereafter. By our investigation, this kind of delay would result in extra losses for the grid.