Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Mathematics
General TopicsResearchOperations ResearchStatisticsMathematical LogicNumerical AnalysisUndergraduate MathAlgebra HelpRecreational Math
Math Software
MapleMathematicaMATLABScilabSASSPSS

Math Forum / Math Software / MATLAB / July 2009



Tip: Looking for answers? Try searching our database.

CPU Core Usage

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andrew - 28 Jul 2009 17:00 GMT
I'm trying to figure out how I can assign a ML session to explicitly use a given number of CPU cores.  For example, if I have 4 cores c1, c2, c3 and c4 and two ML sessions m1 and m2 how can I designate m1 to use only c1 and c2 and m2 to use only c3 and c4.  It seems like ML uses whoever and whatever is first available.  This probably doesn't make any difference but if I have a process that is using 25% of one of the cores I want to make sure ML doesn't touch that core.

maxNumCompThreads only specifies how many cores that session is allowed to use which is why I'm asking how I can take this a step further and assign the session its own core.
Ashish Uthama - 28 Jul 2009 17:10 GMT
> I'm trying to figure out how I can assign a ML session to explicitly use  
> a given number of CPU cores.  For example, if I have 4 cores c1, c2, c3  
[quoted text clipped - 7 lines]
> to use which is why I'm asking how I can take this a step further and  
> assign the session its own core.

I would expect this control to be with the OS rather than the application.

In Windows, you can set the processor affinity for a particular process  
using the task manager if you so want. I would suggest leaving the load  
balancing to the OS in most cases.
Stan Bischof - 28 Jul 2009 17:12 GMT
> I'm trying to figure out how I can assign a ML session to
> explicitly use a given number of CPU cores.  For example, if
> I have 4 cores c1, c2, c3 and c4 and two ML sessions m1 and
> m2 how can I designate m1 to use only c1 and c2 and m2 to use
> only c3 and c4.  It seems like ML uses whoever and whatever
> is first available.  This probably doesn't make any

This is normally handled by the OS, not the application.

So- to do what you want you'll most likely need
to dig out the correct kernel calls to assign the
processes to specified cores. Not that second-guessing
the OS could turn into a real can of worms since your
algorithm for choosing resources is most likely
not as good as what the OS already has, but it
is certainly doable.

Whatever you OS, look for system calls related to
processor affinity.

Stan
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2010 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.