Limiting CPU usage in the Windows version

HandBrake for Windows support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
leopard20
Posts: 2
Joined: Wed Feb 01, 2017 6:55 am

Limiting CPU usage in the Windows version

Post by leopard20 »

Handbrake uses a lot of CPU resources. Is there a way to limit the CPU usage, or the number of core it uses(like -threads commandline)?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Limiting CPU usage in the Windows version

Post by Woodstock »

Handbrake sets its priority lower than normal to allow better system response, but it will use whatever resources it is given.

You can tell your operating system to limit its "affinity" (limit how many cores are available), and you can tell x254 to limit its threads (an option that can be passed as an "Extra option" on the Video tab), but these will slow the conversion down.
leopard20
Posts: 2
Joined: Wed Feb 01, 2017 6:55 am

Re: Limiting CPU usage in the Windows version

Post by leopard20 »

Actually, I did try the affinity option. The difference between letting the program use 8 threads and letting it use 4 thread is merely 4 seconds! (for a 2 minute task). So IMO the program is wasting my computer's resources, not utilizing it.
rollin_eng
Veteran User
Posts: 4840
Joined: Wed May 04, 2011 11:06 pm

Re: Limiting CPU usage in the Windows version

Post by rollin_eng »

Could you please post your logs, instructions can be found here:

viewtopic.php?f=6&t=31236
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Limiting CPU usage in the Windows version

Post by Woodstock »

The problem with your measurement is that limiting it to "4 threads" did not limit it to "2 cores". When you're using a 4-core CPU with Hyper Threading (HT), 8 threads uses all 4 cores and does thread swapping on each core. But 4 threads is still likely to use all 4 cores... Just no thread swapping, except when other tasks want time. HT may have lower overhead than a full CPU context switch, but there is still only so much CPU to use.

There would be a much bigger difference on a CPU that doesn't use HT (AMD or some Intel CPUs), where threads=cores.
Post Reply