One of the advertised advantages of renting bare metal servers in the cloud compared to using virtual machines on dedicated or shared hardware is their better performance. That sounds right but how much faster is an entry level bare metal server in a data center with a few CPU cores compared to virtual machines running on servers with high CPU core counts?
Last year I compared the performance of workstations and notebooks I use on a daily basis with the performance of virtual machines on Intel, AMD and ARM processors in the cloud. Have a look there for the details. For the comparison, I used ffmpeg to compress a video, and the main benchmark value I used was how much quicker compared to the original running time of the video the compression task would be. My Nvidia graphics card with an H.264 hardware encoder has a speed-up of 17.6, while my notebook with an AMD Ryzen 4750U processor has a speed-up of 7.56. Virtual machines with dedicated CPU cores in the data center had a speed-up of around 7.5 on an AMD Epyc 7003 platform with 8 vCPUs and around 5 on a somewhat older Intel Xeon platform.
And here are the speed-up values of my bare metal server with an AMD Ryzen 5 3600 with 6 CPUs (12 threads):
- 6 cores, 12 threads on the host (bare metal): 11.7
- VM with 6 cores, 6 threads: 9.34
- VM with 8 cores, 8 threads: 9.37
- VM with 12 cores: 10.24
Based on these values, some interesting conclusions can be drawn:
a) The AMD Ryzen 3600 with 6 CPUs and 12 threads is significantly faster than the Ryzen 4750U with 8 CPUs and 16 threads in my notebook. No surprise here, as the 4750U in the notebook is throttled down very quickly to avoid overheating. The Ryzen on the bare metal server on the other hand can continuously run at full speed.
b) The overhead of virtualization is around 10% (11.7 vs. 10.24).
c) Bare metal and VMs on the platform are significantly faster than VMs on a single server shared with other customers with many CPU cores. That might be due to the exclusive use of memory on my bare metal server vs. memory bandwidth having to be shared among customers running VMs on the same server.
c) From a pricing perspective, the bare metal server is significantly cheaper compared to a dedicated VM setup with a similar, but still inferior performance (from the same data center operator). Currently, my bare metal server costs around 41 euros a month, compared to 83 euros for an AMD 8 vCPU VM with 32 GB of RAM. So the bare metal server is only half the price, it is faster and has twice the amount of RAM. Also, the bare metal server comes with 512 GB (RAID-1) or 1 TB of NVMe SSD storage, compared to 240 GB NVMe disk space of the virtual machine. The advantages of the virtual machine on the other hand are, that the OS is already installed, and that it can be rented on a per minute basis, rather than on a monthly basis, as is the case for the bare metal server.
For once, an almost expected result, except for the significant price advantage, that I did not notice so far!