The new dynamic pricing schemes encourage the consumers to participate more actively in the electricity energy market, and the smart meter and demand side management (DSM) make it possible. In this paper, we consider a smart grid environment with multiple users equipped with smart meters and energy management devices (EMD). An improved optimization method is proposed to maximize the social welfare of both users and the provider under a real-time pricing strategy. More specifically, we proposed a more practical and advanced gradient algorithm — fast distributed dual gradient algorithm (FDDGA). Compared with traditional distributed dual sub- gradient algorithm, this improved method does not only accelerate the convergence rate but also overcome the possible oscillation that caused by the uncertainty in choosing step size over iteration process in sub-gradient projection method. The simulation results also validate that the proposed algorithm is effective and efficient in solving the real time pricing problem for demand response.