How to issue a new application to a specific processor?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to issue a new application to a specific processor?
# 1  
Old 07-16-2008
How to issue a new application to a specific processor?

We can use "pbind" to bind a process to a specific processor. But it requires the id of the process to be binded, meaning we have to do the binding after starting that process.

So how can we bind a process to a specific processor while we start that process. Say we are working on a Sun's UltraSparc T1 that has 8 cores and each core supports 4 threads (i.e., we have 32 virtual processors), and we would like to start 32 different applications naming app_0, app_1, ..., app_31 on the available 32 virtual processors. In other word, we hope to do the mapping:
app_0 -> virtual_processor_0
app_1 -> virtual_processor_1
...
app_31 -> virtual_processor_31.

How can we achieve that? Many thanks.
# 2  
Old 07-17-2008
You'll need psrset to dedicate a processor. pbind won't do that.
pbind is what is used to bind a process to a processor. I was under the impression that was what was initially asked. psrset is for multiple processors.

The reason I am not keen on pbind, etc is that on large SunFires that use DR, this causes problems. If a process is bound to a processor, DR fails. On something that can do DR, unlike the 4500 (I know it can be done but why even try as it is bound to fail), this has caused me some heartache in a previous lifetime.

It was very embarressing when you are the Sun Champion for DR and you explain the benefits of DR to customers and then go to show them and it fails. Why did it fail, because someone has bound a process to a processor and I did not check it as it was a scripted DR to give extra processing power during certain times. The script was running in the SC of a 15K so it did not check the processors that were being used in the individual domains. It was bad enough getting passed RT processes.

So, now you know why I don't like it.

the following example binds processes 204 and 223 to processor 2:

#pbind -b 2 204 223
process id 204: was 2, now 2
process id 223: was 3, now 2

If you're askign abt query bindings, then, It demonstrates that process 1 is bound to processor 0, process 149 has at least one LWP bound to CPU3, and process 101 has no bound LWPs.

#pbind -q 1 149 101
process id 1: 0
process id 149: 3
process id 101: not bound

Querying LWP Bindings
The following example queries bindings of LWPs. It demonstrates that LWP 1 of process 149 is bound to CPU3, and LWP 2 of process 149 is not bound.

# pbind -q 149/1-2
lwp id 149/1: 3
lwp id 149/2: not bound
# 3  
Old 07-17-2008
Thanks for your reply incredible.

But I guess this does not completely solve the problem. My question is how to bind a process to a processor right after the process is STARTED rather than binding it after a while using its process id?

Say what we would like to do is to start running "app_1" at "virtual_processor_1" right after we type "app_1" at terminal. Rather than looking at the process id of "app_1" and binding it after it has been started, how can we bind it at the beginning?
# 4  
Old 07-17-2008
Then I guess you should come out with a script to automate that for you. By default, you can't do that with whatever functionality/commands that are availableSmilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue deleting all lines (having a specific string) in a file

I'm trying to create a script. There are 2 files - fileA.log & fileB.log fileA.log has the below data : aaaa cccc eeee fileB.log has the below data : cjahdskjah aaaa xyz jhaskjdhas bbbb abc ajdhjkh cccc abc cjahdskjah ... (7 Replies)
Discussion started by: Pandee
7 Replies

2. Shell Programming and Scripting

Del Line if specific issue

HI Guys I have below input : PO 121255 SorkO_RM_,rlsmel=310_410_3_11104_43831 PO 125564 SorkO_RM_,rlsmel=007G43823 I want delete line which have "_" after = Sign Output : PO 125564 SorkO_RM_,rlsmel=007G43823 (2 Replies)
Discussion started by: pareshkp
2 Replies

3. UNIX for Dummies Questions & Answers

Help for processor

hello Admins, how to find number of processor in unix machine. (2 Replies)
Discussion started by: vipinkumarr89
2 Replies

4. AIX

hacmp application startscript issue

Hi, I am setting up a hacmp oracle cluster with 2 resource groups - one on each node. Binaries are local - so is configuration but its the same on both nodes - so are the startscripts. If I start the cluster, each DB comes up nicely on its homenode. Now I have the problem that when I... (1 Reply)
Discussion started by: zxmaus
1 Replies

5. Shell Programming and Scripting

m4 processor (how to use)

hi, what plugins i need to install to run m4 processor in bash shell. Also, what is the file extension for m4 processor ( like .cc in c ). Thanks (1 Reply)
Discussion started by: Learnerabc
1 Replies

6. AIX

Processor and processor core

Guys... Hows it going??? I have been going through the hardware spec of IBM system p systems.. and here i am confused for IBM Power 520 Express it says Processor cores: One, two or four 64-bit 4.2 GHz POWER6 with AltiVec™ SIMD and Hardware Decimal Floating-Point acceleration ... (1 Reply)
Discussion started by: balaji_prk
1 Replies

7. Solaris

how to bind an application to specific ip

Hello Dear Everyone. Have you Gurus perhaps got an idea how to bind a particular application/program to specific IP address on solaris box? Assume there is a server with two NICs with distinct IPs, I install an application (could be a backup sowftware client) and would like to tell to the... (6 Replies)
Discussion started by: togr
6 Replies

8. AIX

LPAR processor/virtual processor settings

Question is on setting of Physical and Virtual processors for LPARs to make proper use of virtualization capabilities. Environment is a 8-way p570 with 4 LPARs. lparVIO1 and lparVIO2: AIX 5300-04-01 Mode/Type= Shared-SMT/Capped Minimum Processors= 0.10 Desired Processors= 0.50 Maximum... (1 Reply)
Discussion started by: guttew
1 Replies

9. AIX

Issue while installing a Application on AIX

All, I am trying to install a application called Microstrategy on AIX 5.1 box.This is the first time I am working on AIX.The installation fails after some 10% complete.Given below is the text from the installation log file.Do any one of you have any idea what might be the problem? (Jan 19,... (8 Replies)
Discussion started by: apu78
8 Replies
Login or Register to Ask a Question