[FFmpeg-devel] ffmpeg appears to be wasting CPU time

Davy Durham ddurham at davyandbeth.com
Fri Apr 7 23:26:40 EEST 2023


Ah, you appear to be correct.  I learned about cpufreq and adjusted it 
to not scale and the problem also disappears then too.  I had not even 
considered that.  Thank you

On 4/7/23 11:15, Kieran Kunhya wrote:
> On Fri, 7 Apr 2023 at 05:03, Davy Durham <ddurham at davyandbeth.com> wrote:
>
>> After furiously digging through the ffmpeg code (particularly in older
>> versions that also exhibit the problem, but where the code is simpler) I
>> have found no reason for there to be wasted CPU time.
>>
>> In my travels, I frustratingly noticed that sometime the problem would
>> mysteriously vanish.  And, long story short, I believe I've been chasing
>> a phantom.  If, on my local machine w/ 8 cores, I start a process that
>> simply spins one CPU, the problem vanishes--that is, now whether running
>> ffmpeg at full speed or with a read rate limit, the cumulative CPU
>> reported by 'time' is nearly** the same, as one would expect it to be.
>>
> Are you sure this isn't just your CPU governor and/or the effects of
> frequency scaling/C-states?
>
> Kieran
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".




More information about the ffmpeg-devel mailing list