Our measurements on production datacenter traffc together with recently-reported results suggest that datacenter networks suffer from long-lived congestion caused by core network oversubscription and unbalanced workload placement. In contrast to traditional traf?c engineering approaches that optimize flow routing, in this paper, we explore the opportunity to address the continuous congestion via optimizing VM placement in virtualized datacenters. To this end, we present VirtualKnotter, an ef?cient online VM placement algorithm to reduce congestion with controllable VM migration traffc as well as low time complexity. Our evaluation with both real and synthetic traffic patterns shows that VirtualKnotter performs close to the baseline algorithm in terms of link unitization, with only 5%- 10% migration traffic of the baseline algorithm. Furthermore, VirtualKnotter decreases link congestion time by 53% for the production datacenter traffic.