Bug 1038283

Summary: Boinc doesn't load all CPU cores.
Product: [Fedora] Fedora Reporter: Sergejs Svoboda <sparc64>
Component: boinc-clientAssignee: Mattia Verga <mattia.verga>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: cheekyboinc, floydbarber, mattia.verga, mmahut, raphael.brandis, sparc64, xjakub
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: boinc-client-7.2.33-3.git1994cc8.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-16 23:15:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1039258    
Bug Blocks:    
Attachments:
Description Flags
System-monitor screenshot
none
System-monitor screenshot 2
none
CPU usage diagram
none
CPU with/without GPU
none
CPU usage without "CPUShares=2" none

Description Sergejs Svoboda 2013-12-04 19:42:10 UTC
Created attachment 832849 [details]
System-monitor screenshot

Description of problem:
Boinc can't load all 4 cores on my system. Even on freshly installed Fedora 19 or 20 beta.

Version-Release number of selected component (if applicable):
Boinc-client version: 7.0.65

How reproducible:


Steps to Reproduce:
1. Adjust Boinc settings to use all cores, all the time - 100%.
2. Run any single Boinc project.


Actual results:
One core is almost idle all the time.

Expected results:
All 4 cores loaded 100%.

Additional info:
Fedora 17 with Boinc 7.0.29 (Latest from its repository) loads processor cores much better. Almost 100% for all cores all the time.
At least based on standard gnome system-monitor readings.

Comment 1 Sergejs Svoboda 2013-12-04 19:43:29 UTC
Created attachment 832850 [details]
System-monitor screenshot 2

Comment 2 Mattia Verga 2013-12-20 09:28:02 UTC
I cannot reproduce this bug.
Please take a look in the first lines of the "Event log" (open boinc manager and press SHIFT+E). You should see a line starting with "max CPUs used:". What it says?
Also, from the screenshots it seems you're running only one project (Poem) that has a multithreaded app, is that right? It seems there are 4 instances of that project running, so it seems everything ok (if you have a 4 core CPU).

Comment 3 raphael.brandis 2013-12-20 14:17:11 UTC
I had the exact same problem running World Community Grid. Please also take a look at this thread, where there are a couple of users who experienced this bug, all using Fedora:
http://boinc.berkeley.edu/dev/forum_thread.php?id=8715

To make it clear: The log does say "Number of CPUs: 4" and 4 tasks are started, but they only use about 75% of the total CPU time, so that when a task is finished, the figures "Elapsed time" and "CPU time" differ significantly more than usual.

Comment 4 Sergejs Svoboda 2013-12-20 15:02:11 UTC
Number of cores = number of active BOINC tasks.


But, as you could see from my screenshots - 2 cores loaded almost 100%, but remaining 2 cores only ~50% each.
I believe - those tasks using 1 core for both.


Comparing with Fedora 17: its highly visible that Boinc crunch less tasks and CPU temperature is much lower for some cores.
CPU usage graph also shows higher load. (always 100% for all cores)
For now it is unachievable on Fedora 20.

Comment 5 Mattia Verga 2013-12-21 09:07:03 UTC
I noticed that on my system I have high cpu usage by Ksoftirqd when I run boinc (I'm on KDE). This takes a lot of CPU, in F17 it didn't do that.

Maybe it's the same problem for you, if you're using Gnome it's maybe some other process that controls IRQs that eats a lot of CPU.

Can you please look in a console what 'top' command says? Do you see any process not boinc related that eats a lot of CPU (in my case ksoftirqd eats 7% of each core when GPU is not used and 16% of each core when using GPU apps....).

Comment 6 Sergejs Svoboda 2013-12-21 14:00:45 UTC
Created attachment 840027 [details]
CPU usage diagram

You could distinctly see, that most of the time 1 core is idle.

Comment 7 Sergejs Svoboda 2013-12-21 14:21:59 UTC
Of course some other running processes eats CPU ( 4% - 8% ). But anyway, even if this value is 25% - why BOINC doesn't load other 75% ???

Comment 8 Mattia Verga 2013-12-21 15:12:13 UTC
Created attachment 840034 [details]
CPU with/without GPU

I don't know why, but as you can see from my screenshot I have your exact problem with GPU enabled (in the graph you can see that in the first seconds there is always a core idle and three at 100%), but as soon as I disable GPU all four cores become active at 100% and ksoftirqd does not eat CPU cicles anymore.

I'm using boinc 7.2.33 available in updates-testing. Before updating (boinc 7.0.65) ksoftirqd had high cpu usage even with GPU disabled. Please try out the updates-testing version and see if it resolve the problem (but I still think this is something due to how kernel handles CPU load/interrupts rather than a boinc problem).

I opened a bug against kernel about my problem, but seems not to be considered: #1016797

Comment 9 Sergejs Svoboda 2013-12-21 16:50:53 UTC
Didn't help me. 

I enabled "updates-testing" repo and installed all available updates.
Also I added to Boinc "cc_config.xml" configuration file "<no_gpus>1</no_gpus>" line.

Comment 10 Lorenzo Mastrogiacomi 2013-12-27 01:11:43 UTC
Can you try to remove CPUShares=2 from /lib/systemd/system/boinc-client.service ?
Seems to me very low (according with systemd.exec man default is 1024) and I have removed it long time ago

Comment 11 Sergejs Svoboda 2013-12-27 13:59:08 UTC
Created attachment 842342 [details]
CPU usage without "CPUShares=2"

Seems that helped. Now all cores have ~ 100%  load.

Comment 12 raphael.brandis 2014-01-08 18:47:10 UTC
Just tried if the problem does still occur with the new BOINC 7.2.33 packages - it does.
But: Removing CPUShares=2 from /lib/systemd/system/boinc-client.service (as suggested by Lorenzo Mastrogiacomi) indeed solved it for me. Thanks!

Comment 13 Mattia Verga 2014-01-09 16:29:03 UTC
I've already applied the change in rawhide, it will be fixed in the next boinc build.

Comment 14 Fedora Update System 2014-02-07 16:49:01 UTC
boinc-client-7.2.33-3.git1994cc8.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/boinc-client-7.2.33-3.git1994cc8.fc20

Comment 15 Fedora Update System 2014-02-08 05:05:12 UTC
Package boinc-client-7.2.33-3.git1994cc8.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing boinc-client-7.2.33-3.git1994cc8.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-2160/boinc-client-7.2.33-3.git1994cc8.fc20
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2014-02-16 23:15:26 UTC
boinc-client-7.2.33-3.git1994cc8.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.