This work presents a Virtual Machine Placement algorithm to optimize the service allocation process. This problem is one of the most significant challenges in Network Function Virtualization. Our solution uses a buffered ranking strategy where we perform the allocation process considering batches of tasks instead of single tasks. We consider two different literature approaches to compare our solution regarding the time to allocate tasks and the number of resources allocated. To evaluate the proposal, we use scenarios where the requisitions arrive at different times or simultaneously. The first represents a realistic scenario with no knowledge regarding the tasks’ arrival. Meanwhile, the second represents a dense one, i.e., where many tasks arrive together. The evaluations show that our solution obtains better results in both cases, specially when the requisitions arrive simultaneously. Our solution improved the allocation time by around 25% on average and performed a better load distribution among hosts.