LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-01-2014, 10:19 AM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Why doesn't kdenlive load my 4 core CPU 100%?


Hi guys. When I render video in kdenlive on my Phenom X4 9650 I specify rendering for all 4 cores (selecting number of threads before hitting "Start rendering" button). But during rendering process all 4 cores are loaded about a half of their resource (as conky shows). Why does it happen? Why doesn't kdenlive use 100% of my CPU even if I make necessary configuration before processing?
 
Old 05-01-2014, 11:48 AM   #2
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by Mr. Alex View Post
Hi guys. When I render video in kdenlive on my Phenom X4 9650 I specify rendering for all 4 cores (selecting number of threads before hitting "Start rendering" button). But during rendering process all 4 cores are loaded about a half of their resource (as conky shows). Why does it happen? Why doesn't kdenlive use 100% of my CPU even if I make necessary configuration before processing?
You mean you set the CPU affinity using taskset?

Regards.
 
Old 05-01-2014, 02:11 PM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
No, I mean this.
 
Old 05-01-2014, 02:18 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quick test,.. if you select 1 cpu and time it, does it take 4x the time it would with all four cpu's selected?

Also, if you select 1 cpu, does it use 100% of the cpu? if you select two does it use 50% on each? if you select 4 does it use 25% a piece?

If so, it seems like the scheduling that they are using in the program itself is causing the odd behavior. Perhaps not suited for multiprocessor usage.
 
Old 05-02-2014, 03:34 AM   #5
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
I may be wrong but I suspect this is the way Completely Fair Scheduler works in Linux. In my 4-core Intel i5, I use 2-3 VMs at the same time but not all the cores go to 100% at the same time. Most of the time they are used like 50-70% each.

Regards.
 
Old 05-02-2014, 04:46 AM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
I use BFS. Does it behave the same way?
 
Old 05-02-2014, 04:58 AM   #7
PrinceCruise
Member
 
Registered: Aug 2009
Location: /Universe/Earth/India/Pune
Distribution: Slackware64 -Current
Posts: 890

Rep: Reputation: 186Reputation: 186
I have no idea how BFS works and what it's implementation is. May be you can try reaching it's maintainer.

Regards.
 
Old 05-02-2014, 05:19 AM   #8
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by szboardstretcher View Post
Quick test,.. if you select 1 cpu and time it, does it take 4x the time it would with all four cpu's selected?

Also, if you select 1 cpu, does it use 100% of the cpu? if you select two does it use 50% on each? if you select 4 does it use 25% a piece?
If I, for example, select 2 cores in that window, it doesn't make the situation any more clear. Estimated time becomes only about 1 minute more and CPU cores are loaded chaotically.

Quote:
Originally Posted by PrinceCruise View Post
I have no idea how BFS works and what it's implementation is. May be you can try reaching it's maintainer.
I guess that's about the only way to find out.
 
Old 05-02-2014, 05:56 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,251

Rep: Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159Reputation: 4159
Very unlikely to be a scheduler issue. I regularly run multiple cores up to near 100% (CFS, not BFS).
If a multi-threaded application can't run cores to (near) 100%, it's usually because:
- it doesn't have the workload to need all those cores, or
- it isn't truly independent when threaded, some resource(s) - mutex, semaphore, shared memory, whatever - is in contention.

Better to talk to the applicaion support than scheduler - at least initially. Latencytop might help spot contention.

Last edited by syg00; 05-02-2014 at 05:57 AM. Reason: typos
 
Old 05-02-2014, 06:40 AM   #10
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Very likely each thread is on a different CPU... But each thread must also perform I/O, and during that delay, the CPU is idle, thus the 50% load.

Try setting to 6 threads... that way more I/O will be overlapped by processing done by other threads.

PS: I think your load should go to 75+%. You don't really want it to go much higher than that as you want to monitor the system as well.

Last edited by jpollard; 05-02-2014 at 06:43 AM.
 
1 members found this post helpful.
Old 05-02-2014, 06:48 AM   #11
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,505

Rep: Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572Reputation: 1572
Quote:
Originally Posted by jpollard View Post
Very likely each thread is on a different CPU... But each thread must also perform I/O, and during that delay, the CPU is idle, thus the 50% load.
I'd tend to agree here. People tend to forget about IO requirements, also your disk, your choice of disks, your raid controller, raid level etc. will all make a difference. For example on a recent "real world" scenario we could decrease an 18+ hour import to 6 hours simply by changing from RAID5 to RAID1+0.

With any software/process it's rather simplistic to hope that using 4 threads will cause the process to run 4 times faster than 1 thread if there's any form of IO involved.
 
Old 05-02-2014, 06:51 AM   #12
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jpollard View Post
Try setting to 6 threads... that way more I/O will be overlapped by processing done by other threads.
I can't do it. If I try to type in some number higher than 4, kdenlive doesn't allow me to do that (nothing is entered).
 
Old 05-02-2014, 06:53 AM   #13
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
I'd tend to agree here. People tend to forget about IO requirements, also your disk, your choice of disks, your raid controller, raid level etc. will all make a difference. For example on a recent "real world" scenario we could decrease an 18+ hour import to 6 hours simply by changing from RAID5 to RAID1+0.

With any software/process it's rather simplistic to hope that using 4 threads will cause the process to run 4 times faster than 1 thread if there's any form of IO involved.
But during the rendering process my HDD led doesn't glow all the time. It blinks. Doesn't it mean HDD I/O isn't loaded 100% also?
 
Old 05-02-2014, 02:59 PM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Mr. Alex View Post
But during the rendering process my HDD led doesn't glow all the time. It blinks. Doesn't it mean HDD I/O isn't loaded 100% also?
It isn't - only about 50% of the time is it actually busy. And it may actually be less as the light takes time to come on, and time to go off after the signal comes in.
 
1 members found this post helpful.
Old 05-03-2014, 02:31 AM   #15
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
jpollard, then what part of PC is loaded 100% during this process?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache 100% CPU load UnrealX Linux - Server 8 02-04-2011 08:04 AM
How to generate 100% CPU load kushalkoolwal Linux - Software 4 08-04-2008 01:09 PM
Why does yelp use 100% CPU load? dongli Linux - Newbie 1 08-02-2008 06:32 PM
CPU load 100% with Firefox. sblantipodi Linux - Software 5 01-23-2008 02:50 AM
CPU Load Always at 100% freddie_leaf Debian 2 09-25-2005 06:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration