LinuxQuestions.org
Help answer threads with 0 replies.
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 10-21-2015, 03:16 AM   #1
joemon83
Member
 
Registered: Jan 2009
Posts: 71

Rep: Reputation: 11
Multi-core CPU, load sharing


Hi Guys,

I have a basic question here.
If a process is being executed by a processor core and the cpu utilization of that core goes really high, does the process fall back to another core which has less utilization. The process is not a a multi-threaded process. And the OS is RHEL 6 running on a VM.

Regards,
Joemon
 
Old 10-21-2015, 04:02 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Optimally, one process, which uses the computing power of one core completely, does not change the core.

I think, this is done by the kernel load balancing routines.
 
Old 10-21-2015, 04:05 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,952

Rep: Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073
No. Would cause a cache flush for no gain.

All bets are off running under a hipervisor.
 
Old 10-21-2015, 06:35 AM   #4
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Windows switches a single threaded process frequently among idle cores, despite the performance loss from cache effect. I think Linux does also, but I'm less sure. I think the motivation is thermal balance.
 
Old 10-21-2015, 07:11 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885Reputation: 4885
Quote:
Originally Posted by syg00 View Post
No. Would cause a cache flush for no gain.

All bets are off running under a hipervisor.
When I run a high-load single-thread task I can actually see it jumping from core to core on my machine, so I am not quite sure if your statement is correct. Can you elaborate on that?

Last edited by TobiSGD; 10-21-2015 at 09:53 AM. Reason: fixed my nonsense
 
Old 10-21-2015, 08:17 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 20,952

Rep: Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073Reputation: 4073
Welllll .... that's the theory ...

Several years ago I attended a presentation where the speakers had patched the Linux scheduler to better balance core usage. They had analysed process migration across cores/nodes, and reckoned they could do it better.
I waited for the patchset to be released as promised but I never found it. All this was just prior to CFS being merged upstream.

My observations are that the scheduler seems to do a pretty good job, but I admit to not having benchmarked it. Pre-emptable kernel threads and containers have made things a little more obscure too. I have a to-do list that includes some perf analysis of task movement across cores.
 
  


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
[SOLVED] what's the difference between a multi-cpu , multi-core and a multi-thread system ? entz Linux - Hardware 11 12-20-2011 04:49 PM
[SOLVED] Multi-core cpu question stitchman Linux - Hardware 1 10-21-2010 09:19 AM
Multi-Core CPU Load - hlds & srcds (hl1 and hl2) eSport-Eu Linux - Games 3 12-09-2008 05:56 AM
Multi -Core CPU Load Balancing RHEL 5 plemmons Red Hat 5 02-24-2008 04:24 AM
Multi-core CPU Question tntcoder Linux - General 3 06-26-2007 06:54 AM

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

All times are GMT -5. The time now is 01:38 PM.

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