Optimizing Performance in the Cloud