Bug 1902818 - kernel 5.9 - video decoding performance dropdown
Summary: kernel 5.9 - video decoding performance dropdown
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 33
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-11-30 18:57 UTC by Václav Nováček
Modified: 2021-02-10 17:25 UTC (History)
19 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-02-10 17:25:25 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
dmesg (145.83 KB, text/plain)
2020-11-30 18:57 UTC, Václav Nováček
no flags Details

Description Václav Nováček 2020-11-30 18:57:04 UTC
Created attachment 1734937 [details]
dmesg

1. Please describe the problem:
There is performance dropdown (about 50%) since kernel 5.9.x while scaling video on Intel i3-4130T cpu.

2. What is the Version-Release number of the kernel:
5.9.10

3. Did it work previously in Fedora? If so, what kernel version did the issue
   *first* appear?  Old kernels are available for download at
   https://koji.fedoraproject.org/koji/packageinfo?packageID=8 :
5.9.7

4. Can you reproduce this issue? If so, please provide the steps to reproduce
   the issue below:
ffmpeg -i fullhd_video.mp4 -benchmark -s 1280x720 -pix_fmt yuv420p -c:v rawvideo -f null -

on 5.8.18 -s parameter has almost no influence

5. Does this problem occur with the latest Rawhide kernel? To install the
   Rawhide kernel, run ``sudo dnf install fedora-repos-rawhide`` followed by
   ``sudo dnf update --enablerepo=rawhide kernel``:
YES

6. Are you running any modules that not shipped with directly Fedora's kernel?:
no

7. Please attach the kernel logs. You can get the complete kernel log
   for a boot with ``journalctl --no-hostname -k > dmesg.txt``. If the
   issue occurred on a previous boot, use the journalctl ``-b`` flag.

Comment 1 Václav Nováček 2020-12-01 07:25:12 UTC
Seems like ffmpeg problem, tried latest git build, it has slightly better results on 5.9.x comparing to 5.8.x.
Sorry for bothering.

Comment 2 Václav Nováček 2020-12-01 07:34:52 UTC
(In reply to Václav Nováček from comment #1)
> Seems like ffmpeg problem, tried latest git build, it has slightly better
> results on 5.9.x comparing to 5.8.x.
> Sorry for bothering.

My mistake, not true, problem still persists, adding -s or -pix_fmt parameter has big influence to the performance on 5.9.x comparing to 5.8.x.
Still not sure, where the problem is. The video source is tcp rtsp stream from ipcamera.
Decoding file from disk has similar results on 5.9.x and 5.8.x.

Comment 3 Václav Nováček 2021-01-20 08:38:56 UTC
Performance problem still persists on kernel 5.10.x
What can be the problem? I don't believe it's ffmpeg.

Comment 4 Václav Nováček 2021-01-20 08:43:50 UTC
I have tested it on another computer with different hardware (Intel, AMD+nVidia), same problem. It's not related to CPU or GPU. It's the kernel itself.

Comment 5 Václav Nováček 2021-01-20 09:02:28 UTC
here are cpu consumptions of the ffmpeg process for comparison

kernel 5.8
-s 1280x720 -pix_fmt yuv420p ... about 23% cpu usage of single core

kernel 5.9, 5.10
-s 1280x720 -pix_fmt yuv420p ... about 70% cpu usage of single core
-s 1280x720 ... about 50% cpu usage of single core
only decoding ... about 25% cpu usage of single core

it's very simillar on Intel and AMD as well
tested on the latest dev build of ffmpeg

Comment 6 Václav Nováček 2021-02-10 17:25:25 UTC
It turned out that kernel 5.9+ switched from ondemand to schedutil governor and therefore performance results differ.
Switching back to ondemand fixed it.


Note You need to log in before you can comment on or make changes to this bug.