Handbrake - Unusual core usage when converting media

I’ve started backing up my DVDs for media server purposes, and I’ve noticed that in btop, my AMD Ryzen 7 5700X3D is using C8-C15 primarily, with C0-C7 being lightly used for overflow/additional processing.

My issue is that this still happens when I open up a second instance of Handbrake to rip two discs concurrently; both want to use the second half of my threads, creating a bottleneck. Is this how Handbrake itself generally works, or is it potentially based upon CachyOS’s behavior/configuration?

Running the cachyos repository’s handbrake with the v3 repos, with the linux-cachyos kernel installed, and sched-ext scheduler config’s window is reporting “Running sched-ext scheduler: disabled”. Scheduler profile is set to Auto. System last updated 1-2 days ago.

I’ve never ran handbrake concurrently, from the assumption that working on one task vs swapping is somewhat more efficient, so I don’t know…but I do know that it (at least for me) has typically used up almost all my cpu cycles across all 8 cores. (AMD Ryzen 7 7700X)

You can check if it’s CachyOS or not by using the Arch kernel and reproducing the workload. That said, Arch hasn’t upgraded yet to 6.13 so it’s not apples to apples.

CachyOS is also carrying some preferred core patches that would prioritize moving tasks to higher ranked cores. Although, this should overflow to the remaining cores if the current cores are already tanked. I also believe that using bpfland can help core utilization. Do try that and see if it works for you.

Enabling bpfland did the trick - core usage is now even across the board, and overall utilization is a bit higher. Thank you much!

Multiple reasons for running concurrently:

It only adds about four total minutes to the first disc’s conversion to run a second, so I had plenty of headroom. I save time overall.
I’m doing other tasks while running this, and this is low-priority work if I wander away too long.
The outside temperature got down to -22C last night, so the more watts generated inside, the better :stuck_out_tongue:

I am guessing you are suffering from disk latency (slower SSD or even hard drive), in which case yeah, you have extra cpu cycles available. I don’t :slight_smile:

1 Like

SATA SSD with ZFS, so that’s alleviated :slight_smile: It’s more the case of one instance of Handbrake only using up to 1200% out of 1600% CPU available (and usually hovering in the 700-900% region), so might as well put the rest of it to work! (Also they’re only DVD, so 480p video, which isn’t nearly as complicated to convert as Blu-Ray or 4K video)

My test conversion was at 1080, so it was using all my CPU available.

1 Like