-1

I'm encoding video in 6 instances of Handbrake, but CPU usage is never above 85%. Why is this/how do I diagnose the issue?

mvv
  • 3
  • 1

2 Answers2

0

The kernel will pause cpu usage as it is waiting on the device either reading or writing data. All those processes will eventually stall while the current device operation is still running.

Bib
  • 2,056
  • 1
  • 4
  • 10
0

All non-interactive computation jobs eventually find bottlenecks, where some resource is at 100% utilization and prevents other resources from being fully used.

The typical resources involved here would be cpu, bus bandwidth, memory bandwidth, and disk bandwidth. There could be more (e.g., gpu utilizaton, gpu bandwidth) if your system is more complicated. Also, bus bandwidth and memory bandwidth might be the same.

Also, disk I/O and cpu use may be interdependent, such that cpu work can't begin until data has been loaded from disk, and disk writes don't start before the cpu has finished computing new data. In this case, attempts to predict future reads (possibly with application help) and prebuffering data, or starting new computation before data has been fully written may help performance. Alternately, running multiple instances that are not interdependent may allow one instance to use cpu while another is doing disk I/O.

If you are only getting 85% cpu utilization, likely either disk bandwidth is at full utilization, or there is not enough disk buffering and the cpu is running out of work. In linux, you can use tools like atop to check your disk bandwidth. If it is not already at 100% you can try adding another instance and hope that parallel use of the cpu and disk in separate instances will cover up the gap. But possibly it won't and this might not make things faster.

user10489
  • 5,834
  • 1
  • 10
  • 22