Dynamic Virtual Machine (VM) consolidation is a successful approach to improve the energy efficiency and the resource utilization in cloud environments. Consequently, optimizing the online energy-performance tradeoff directly influences quality of service. In this study, algorithms named as CPU Priority based Best-Fit Decreasing (CPBFD) and Dynamic CPU Priority based Best-Fit Decreasing (DCPBFD) are proposed for VM placement. A number of VM placement algorithms are implemented and compared with the proposed algorithms. The algorithms are evaluated through simulations with real-world workload traces and it is shown that the proposed algorithms outperform the known algorithms. The simulation results clearly show that CPBFD and DCPBFD provide the least service level agreement violations, least VM migrations, and efficient energy consumption.