cpu-vps and number of physical cpus
Posted in 2006
The poster confused NETTYPE with CPU VP configuration, asking whether NETTYPE ipcshm,3,350,CPU implies 3 CPU VPs and how many connections result when CPU VPs are added later with onmode -p. Answers: NETTYPE defines poll threads (and connections per thread), not CPU VPs — those come from NUMCPUVPS/VPCLASS; poll threads differ from listener threads and poll existing connections. Total connections are threads x users (1050), and poll threads aren't reassigned to CPU VPs added at runtime. A later correction noted that if poll threads outnumber CPU VPs, all poll threads run on NET VPs, so separate ONCONFIG files per cluster node were recommended.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: High Availability & Replication, Installation, Setup & Upgrades, Server Administration, Clustering, Grid & MACH11
Hi people,
after following some training on Informix and installing some instances, I'm
still confused about the NETTYPE parameter.
Example : NETTYPE ipcshm,1,350,CPU
This means 1 cpu-vp and maximum (hard limit) 350 connections via shared
memory, right ?
Now I have a cluster, 1 system has 4 cpu's the failover has only 2 cpu's.
Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
(1 reserved for the system).
So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
connections on 3 cpu-vps.
But as the second system has only 2 cpus, 1 only start 1 cpu-vp and once the
instance is online on the main machine, I add 2 cpu-vp dynamically (onmode -p
+2 cpu).
Do I have 350 or 1050 possible connections in this case ?
Can I define more cpu-vp's than the number of physical cpu's ?
Does anyone have a clear explanation ?
Any help would be appreciated.
Thanks,
Jacques
Hi,
don't confuse NETTYPE parameter with NUMCPUVPS parameter.
NETTYPE is for poll threads. Your example specifies
1 poll thread for the onipcshm protocol handling up to 350 connections
and running on a CPUVP.
NETTYPE soctcp,2,150,NETwould specify 2 poll threads for the onsoctcp protocol, each handling
150 connections and both threads running on an (extra) NETVP
(i.e. not on a CPUVP).
This is not about specifying how many CPUVPs you will have on your
system. You configure that using the parameter NUMCPUVPS.
Apart from configuring NUMCPUVPS (which will be effective at
startup), you can add (and remove) CPUVPs during runtime using
the onmode commands. But that will not influence the number of
poll threads or where they run.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Information On Demand Global Conference
October 15-20, 2006, Anaheim, California
see http://www.ibm.com/events/informationondemand
ids-bounces@iiug.org wrote on 09.08.2006 16:48:45:
>
> Hi people,
>
> after following some training on Informix and installing some instances,
I'm
> still confused about the NETTYPE parameter.
>
> Example : NETTYPE ipcshm,1,350,CPU
>
> This means 1 cpu-vp and maximum (hard limit) 350 connections via shared
> memory, right ?
>
> Now I have a cluster, 1 system has 4 cpu's the failover has only 2
cpu's.
> Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
> (1 reserved for the system).
>
> So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
> connections on 3 cpu-vps.
> But as the second system has only 2 cpus, 1 only start 1 cpu-vp and once
the
> instance is online on the main machine, I add 2 cpu-vp dynamically
(onmode -p
> +2 cpu).
>
> Do I have 350 or 1050 possible connections in this case ?
> Can I define more cpu-vp's than the number of physical cpu's ?
>
> Does anyone have a clear explanation ?
>
> Any help would be appreciated.
>
> Thanks,
> Jacques
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
Hi,
I wonder in which case it's reasonable to have more than 1 or 2 NETTYPE poll
threads.
I assume these are listeners to establish a connection.
Once a connection has a session, these threads are no more involved for that
connection. The TCP or ipcsm communcation will no more pass through these
threads.
Or Am I wrong ?
Yves
-----Original Message-----
From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org]
Sent: 09 August 2006 17:39
To: ids@iiug.org
Subject: Re: cpu-vps and number of physical cpus [7249]
Hi,
don't confuse NETTYPE parameter with NUMCPUVPS parameter.
NETTYPE is for poll threads. Your example specifies
1 poll thread for the onipcshm protocol handling up to 350 connections
and running on a CPUVP.
NETTYPE soctcp,2,150,NETwould specify 2 poll threads for the onsoctcp protocol, each handling
150 connections and both threads running on an (extra) NETVP
(i.e. not on a CPUVP).
This is not about specifying how many CPUVPs you will have on your
system. You configure that using the parameter NUMCPUVPS.
Apart from configuring NUMCPUVPS (which will be effective at
startup), you can add (and remove) CPUVPs during runtime using
the onmode commands. But that will not influence the number of
poll threads or where they run.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Information On Demand Global Conference
October 15-20, 2006, Anaheim, California
see http://www.ibm.com/events/informationondemand
ids-bounces@iiug.org wrote on 09.08.2006 16:48:45:
>
> Hi people,
>
> after following some training on Informix and installing some instances,
I'm
> still confused about the NETTYPE parameter.
>
> Example : NETTYPE ipcshm,1,350,CPU
>
> This means 1 cpu-vp and maximum (hard limit) 350 connections via shared
> memory, right ?
>
> Now I have a cluster, 1 system has 4 cpu's the failover has only 2
cpu's.
> Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
> (1 reserved for the system).
>
> So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
> connections on 3 cpu-vps.
> But as the second system has only 2 cpus, 1 only start 1 cpu-vp and once
the
> instance is online on the main machine, I add 2 cpu-vp dynamically
(onmode -p
> +2 cpu).
>
> Do I have 350 or 1050 possible connections in this case ?
> Can I define more cpu-vp's than the number of physical cpu's ?
>
> Does anyone have a clear explanation ?
>
> Any help would be appreciated.
>
> Thanks,
> Jacques
>
>
>
****************************************************************************
***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
****************************************************************************
***
Forum Note: Use "Reply" to post a response in the discussion forum.
*****DISCLAIMER*****
Dit bericht en alle bijhorende zijn uitsluitend bestemd voor de geadresseerde
en vertrouwelijk.
Indien dit bericht niet voor U bestemd is, gelieve dit dan te vernietigen en
de verzender te verwittigen.
Openbaring, vermenigvuldiging, verspreiding en verstrekking aan derden is niet
toegestaan, tenzij anders vermeld.
Aangezien internet de integriteit van dit bericht niet kan verzekeren, kan de
Dienst Vreemdelingenzaken niet verantwoordelijk gesteld worden indien dit
bericht gewijzigd is.
Bezoek onze website: http://www.dofi.fgov.be
----------------------------------------
*****DISCLAIMER*****
Ce message et toutes les pieces jointes sont etablis a l'intention exclusive
de ses destinataires et sont confidentiels.
Si vous recevez ce message par erreur, merci de le detruire et d'en avertir
l'expediteur.
Toute utilisation de ce message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf autorisation
expresse.
L'internet ne permettant pas d'assurer l'integrite de ce message, l'Office des
Etrangers decline toute responsabilite au titre de ce message, dans
l'hypothese ou il aurait ete modifie.
Visiter notre site web: http://www.dofi.fgov.be
Hi,
yes, you are wrong.
The listener threads are the listeners, and (there you are right) they
listen for new connection requests, establish the connection and then
go back to their listening job. They don't stay "involved" with
established
connections.
Poll threads however are a different set of threads.
For each established connection it is necessary to check every so often,
whether there is new input from the connected client. This is especially
true when the client is inactive, e.g. the user is a slow typer like me
... ;)
So each connection has to be polled for new input. With potentially
thousands of concurrent sessions (each having at least one established
connection), this polling is tedious work. Therefore we do not let each
sqlexec thread (which is doing the actual CPU-intensive work for its
session) poll its own connection. Instead we have poll threads that
do the polling of many connections (as many as specified with
NETTYPE) "collectively" for the sqlexec threads. This schema
increases concurrency in the server, especially on multi-CPU
machines.
The rule of thumb is that a poll thread can poll up to 250 connections,
though numbers may vary. So if you want to be able to have 1000
concurrent sessions (i.e. 1000 concurrent connections), then you would
probably specify 4 poll threads to get all the necessary polling done.
Whether you want to run these poll threads in CPU-VPs or in extra
NET-VPs is a different discussion that has been conducted in this
list several times in the past. So for information on that topic please
search the list.
Try "onstat -g ath" on a running system and you'll see (among other
things)
the poll threads and the listener threads as well as on what kind of VP
they are running.
Regards,
Martin
--
Martin Fuerderer
IBM Informix Development Munich, Germany
Information Management
IBM Information On Demand Global Conference
October 15-20, 2006, Anaheim, California
see http://www.ibm.com/events/informationondemand
ids-bounces@iiug.org wrote on 10.08.2006 08:16:47:
>
> Hi,
>
> I wonder in which case it's reasonable to have more than 1 or 2 NETTYPE
poll
> threads.
> I assume these are listeners to establish a connection.
> Once a connection has a session, these threads are no more involved for
that
> connection. The TCP or ipcsm communcation will no more pass through
these
> threads.
> Or Am I wrong ?
>
> Yves
>
> -----Original Message-----
> From: ids-bounces@iiug.org [mailto:ids-bounces@iiug.org]
> Sent: 09 August 2006 17:39
> To: ids@iiug.org
> Subject: Re: cpu-vps and number of physical cpus [7249]
>
> Hi,
>
> don't confuse NETTYPE parameter with NUMCPUVPS parameter.
>
> NETTYPE is for poll threads. Your example specifies
> 1 poll thread for the onipcshm protocol handling up to 350 connections
> and running on a CPUVP.
>
> NETTYPE soctcp,2,150,NET> would specify 2 poll threads for the onsoctcp protocol, each handling
> 150 connections and both threads running on an (extra) NETVP
> (i.e. not on a CPUVP).
>
> This is not about specifying how many CPUVPs you will have on your
> system. You configure that using the parameter NUMCPUVPS.
> Apart from configuring NUMCPUVPS (which will be effective at
> startup), you can add (and remove) CPUVPs during runtime using
> the onmode commands. But that will not influence the number of
> poll threads or where they run.
>
> Regards,
> Martin
> --
> Martin Fuerderer
> IBM Informix Development Munich, Germany
> Information Management
>
> IBM Information On Demand Global Conference
> October 15-20, 2006, Anaheim, California
> see http://www.ibm.com/events/informationondemand
>
> ids-bounces@iiug.org wrote on 09.08.2006 16:48:45:
>
> >
> > Hi people,
> >
> > after following some training on Informix and installing some
instances,
> I'm
> > still confused about the NETTYPE parameter.
> >
> > Example : NETTYPE ipcshm,1,350,CPU
> >
> > This means 1 cpu-vp and maximum (hard limit) 350 connections via
shared
> > memory, right ?
> >
> > Now I have a cluster, 1 system has 4 cpu's the failover has only 2
> cpu's.
> > Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
> > (1 reserved for the system).
> >
> > So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
> > connections on 3 cpu-vps.
> > But as the second system has only 2 cpus, 1 only start 1 cpu-vp and
once
> the
> > instance is online on the main machine, I add 2 cpu-vp dynamically
> (onmode -p
> > +2 cpu).
> >
> > Do I have 350 or 1050 possible connections in this case ?
> > Can I define more cpu-vp's than the number of physical cpu's ?
> >
> > Does anyone have a clear explanation ?
> >
> > Any help would be appreciated.
> >
> > Thanks,
> > Jacques
> >
> >
> >
>
>
****************************************************************************
> ***
>
> > Forum Note: Use "Reply" to post a response in the discussion forum.
> >
>
>
****************************************************************************
> ***
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
> *****DISCLAIMER*****
> Dit bericht en alle bijhorende zijn uitsluitend bestemd voor de
geadresseerde
> en vertrouwelijk.
> Indien dit bericht niet voor U bestemd is, gelieve dit dan te
vernietigen en
> de verzender te verwittigen.
> Openbaring, vermenigvuldiging, verspreiding en verstrekking aan derden
is niet
> toegestaan, tenzij anders vermeld.
> Aangezien internet de integriteit van dit bericht niet kan verzekeren,
kan de
> Dienst Vreemdelingenzaken niet verantwoordelijk gesteld worden indien
dit
> bericht gewijzigd is.
> Bezoek onze website: http://www.dofi.fgov.be
>
> ----------------------------------------
> *****DISCLAIMER*****
> Ce message et toutes les pieces jointes sont etablis a l'intention
exclusive
> de ses destinataires et sont confidentiels.
> Si vous recevez ce message par erreur, merci de le detruire et d'en
avertir
> l'expediteur.
> Toute utilisation de ce message non conforme a sa destination, toute
diffusion
> ou toute publication, totale ou partielle, est interdite, sauf
autorisation
> expresse.
> L'internet ne permettant pas d'assurer l'integrite de ce message,
l'Office des
> Etrangers decline toute responsabilite au titre de ce message, dans
> l'hypothese ou il aurait ete modifie.
> Visiter notre site web: http://www.dofi.fgov.be
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
See below my comments introduced with '-- ':
Art S. Kagel
----- Original Message -----
From: Jacques Lapeire <ids@iiug.org>
At: 8/09 10:54:14
Hi people,
after following some training on Informix and installing some instances, I'm
still confused about the NETTYPE parameter.
Example : NETTYPE ipcshm,1,350,CPU
This means 1 cpu-vp and maximum (hard limit) 350 connections via shared
memory, right ?
-- Not exactly. This means set up a shared memory poll thread in the first CPU
VP and configure enough shared memory communications buffers to support 350
shared memory connections. The actual number of CPU VPs are configured by the
NUMCPUVP parameter or the newer VPCLASS ... CPU parameter which replaced it and
several other older parameters. (Eventually NUMCPUVP will be going away, so one
should start using VPCLASS in 9.40 and later releases).
Now I have a cluster, 1 system has 4 cpu's the failover has only 2 cpu's.
Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
(1 reserved for the system).
-- This is the recommendation in the manuals, yes. However, for cpus faster
than about 450MHZ (or ~700MHZ for Intel processors) you can productively use
all
of the CPUS and even configure 2 or more CPU VPs per physical processor core
(yes that means at least 4 CPU VPs for a fast dual core processor). On some
very fast processors like the Intel and AMD 2GHZ and faster processors users
have seen inproved performance using as many as 4 CPU VPs per core.
So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
connections on 3 cpu-vps.
-- Yes or NETTYPE ipcshm,3,120,CPU to allocate 360 connections across 3 CPU
VPs,
but again, you first have to configure 3 or more CPU VPs using NUMCPUVPS or
VPCLASS (and don't forget to set SINGLE_CPU_VP 0 and MULTIPROCESSOR 1).
But as the second system has only 2 cpus, 1 only start 1 cpu-vp and once the
instance is online on the main machine, I add 2 cpu-vp dynamically (onmode -p
+2 cpu).
-- If you assign NETTYPE more CPU poll threads than there are CPU VPs, then the
engine will use NET VPs instead for those threads which cannot be assigned to a
CPU VP. When you add the other 2 CPU VPs dynamically those poll threads are not
reassigned. (This is a bad thing, BTW, see below for some recommendations
about configuring NETTYPE, BTW)
Do I have 350 or 1050 possible connections in this case ?
-- You have 1050 with 350 handled by the first CPU VP and the remaining 700
handled by 2 NET VPs. The additional CPU VPs are not polling.
Can I define more cpu-vp's than the number of physical cpu's ?
-- Yes, see above.
-- You should be configuring the 3 CPU VPs in the onconfig file and set up the
backup machine to use a different ONCONFIG file tailored to it (simply have the
startup script detect which machine is running it and set ONCONFIG
appropriately
depending on primary or failover). As it stands now you have shared memory
poll threads in NET VPs which is very bad for system throughput. Shared memory
poll threads in NET VPs will spin CPU cycles needlessly reducing the available
timeslices available for the other VPs including the CPU VPs.
Does anyone have a clear explanation ?
-- Read the Informix FAQ for more discussions of these topics.
Any help would be appreciated.
Thanks,
Jacques
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Thank you very much Art.
No one else explained it that way, I got it now !!
Jacques
-----Original Message-----
From: ART KAGEL, .... [mailto:kagel@bloomberg.net]
Sent: donderdag 10 augustus 2006 16:57
To: Lapeire, Jacques
Subject: Re: cpu-vps and number of physical cpus [7254]
See below my comments introduced with '-- ':
Art S. Kagel
----- Original Message -----
From: Jacques Lapeire <ids@iiug.org>
At: 8/09 10:54:14
Hi people,
after following some training on Informix and installing some instances,
I'm
still confused about the NETTYPE parameter.
Example : NETTYPE ipcshm,1,350,CPU
This means 1 cpu-vp and maximum (hard limit) 350 connections via shared
memory, right ?
-- Not exactly. This means set up a shared memory poll thread in the
first CPU
VP and configure enough shared memory communications buffers to support
350
shared memory connections. The actual number of CPU VPs are configured
by the
NUMCPUVP parameter or the newer VPCLASS ... CPU parameter which replaced
it
and
several other older parameters. (Eventually NUMCPUVP will be going away,
so
one
should start using VPCLASS in 9.40 and later releases).
Now I have a cluster, 1 system has 4 cpu's the failover has only 2
cpu's.
Up to now my opinion was , you can use "physical cpus -1" as cpu-vps
(1 reserved for the system).
-- This is the recommendation in the manuals, yes. However, for cpus
faster
than about 450MHZ (or ~700MHZ for Intel processors) you can productively
use
all
of the CPUS and even configure 2 or more CPU VPs per physical processor
core
(yes that means at least 4 CPU VPs for a fast dual core processor). On
some
very fast processors like the Intel and AMD 2GHZ and faster processors
users
have seen inproved performance using as many as 4 CPU VPs per core.
So in this case I could say NETTYPE ipcshm,3,350,CPU which allows 1050
connections on 3 cpu-vps.
-- Yes or NETTYPE ipcshm,3,120,CPU to allocate 360 connections across 3
CPU
VPs,
but again, you first have to configure 3 or more CPU VPs using NUMCPUVPS
or
VPCLASS (and don't forget to set SINGLE_CPU_VP 0 and MULTIPROCESSOR 1).
But as the second system has only 2 cpus, 1 only start 1 cpu-vp and once
the
instance is online on the main machine, I add 2 cpu-vp dynamically
(onmode -p
+2 cpu).
-- If you assign NETTYPE more CPU poll threads than there are CPU VPs,
then
the
engine will use NET VPs instead for those threads which cannot be
assigned to
a
CPU VP. When you add the other 2 CPU VPs dynamically those poll threads
are
not
reassigned. (This is a bad thing, BTW, see below for some
recommendations
about configuring NETTYPE, BTW)
Do I have 350 or 1050 possible connections in this case ?
-- You have 1050 with 350 handled by the first CPU VP and the remaining
700
handled by 2 NET VPs. The additional CPU VPs are not polling.
Can I define more cpu-vp's than the number of physical cpu's ?
-- Yes, see above.
-- You should be configuring the 3 CPU VPs in the onconfig file and set
up the
backup machine to use a different ONCONFIG file tailored to it (simply
have
the
startup script detect which machine is running it and set ONCONFIG
appropriately
depending on primary or failover). As it stands now you have shared
memory
poll threads in NET VPs which is very bad for system throughput. Shared
memory
poll threads in NET VPs will spin CPU cycles needlessly reducing the
available
timeslices available for the other VPs including the CPU VPs.
Does anyone have a clear explanation ?
-- Read the Informix FAQ for more discussions of these topics.
Any help would be appreciated.
Thanks,
Jacques
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
************************************************************************
*******
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Art,
Just need to thwo in one caveat in the whole NETTYPE discussion.
At least in version 9, and 10, and I can check other versions as well, if
#of polls threads is > than number of CPU VP's, we put all the Poll thrads on
the NET type.
eg.
VPCLASS CPU,num=3,aff=1-3,noage
NETTYPE soctcp,4,400,CPU
would mean that all 4 soctcp threads would be NET vp's.
-Mark
Premium Support Analyst
IBM/IM
Mark,
I'm sure I must have posted something to the contrary, or left something out in
some posting, but since you did not include the relevant part(s) of my posting
or of the original posting, I have no idea what your point is?
Art S. Kagel
----- Original Message -----
From: Mark Jamison <ids@iiug.org>
At: 9/18 12:56:32
Hi Art,
Just need to thwo in one caveat in the whole NETTYPE discussion.
At least in version 9, and 10, and I can check other versions as well, if
#of polls threads is > than number of CPU VP's, we put all the Poll thrads on
the NET type.
eg.
VPCLASS CPU,num=3,aff=1-3,noage
NETTYPE soctcp,4,400,CPU
would mean that all 4 soctcp threads would be NET vp's.
-Mark
Premium Support Analyst
IBM/IM
*******************************************************************************
Forum Note: Use "Reply" to post a response in the discussion forum.
Hi Art, I do apologize, as I'm am getting used to this forum's mix of e-mail and a normal forum set up. I was responding to this in a previous post: >-- If you assign NETTYPE more CPU poll threads than there are CPU VPs, then the >engine will use NET VPs instead for those threads which cannot be assigned to a >CPU VP. When you add the other 2 CPU VPs dynamically those poll threads are not >reassigned. (This is a bad thing, BTW, see below for some recommendations >about configuring NETTYPE, BTW) > >Do I have 350 or 1050 possible connections in this case ? > >-- You have 1050 with 350 handled by the first CPU VP and the remaining 700 >handled by 2 NET VPs. The additional CPU VPs are not polling. In reality he would have 1050 connections all handled by 3 NET Vp's. Informix 9 and 10 ,at least, treat the NETTYPE as a binary condition. All are on CPU Vp's or all are on NET, no crossing of the streams so to speak.
Got it, thanks for the update. I may be remembering behavior from way back in 6.01 or I may be getting old. OK, I'm getting old either way. ;-) Art ----- Original Message ----- From: Mark Jamison <ids@iiug.org> At: 9/18 15:29:17 Hi Art, I do apologize, as I'm am getting used to this forum's mix of e-mail and a normal forum set up. I was responding to this in a previous post: >-- If you assign NETTYPE more CPU poll threads than there are CPU VPs, then the >engine will use NET VPs instead for those threads which cannot be assigned to a >CPU VP. When you add the other 2 CPU VPs dynamically those poll threads are not >reassigned. (This is a bad thing, BTW, see below for some recommendations >about configuring NETTYPE, BTW) > >Do I have 350 or 1050 possible connections in this case ? > >-- You have 1050 with 350 handled by the first CPU VP and the remaining 700 >handled by 2 NET VPs. The additional CPU VPs are not polling. In reality he would have 1050 connections all handled by 3 NET Vp's. Informix 9 and 10 ,at least, treat the NETTYPE as a binary condition. All are on CPU Vp's or all are on NET, no crossing of the streams so to speak. ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Related threads
- Posting from the Informix-list
- Migrating from IDS 9.40.UC6 to 11.50.UC3
- Ip for a network session
- questions onstat -g