image
image

Go Back   macosx.com > Mac Help Forums > Mac OS X System & Mac Software

Reply
 
LinkBack Thread Tools
  #1  
Old January 24th, 2004, 02:37 PM
Registered User
 
Join Date: Aug 2002
Location: Rochester, NY
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Anthony is on a distinguished road
CPU affinity

On a multi-processor Windows NT based machine you can bring up task manager, look at the list of running processes, right click and use the "Set Affinity" option to tell which processes to use which CPU. I'm wondering if there is something equivalent on OS X so that I could force certain processes to use certain CPUs and override the automatic threading/affinity. Any ideas? Or is it not even possible on the Darwin kernel?
__________________
12" Powerbook 2004 1GHz - 768Ram - 60gb
Powermac 2002 - Dual G4/867 - 768Ram - 0.5TB - Radeon 9000 Pro
Reply With Quote
  #2  
Old January 25th, 2004, 07:32 AM
Cheryl's Avatar
Rosie Moderator
 
Join Date: Dec 2001
Location: Chicago, IL, USA
Posts: 3,389
Thanks: 1
Thanked 12 Times in 11 Posts
Cheryl has a spectacular aura aboutCheryl has a spectacular aura aboutCheryl has a spectacular aura about
Check out the Process Viewer in Utilities.
__________________
Cheryl
Moderator
iMac 20" 2.66 GHz Intel Core 2 Duo
4 GB SDRAM
WD Firewire 160 GB

----------}--@
cheryl@macosx.com
http://web.me.com/ladyfair/Site/Welcome.html
Reply With Quote
  #3  
Old January 25th, 2004, 08:22 AM
Registered User
 
Join Date: Aug 2002
Location: Rochester, NY
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Anthony is on a distinguished road
I've already looked that over but can't find anything to do with affinity.. it doesn't even display information related to which CPU is doing what other than the overall load on each. I also noticed the unix command "pset" is missing from Unix side that would normally let you set the affinity, so I'm thinking maybe Darwin doesn't support on-the-fly changes in this manner. (Its entirely possible, I don't think Linux supports it either without special kernel hacks.)
__________________
12" Powerbook 2004 1GHz - 768Ram - 60gb
Powermac 2002 - Dual G4/867 - 768Ram - 0.5TB - Radeon 9000 Pro
Reply With Quote
  #4  
Old January 25th, 2004, 09:39 AM
and burn
 
Join Date: May 2002
Location: philadelphia
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
crash is on a distinguished road
isn't this also called "nice"? like, you can re-nice a process to allot more cpu? maybe i'm wrong.
__________________
teletran: G4/400 Sawtooth upgraded to 1GHz sonnet; 40GB IDE + 120 GB IDE internal, 10GB SCSI; 1.25GB RAM; Radeon 8500 (128MB DDR); ATi Rage Pro 128 (32MB); OS X 10.4 Tiger; OS 9.2.2

crichton: PowerBook G3 500MHz; 8GB HD; 768MB RAM; OS X Jag 10.4 Tiger; OS 9.2.2

periphery: Intuous Grapphire Tablet; 10GB iPod (2nd Gen); Sony Ericsson T616 Phone; Palm m505; LaCie CD-RW; Epson Stylus Photo 820, some other odds and ends
Reply With Quote
  #5  
Old January 25th, 2004, 09:46 AM
bobw's Avatar
The Late: SuperMacMod
 
Join Date: Mar 2001
Location: Phila,PA
Posts: 8,835
Thanks: 0
Thanked 30 Times in 23 Posts
bobw has a spectacular aura aboutbobw has a spectacular aura about
man nice

http://www.versiontracker.com/dyn/moreinfo/macosx/9473

http://www.versiontracker.com/dyn/moreinfo/macosx/13336

http://www.versiontracker.com/dyn/moreinfo/macosx/13366
__________________

Reply With Quote
  #6  
Old January 25th, 2004, 10:05 AM
Registered User
 
Join Date: Aug 2002
Location: Rochester, NY
Posts: 42
Thanks: 0
Thanked 0 Times in 0 Posts
Anthony is on a distinguished road
Its not the same thing as nice. CPU affinity means selecting WHICH cpu does which thread. Its only something you consider on multiple-cpu machines. Nice changes the priority of a PROCESS. Processes are made up of one or more threads. Affinity is which physical CPU processes which thread. The system kernel automatically distributes threads across multiple CPUs but sometimes it doesn't do the most efficient job.

For example if I'm encoding a large video file (which is something I do quite often, the main reason I'm trying to figure out if this is possible), I could have a thread running for literally 10-20 hours. The thread is assigned to a CPU at the beginning of the task, which might make sense at the time... but after many hours depending on what else I'm doing on my machine it might not make sense to still be running it on that CPU. Its a nerdy nit-picky thing, but it would just be nice to be able to shuffle things around so that I'm getting the most out of the machine when I'm running these really long and intensive tasks.
__________________
12" Powerbook 2004 1GHz - 768Ram - 60gb
Powermac 2002 - Dual G4/867 - 768Ram - 0.5TB - Radeon 9000 Pro
Reply With Quote
  #7  
Old January 25th, 2004, 09:53 PM
and burn
 
Join Date: May 2002
Location: philadelphia
Posts: 101
Thanks: 0
Thanked 0 Times in 0 Posts
crash is on a distinguished road
in that case, an alternate solution might be to take a look at apples xGrid app. if you have multiple macs, it might make sense to let the large time-intensive task be distributed to other machines on your network.though, i suppose if you had a mac sitting around, you wouldn't be asking this question.
__________________
teletran: G4/400 Sawtooth upgraded to 1GHz sonnet; 40GB IDE + 120 GB IDE internal, 10GB SCSI; 1.25GB RAM; Radeon 8500 (128MB DDR); ATi Rage Pro 128 (32MB); OS X 10.4 Tiger; OS 9.2.2

crichton: PowerBook G3 500MHz; 8GB HD; 768MB RAM; OS X Jag 10.4 Tiger; OS 9.2.2

periphery: Intuous Grapphire Tablet; 10GB iPod (2nd Gen); Sony Ericsson T616 Phone; Palm m505; LaCie CD-RW; Epson Stylus Photo 820, some other odds and ends
Reply With Quote
Reply

Bookmarks

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
Copyright 2000-2010 DigitalCrowd, Inc.