This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Multicore utilization is very low

Tags: None
(comma "," separated)
User avatar
farid
Registered Member
Posts
316
Karma
2
OS

Re: Multicore utilization is very low

Thu Feb 18, 2016 11:20 pm
TheDiveO wrote:So I played around with these parameters: removing threads= and keeping real_time=-3 got me around 40% CPU usage, without any visible memory leak. This therefore seems to point towards a problem in ffmpeg, but not in MLT, as the leak as well as CPU load disappeared when removing threads=8.


maybe this is fixed in the latest ffmpeg update.

TheDiveO wrote:For reference: rendering in Kdenlive (thus with real_time=-1) gives me typically around 25% CPU usage, whereas real_time=-3 causes around 40% CPU load. So yes, enabling multithreading within MLT itself improves the situation. Albeit not stellar... :z


this could be turned on by default.


TheDiveO
Registered Member
Posts
595
Karma
3
OS
Just did another project for my day job and used that to compare standard rendering versus rendering without threads= and real_time=-3: I've got 60-78% CPU load compared to 20-25% CPU load for the standard rendering configuraton. This is actually a quite "simple" project with mainly a video track with video and stills, voice over audio, and with a permanent company logo overlay track. Simple, yet benefiting a lot from multi-threaded MLT. :)
kailed1971
Registered Member
Posts
8
Karma
0
HI guys, I'm fighting against "only one core is used" without succes :(

I' ve a system with an old core 2 (E8400 3Ghz - 8Gb ddr3 ram) with opensuse 42,2 and another one with a quad core (athlon 860K@4,2Ghz - 8Gb ddr3 ram), opensuse tumbleweed. Kdenlive, mlt and ffmpeg at the same version (latest stable).

First system 2 core loaded at 100% while rendering.
On the quad core system, one core at 100% and 3 doing nothing >:( Total cpu load always <30%
At the end, same rendering time on both system...

I tried different combinations of threads and real_time but nothing, always one core at 100%. Total load <30%
Same rendering time (2 seconds more/less).

any hints ?

Thanks !
User avatar
acherontic
Registered Member
Posts
10
Karma
0
OS

Re: Multicore utilization is very low

Sat Oct 14, 2017 11:55 am
Hello everybody, I'm facing a similiar issue,

I have a very simple Kdenlive project, one video and one Audiotrack, the sound volume of the video was reduced about -13dB and the audio track was left untouched.

I'm using:
Kdenlive: 17.08.1
Melt: 6.4.1
openSUSE Tumbleweed Kernel 4.13.5-1-default

Running on:
CPU: Ryzen 7 1800X
GPU 2x GTX 1080
RAM: 16GB

=== Raw Datas ===
Video:
Audio Codec: AAC 195 kb/s 48000Hz Stereo
Video Codec: 1920x1080 @60 fps H264/AVC/MPEG-4 AVC/ MPEG-4 Part 10 Pixelformat: yuv420p Bitrate: 48459 kb/s

Audio;
Codec: Vorbis 44100 Hz Bitrate 105 kb/s Audio-Bitrate: 160 kb/s (?? Not sure why there are two differente Bitrates)

Render to: H264/AAC

Here is the code of the sh-script I exportet for rendering:

Code: Select all
#! /bin/sh

RENDERER="/usr/bin/kdenlive_render"
MELT="/usr/bin/melt"

SOURCE_0="file:///home/vortex/Dokumente/scripts/Doom-2_001.sh.mlt"
TARGET_0="file:///home/vortex/Dokumente/Doom-10.mp4"
PARAMETERS_0="-pid:18202 in=0 out=75154 $MELT atsc_1080p_60 avformat - $SOURCE_0 $TARGET_0 properties=x264-medium f=mp4 vcodec=libx264 acodec=aac g=120 crf=23 ab=160k preset=ultrafast threads=16 real_time=-1"
$RENDERER $PARAMETERS_0


Edit: Also Kdenlive seems to use not only one core, it also uses always the same core in Ksysguard its always Core 1, so even if I edit a new Video in another Kdenlive process, it is extremly slowed down by the ongoing render, so also the preview in the editor is now extremly laggy.
Beforhand it was just noticable slow.

Edit2: Just downloaded the AppImage from kdenlive.org of the Version: 17.08.1b, it increased the playback speed and render speed enormous, still low with 18%-30% but usable =) But I'd like still to know, why the multi core processing is still this low =/
And the core load distribution seems to be okay, I can now edit and render at the same time =)

Any ideas? Maybe it has to do with the formats I'm using? Or the Format I want to export to? I tried different settings as well and allways having the issue that melt is only using one single core for rendering =/

Thanks in advanced =)

Last edited by acherontic on Thu Oct 19, 2017 11:00 pm, edited 4 times in total.
User avatar
acherontic
Registered Member
Posts
10
Karma
0
OS

Re: Multicore utilization is very low

Thu Oct 19, 2017 10:33 pm
*bump*
kailed1971
Registered Member
Posts
8
Karma
0
I did a quick test using Phoronix Test Suite, h264 encoding.
e8400 = 41FPS
860k = 87FPS

There's no such difference while rendering with Kdenlive (looking at rendering time) :-\

Daniele
User avatar
bartoloni
Moderator
Posts
1510
Karma
4
OS

Re: Multicore utilization is very low

Thu Nov 02, 2017 12:04 pm
i'm using Kdenlive on Windows (17.08.2) and selecting 4 threads all my 4 cores bump to 85% of use during rendering.
User avatar
acherontic
Registered Member
Posts
10
Karma
0
OS

Re: Multicore utilization is very low

Sun Nov 05, 2017 12:31 pm
Well ... any helpful tips?
I'm pretty sure @kailed1971 and me are not the only ones who faceing this issue.
I know this issue since I'm using kdenlive (about 6 Years now) and also as I tried it on one of my older PCs with windows, it was not maxing out my CPU ... so I'm glad for you you don't have any issues with this but this is not of any help =/

Here some specs I remember running kdenlive in the past
PC1:
AMD Athlon II
GT 8800
RAM: 4GB
OpenSuse: 10.x?
* CPU not maxed out*

PC2:
AMD Phenom X4 II
GT 630
RAM: 8GB
OpenSuse: 11.x - 13.x?
*Not maxed out*

PC3:
AMD FX-8350
GTX 970
RAM: 16GB
Opensuse 13.X - Tumbleweed (4.13.10-1 default) AND Windows 10N Professional
*Not maxed out*

and my most resent PC
AMD Ryzen 7 1800X
2x GTX 1080
RAM: 16GB
OpenSuse Thumbleweed (4.13.10-1 default)

So, it might be an issue form kdenlive or melt running on an AMD CPU? Or the issue is somewehre in OpenSuse?
Please, any help except of "its running fine with my system" etc.

Thanks in advance,
Vortex Acherontic
vpinon
KDE Developer
Posts
708
Karma
6
OS

Re: Multicore utilization is very low

Mon Nov 06, 2017 10:34 am
Explanation of bartoloni's good advice:
increase the encoding threads in render dialog (check "More options" box).
You can also set the MLT processing threads to 2 or 3 in Kdenlive settings, but you should know that the perf boost in not huge, and some effects & transitions are less reliable with multithreading (MLT and/or frei0r) :(
kailed1971
Registered Member
Posts
8
Karma
0
vpinon wrote:Explanation of bartoloni's good advice:
increase the encoding threads in render dialog (check "More options" box).
You can also set the MLT processing threads to 2 or 3 in Kdenlive settings, but you should know that the perf boost in not huge, and some effects & transitions are less reliable with multithreading (MLT and/or frei0r) :(


I tried different combinations of thread and real_time with no luck. Always 1 core at 100% and 3 doing almost nothing. Total cpu load < 30% This also happens while clicking around in the timeline, with only 2 very short video and one wav :(

Daniele.
capslock
Registered Member
Posts
699
Karma
4
OS
Using 3 threads in the settings, I get my hyperthreaded quadcore to a load that varies a lot in value. But often there are 4-6 cores in a usage above 60%. I have GPU processing switched off, maybe that makes the difference.

This is a snapshot of "top" output
Code: Select all
%CPU0  :  57,5/0,7    58[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                                         ]
%CPU1  :  76,0/0,0    76[||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                        ]
%CPU2  :  71,5/0,7    72[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                           ]
%CPU3  :  41,7/0,0    42[||||||||||||||||||||||||||||||||||||||||||                                                          ]
%CPU4  :  11,3/1,3    13[||||||||||||                                                                                        ]
%CPU5  :   0,0/0,0     0[                                                                                                    ]
%CPU6  :   4,6/0,0     5[|||||                                                                                               ]
%CPU7  :  60,7/0,0    61[|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||                                       ]
GiB Spch: 35,0/7,677    [                                   
User avatar
acherontic
Registered Member
Posts
10
Karma
0
OS

Re: Multicore utilization is very low

Mon Nov 06, 2017 10:22 pm
I tried rendering with and with out movit if this is what you ment with GPU on/off =)

I made a few test by using 4, 6, 8 and 16 Threads for processing the video, and the usage is always the same and jumping between 12 - 44% (some times 50%) but most of the time around 25% of the total cpu usage

Some thing I'm a bit curious about .. as I set the threads to 4 ... the utlization sometimes jumpes over 30% ... but as far as I remember ... 16/4 = 4 ... and 100/4 is 25(%) how is it possiblite for melt to jump over 25% when I set the current thread amout to 4 ...

If can deliver you some more useful information, pleas let me know, I like kdenlive a lot, it has a bunch of cool features and works very well while editing and compositing also more complex videos ... but I would like to see the final rendering take more advantage of multi CPU/Thread Systems =)

Here is an actual htop screen from the current utilization while rendering: https://i.imgur.com/j2TgXWe.png
kailed1971
Registered Member
Posts
8
Karma
0
With something like this:
ffmpeg -i a.mp4 -c:v libx264 -crf 23 -c:a libvorbis b.mp4
4 core at 100% !
So, ffmpeg itself is working fine.
Something wrong between kdenlive->Mlt :(

Any hints ?
capslock
Registered Member
Posts
699
Karma
4
OS
Well, there are several ways to max out your CPU. ;-)

mlt does not max it out and that does not mean that there is something wrong between kdenlive and mlt. So, today the answer to the cpu utilization question is as short as this: It is a known issue and it is as it is.
kailed1971
Registered Member
Posts
8
Karma
0
capslock wrote:Well, there are several ways to max out your CPU. ;-)

mlt does not max it out and that does not mean that there is something wrong between kdenlive and mlt. So, today the answer to the cpu utilization question is as short as this: It is a known issue and it is as it is.

But maxed and 25% is a huge difference..
For me is unusable but I agree is a mlt issue. Also happens with shotcut..


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], lockheed, Sogou [Bot]