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 06-21-2009, 11:35 PM   #1
rehan999
Member
 
Registered: Aug 2007
Posts: 134

Rep: Reputation: 15
Unhappy load balancing


Greetings

I have a linux box with Core-2 Duo 2.4Ghz processor.

If i run an application the CPU load should be equally divided between all the processors.

how?PLease advise

Regards
 
Old 06-22-2009, 12:48 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
Your application should have ability to handle multiple threads, then only all cores handle the load.
 
Old 06-22-2009, 12:50 AM   #3
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,508

Rep: Reputation: 100Reputation: 100
I think most recent kernels does it this way anyway?

On my FC11 system, with gkrellm loaded, you can clearly see that if a demanding application is running, the kernel splits it evenly between the two virtual cores of my P4 HT CPU - in more or less second long intervals, each core takes a turn running the active application...

Hypothetically, I think this means that if you have more CPUs, the kernel will "spread" the application's running even more "thinly" over all of them.

Last edited by rylan76; 06-22-2009 at 12:51 AM.
 
Old 06-22-2009, 01:23 AM   #4
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,275

Rep: Reputation: 148Reputation: 148
And check what is smp (Symmetric multiprocessing), if your application not support with smp then load wont handle by all cores, please if i am wrong correct me
http://en.wikipedia.org/wiki/Symmetric_multiprocessing
 
Old 06-22-2009, 06:41 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.3
Posts: 17,537

Rep: Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420Reputation: 2420
Basically, the current kernels eg 2.6.x will automatically handle multiple cores at the OS level. The load won't be exactly balanced due to the dynamic nature of the workloads, but on average it should even out.
An individual application cannot be split this way unless it was written/compiled with threading as part of the design.
It will however get moved around various cores by the OS.
 
  


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
Load Balancing turbo_acura Linux - Networking 4 01-27-2006 08:44 PM
How to do load balancing tkt Linux - Networking 0 04-27-2005 01:22 AM
Load Balancing otisthegbs Linux - Networking 4 02-10-2005 02:16 PM
load balancing on rh ntaizi Linux - Software 0 12-17-2003 06:41 AM
Load Balancing? gsibble Linux - Networking 3 12-09-2003 10:39 PM

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

All times are GMT -5. The time now is 05:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration