we propose ToF, a transformation-based workflow optimization system to address the performance and monetary cost optimizations in the cloud. We develop and deploy the workflow optimization system in real cloud environments, and demonstrate its effectiveness and efficiency with extensive experiments. ToF has two major components for performance and cost optimizations: transformation model and planner. The transformation model defines the set of transformation operations for a workflow, and the planner performs the transformation on the workflow according to the cost model. To the best of our knowledge, this work is the first of its kind in developing a general optimization engine for minimizing the monetary cost of running workflows in the cloud.