Linear convergence of primal-dual gradient methods and their performance in distributed optimization