If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > Affinity Parameters in Onconfig

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-09-03, 02:32
Anu_R Anu_R is offline
Registered User
 
Join Date: Jun 2003
Posts: 38
Thumbs up Affinity Parameters in Onconfig

Hi,

I am using IDS 7.3. My onconfig file for the server has NUMCPUVPS as 8 and no values for AFF_NPROCS and AFF_SPROC (the affinity parameters). Its a multi-cpu system with 8 processors.

I am trying to calculate 'usercpu' (the output of onstat -p). The onstat -g glo and onstat -g sch lists others VPs too.


My query is :
In a multi-processor environment:
How to discover how many processors are being employed? With Affinity turned on, we can count the cpus assigned to the Informix engine using AFFN_PROCS. But, I do not know if those will be the only CPU's employed or not.

Thanks,
Anu_R

Last edited by Anu_R; 07-09-03 at 02:36.
Reply With Quote
  #2 (permalink)  
Old 07-10-03, 07:21
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
There are lots of unix commands to do so.

You can also monitor the sysvpprof table in the sysmaster database.

When affinity is not turned on, all virtual processors (processes) will jump to the physical cpu with the least work to do. If you want them to stick to one physical CPU you will have to turn on affinity.
__________________
rws
Reply With Quote
  #3 (permalink)  
Old 07-10-03, 10:02
Anu_R Anu_R is offline
Registered User
 
Join Date: Jun 2003
Posts: 38
Thanks. But my situation is slightly different. Say I have 8 CPU's. My NUMCPUVPS is 8. I turn on affinity.

Now how do I find which of the 8 CPUs are actually getting involved.

Affinity just ensures that the probability of CPU VPs binding to the assigned CPU is more. The number of CPU vps does not necessarily match the number of CPU which denote the available CPU time. We are not monitoring the CPU vps but CPU usage. Almost all of vps use both user and system CPU time. So the result of onstat -g glo or onstat -g sch is actually not helpful.

The sysvpprof as you mentioned does give the CPU VP and its usage. But does it tell me which is the active CPU? I am trying to think at the hardware level and not at the CPU VP level.

Please suggest.
Reply With Quote
  #4 (permalink)  
Old 07-10-03, 12:06
Roelwe Roelwe is offline
Registered User
 
Join Date: Aug 2002
Location: Belgium
Posts: 534
If you define 8 CPU VP's, all 8 physical CPUs will be used if they are recognized by the OS.
You can only be sure which physical CPU is used if you bind a CPU VP to a physical process. If the affinity is turned of, I think that the OS takes care of the separate processes and decides on which CPU it has to run.

The more CPU VPS you define the more the database can spread the network handling (poll and listen threads) and the sql execution (sqlexec threads).
Every connection results in a thread spawn and is created in a specific CPU VP.
'onstat -g ath' shows you all the threads doing the work and you can immediately see in which CPU VP the thread is created.

I am not sure what you want to do here - or what you want to check. Do you have a CPU tuning issue?
__________________
rws
Reply With Quote
  #5 (permalink)  
Old 07-15-03, 04:54
Anu_R Anu_R is offline
Registered User
 
Join Date: Jun 2003
Posts: 38
Quote:
Originally posted by Roelwe
If you define 8 CPU VP's, all 8 physical CPUs will be used if they are recognized by the OS.
You can only be sure which physical CPU is used if you bind a CPU VP to a physical process. If the affinity is turned of, I think that the OS takes care of the separate processes and decides on which CPU it has to run.

The more CPU VPS you define the more the database can spread the network handling (poll and listen threads) and the sql execution (sqlexec threads).
Every connection results in a thread spawn and is created in a specific CPU VP.
'onstat -g ath' shows you all the threads doing the work and you can immediately see in which CPU VP the thread is created.

I am not sure what you want to do here - or what you want to check. Do you have a CPU tuning issue?
Hi,

I don't remember if I answered your last question. We are trying to deal with processor affinity basically.

I basically need to find: out of 8 CPU's how many CPU's actually got involved in doing some sql execution during the last 5 seconds for example. I need the related pid of CPU, the cpu VP, and the value of usercpu and syscpu for each of the actively involved CPU.

Does this info help?

Thanks,
Anu_R
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On