In this paper, the implementation of a distributed primal-dual algorithm over realistic wireless networks is investigated. In the considered model, the users and one base station (BS) cooperatively perform a distributed primal-dual algorithm for controlling and optimizing wireless networks. In particular, each user must locally update the primal and dual variables and send the updated primal variables to the BS. The BS aggregates the received primal variables and broadcasts the aggregated variables to all users. Since all of the primal and dual variables as well as aggregated variables are transmitted over wireless links, the imperfect wireless links will affect the solution achieved by the distributed primal-dual algorithm. Therefore, it is necessary to study how wireless factors such as transmission errors affect the implementation of the distributed primal-dual algorithm and how to optimize wireless network performance to improve the solution achieved by the distributed primal-dual algorithm. To address these challenges, the convergence rate of the primal-dual algorithm is first derived in a closed form while considering the impact of wireless factors such as data transmission errors. Based on the derived convergence rate, the optimal transmit power and resource block allocation schemes are designed to minimize the gap between the target solution and the solution achieved by the distributed primal-dual algorithm. Simulation results show that the proposed distributed primal-dual algorithm can reduce the gap between the target and obtained solution by up to 52% compared to the distributed primal-dual algorithm without considering imperfect wireless transmission.