This post is a follow up to a recent post in which I compared the ffmpeg video transcoding performance of a number of notebook-, workstation- and cloud server CPUs. Having done that, I’ve wondered a few days later what effect hyper-threading and dual channel RAM have on such a workload. The results are pretty interesting.
One of the notebooks I tested was an HP 17″ notebook with a recent 11th generation Intel i5-1135G7 processor. Despite being a rather cheap notebook (560 euros without operating system, including tax), it comes with the latest Intel CPU on the market today and dual channel RAM, i.e. two RAM slots, both equipped with 4 GB RAM modules. So by removing one module, it’s easy to check what kind of impact a Dual Channel RAM configuration has to such a workload. From a memory perspective, the workload should be rather light. The input file is around 200 MB, while the output file is around 150 MB. My baseline on this notebook is an execution time of 7 minutes 54 seconds and a speedup factor of 6,35 times (see my original article + my note at the bottom for details).
Single Channel vs. Dual Channel RAM
When running the test again with a single memory bank, ffmpeg took 9 minutes and nine seconds to transcode the video. That’s a speedup of 5,95x and hence 20% slower compared to both RAM modules in the notebook. Quite a difference!
Hyper-threading can be switch-off in the BIOS and after a reboot, only 4 instead of 8 CPUs are visible to the operating system. With the default dual channel RAM in the notebook, ffmpeg took 8 minutes and 2 seconds to complete and a speedup of 5,22x. That’s only 6% slower than with hyper-threading being turned on. In other words, for this kind of compute job, it doesn’t do very much.
I’m not sure what I kind of result I expected in the single vs. dual channel RAM comparison, but it’s good to see there is a significant difference. When I buy notebooks in the future for myself, I will make sure that I won’t settle for a single channel option. As far as hyper-threading is concerned, I would have expected a more sizable gain. Perhaps there is for other kinds of workloads.
Note: For unknown reasons the speedup on my HP notebook was 6,05 when measured a few weeks ago. This time around I got a speedup of 6,35 doing exactly the same test. The only difference is that back then I was using an external SSD connected over USB, while this time around I used an internal M.2 attached NVMe SSD. Also, I tried different kernel versions on Ubuntu 20.04 (the stock 5.11 and the latest mainline 5.15) and got exactly the same speedup.