Loading...
X

How to speed up a VirtualBox virtual machine

What to do to speed up VirtualBox

On the same computer, a VirtualBox virtual machine can have different performance and responsiveness. The following are a few ways to speed up the virtual machine.

1. Enable the I/O Caching option

Enabling “Use Host I/O Cache” for virtual machine disks can dramatically improve virtual machine performance. See “Terrible VirtualBox disk performance (SOLVED)” for details.

2. Use an external USB disk as a virtual machine disk

The performance bottleneck for virtual machines is typically storage devices. If you use an external USB drive, then the performance of the virtual machine is almost equal to the performance of a real computer. For details, see the article “How to boot into VirtualBox from USB”.

3. Move the virtual machine to a faster disk

As already mentioned, the bottleneck in the performance of virtual machines is a virtual disk, its speed directly depends on the speed of the real disk on which the virtual machine is located. When moving a virtual machine from HDD to SSD, you will notice a huge increase in the responsiveness of the virtual machine.

See also: How to move VirtualBox virtual machines to another drive or computer

4. Run virtual machines from different physical disks

If you are working with two or more virtual machines at the same time, place them on different physical disks.

5. Increase the amount of virtual machine resources

Add the number of processor cores and RAM. Unlike the previous tips, which greatly improve performance and can't hurt if you do it right, increasing the number of processors and main memory has little effect on the responsiveness of the virtual machine.

Moreover, if you disproportionately reallocate cores and RAM between the virtual and host machines, you may experience a noticeable slowdown in the entire computer and the virtual machine in particular.

That is, allocate enough resources for the virtual machine on the basis that the host machine must also have enough resources (usually more than the virtual machine).

Conclusion

On different computers, the reasons for the slow operation of virtual machines may be different, but first of all, you need to pay attention to the hard disk, since it is usually the bottleneck in the performance of both modern real computers and virtual computers.

In my practice, on the same computer, the performance of virtual machines varied as follows depending on the hard disk used:

  • the virtual machine is located on the HDD, “Use Host I/O Cache” is disabled: during any long disk operations with files (for example, installing updates), the virtual machine became unusable, or the process stretched for a very long time
  • the virtual machine is located on the HDD, “Use Host I/O Cache” is enabled: the virtual machine is noticeably slower than a real computer, but with heavy disk usage, the virtual machine can still be used. At the same time, the operations of writing and reading to disk have noticeably accelerated.
  • the virtual machine is located on an external HDD connected to the computer via USB: good performance of the virtual machine even with heavy use of the file system. In general, the performance of a virtual machine is only slightly lower than in a real computer.
  • the virtual machine is hosted on an external SSD connected to the computer via USB: the performance of the virtual machine does not differ from the real computer
  • the virtual machine is hosted on an internal SSD (SATA): the performance of the virtual machine is close to that of a real computer
  • the virtual machine is hosted on an internal SSD (NVMe): the performance of the virtual machine does not differ from the real computer

In all these cases, I allocated 2-4 CPU cores and 4-6 GB (for Linux) or 8 GB (for Windows) of RAM for virtual machines.

Adding the number of cores or RAM above the specified values did not lead to any visible changes in normal operation (without running resource-demanding applications). Obviously, if you use memory-intensive or CPU-intensive applications in virtual machines, then adding CPU cores and RAM will improve performance.


Leave Your Observation

Your email address will not be published. Required fields are marked *