In this dissertation, we design and build systems to help application owners select the most suitable cloud environments for their applications. The first part of this thesis focuses on how to compare the general fitness of the cloud environments. We present CloudCmp, a novel comparator of public cloud providers. CloudCmp measures the elastic computing, persistent storage, and networking services offered by a cloud along metrics that directly reflect their impact on the performance of customer applications. CloudCmp strives to ensure fairness, representativeness, and compliance of these measurements while limiting measurement cost. Applying CloudCmp to four cloud providers that together account for most of the cloud customers today, we find that their offered services vary widely in performance and costs, underscoring the need for thoughtful cloud environment selection. From case studies on three representative cloud applications, we show that CloudCmp can guide customers in selecting the best-performing provider for their applications.
The second part focuses on how to let customers compare cloud environments in the context of their own applications. We describe CloudProphet, a novel system that can accurately estimate an application's performance inside a candidate cloud environment without the need of migration. CloudProphet generates highly portable shadow programs to mimic the behavior of a real application, and deploys them inside the cloud to estimate the application's performance. We use the trace-and-replay technique to automatically generate high-fidelity shadows, and leverage the popular dispatcher-worker pattern to accurately extract and enforce the inter-component dependencies. Our evaluation in three popular cloud platforms shows that CloudProphet can help customers pick the best-performing cloud environment, and can also accurately estimate the performance of a variety of applications.