Optimizing the Energy Consumption of Servers and Networks in Cloud Data Centers