I am trying to understand NETTYPE better so that we can configure our
connections appropriately and perhaps make it more efficient. My
questions is:
1. Is VP Class NET synonymous to OS's CPU and Vp Class CPU synonymous
to oninit.
2. After reading about Vp Class my understanding is that ipcshm
protocol should be configured for CPU vp class. Is that correct ?
What's the benefit of using one over other
3. And should soctcp protocol be configured for NET vp class. Is that
correct ? What's the benefit of using one over other
4. Also, when I do onstat -g glo I see lot of cpu type virtual
processors having total of more than 100. On IBM's website they
recommend adding one more cpu if total is more than 100, but our
application seems to be fine. So I am little bit confused about this
too.
On 8/8/07, mohita...@gmail.com <mohita...@gmail.com> wrote:
> Version: IDS 10
>
> I am trying to understand NETTYPE better so that we can configure our
> connections appropriately and perhaps make it more efficient. My
> questions is:
>
> 1. Is VP Class NET synonymous to OS's CPU and Vp Class CPU synonymous
> to oninit.
No. All VPs are copies of the oninit process. The CPU VPs are the
VPs that handle regular SQL statements - as distinct from AIO, LIO,
PIO, JVP, MSC, ADM, ADT, NET, etc VPs. NET VPs are tasked with
looking after network connections and i/o only.
> 2. After reading about Vp Class my understanding is that ipcshm
> protocol should be configured for CPU vp class. Is that correct ?
> What's the benefit of using one over other
That's the received wisdom.
> 3. And should soctcp protocol be configured for NET vp class. Is that
> correct ? What's the benefit of using one over other
Opinion diverges on this point. Inside Informix R&D, the preference
is for configuring these on CPU VPs. Outside, there is support for
putting soctcp connections on NET VPs. An advantage of using a NET VP
is that it doesn't have anything else to do than handle network
activity, so it tends to be more responsive.
> 4. Also, when I do onstat -g glo I see lot of cpu type virtual
> processors having total of more than 100. On IBM's website they
> recommend adding one more cpu if total is more than 100, but our
> application seems to be fine. So I am little bit confused about this
> too.
We'd need to know a lot more about your configuration to help here.
Which machine are you on? How many CPUs? What are all those 'more
than 100' VPs types?
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2007.0226 -- http://dbi.perl.org/
NB: Please do not use this email for correspondence.
I don't necessarily read it every week, even.
I'll leave you mostly with Jonathan's entries and just add a bit as
well. For a full explanation of why to use CPU VPs versus NET VPs for
listeners, see my entry on the subject in the full Informix FAQ (not
Jonathan's CDI FAQ) - link on the IIUG WEB site (www.iiug.org).
See below:
> I am trying to understand NETTYPE better so that we can configure our
> connections appropriately and perhaps make it more efficient. My
> questions is:
>
> 1. Is VP Class NET synonymous to OS's CPU and Vp Class CPU synonymous
> to oninit.
> 2. After reading about Vp Class my understanding is that ipcshm
> protocol should be configured for CPU vp class. Is that correct ?
> What's the benefit of using one over other
The CPU VP has work to do so it can only poll the ports for new
connections and for new requests from existing connections when it's
waiting for something to happen. That makes it less than ideal for
network connections, but is a plus for shared memory connections
because a NET VP has to actively poll a shared memory connection which
burns CPU time and OS Kernel time reducing the available cycles for
productive work. Because CPU VPs can only poll periodically all CPU
VPs should be set up with shared memory poll threads for optimal
responsiveness.
> 3. And should soctcp protocol be configured for NET vp class. Is that
> correct ? What's the benefit of using one over other
> 4. Also, when I do onstat -g glo I see lot of cpu type virtual
> processors having total of more than 100. On IBM's website they
> recommend adding one more cpu if total is more than 100, but our
> application seems to be fine. So I am little bit confused about this
> too.
Art S. Kagel
Makes it more clear. However, I have few more questions:
1. If an application runs on the same box as Informix then does it
connect through socket or uses shared memory directly. Reason I am
asking is because in sqlhosts file I see entry one for shm and other
for tcp for same box.
2. Is there a way to see how many CPU vps and NET vps are running and
how it's being used. I tried onstat -g glo but didn't quite understand
how to intepret it.
3. How to determine how many CPU or NET vps to use, assumiing 100
connections created by remote hosts and around 400 on same hosts and
machine having CPU of 10 with 30 GB memory. I am trying to determine
what would be best if we have to acquire new machine.
See $INFORMIXSERVER.
--
Carsten Haese
http://informixdb.sourceforge.net
Some more questions:
1. Do you also recommend running 32bit applications running on same
box as informix connect using 64 Bit. Also is there anything special
we need to configure other than configuring sqlhosts for onscoctcp.
2. When I do onstat -g ath|grep poll I see only one soctcppoll and
bunch of shared memory threads. Should socctppoll threads be more ?
Assuming that there are 400 sessions connecting from the same box as
informix and around 100 from remote machine, what should be the ideal
configuration.
3. onstat -g glo|grep "soc" doesn't shpw anything. Different vp class
I see are cpu, adm, lio etc. Is it good or bad to not have sockets in
the list of virtual processor. I didn't understand this part entirely.
4. Also is there any relation between thread that I see in point 2 and
VP in point 3. How are they related ?
>
> Some more questions:
>
> 1. Do you also recommend running 32bit applications running on same
> box as informix connect using 64 Bit. Also is there anything special
> we need to configure other than configuring sqlhosts for onscoctcp.
Recommend? Not especially, though it will work fine as long as you
don't attempt shared memory connections and do keep 32-bit CSDK in a
different $INFORMIXDIR from the 64-bit IDS. You might get away with
forcing the two to reside in the same $INFORMIXDIR, but I wouldn't try it.
> 2. When I do onstat -g ath|grep poll I see only one soctcppoll and
> bunch of shared memory threads. Should socctppoll threads be more ?
> Assuming that there are 400 sessions connecting from the same box as
> informix and around 100 from remote machine, what should be the ideal
> configuration.
What did you configure? If you said one, or didn't say, then 1 is
enough to be going on with. As you add more concurrent sessions, you
will eventually gather more TCP listener threads.
> 3. onstat -g glo|grep "soc" doesn't shpw anything. Different vp class
> I see are cpu, adm, lio etc. Is it good or bad to not have sockets in
> the list of virtual processor. I didn't understand this part entirely.
If you see tcp, you're fine.
> 4. Also is there any relation between thread that I see in point 2 and
> VP in point 3. How are they related ?
The tcp poll thread is listening for connections in the net VP (if you
placed the tcp listener thread in a net vp). If you didn't specify, you
get some default -- I neither know nor care what the default is since I
explicitly configure such items. If you wish to find out, RTF(abulous)M.
Read more about NETTYPE and have few more questions:
1. What determines the polling cycle of poll thread having class of
CPU VP. You mentioned it polls only periodically. What does it do when
it's not polling ?
2. How do NET VP thread work for the clients that keep persistent
connection to database. Do each persistent connection take one poll
thread ? What happens when client is connected but is not querying or
working on DB.
3. In IBM manual it mentions that each poll thread runs on separate
VP. Is VP synonymous to oninit ? So does it mean total number of poll
threads for shm and tcp combined together in NETTYPE can't be more
than maximum number of VPs.
A poll thread running on a cpu vp will poll at a minimum of once per
second. By default, it will poll, once every 10 thread switches the
cpu vp performs. The number of thread switches can be adjusted via an
env variable (IFX_INPOLL_INTERVAL). When it isn't polling, it's
yielded, waiting to be scheduled to do it's next poll.
> 2. How do NET VP thread work for the clients that keep persistent
> connection to database. Do each persistent connection take one poll
> thread ? What happens when client is connected but is not querying or
> working on DB.
NET VP poll threads poll multiple client connections at a time (well
all poll threads poll multiple connections) but no there is not 1 poll
thread per persistent connection. The number of poll threads created
is solo determined by NETTYPE in your onconfig file. If a client is
connected, but not doing any work, the engine sqlexec thread created
for that client is yielded waiting to be woken, when it has work, and
the thread that would wake it would be the poll thread. The poll
thread polls on that clients connection, and as many other connections
that it is currently responsible for, and when the next work comes in,
it wakes up which ever sqlexec threads the incoming work is for.
> 3. In IBM manual it mentions that each poll thread runs on separate
> VP. Is VP synonymous to oninit ? So does it mean total number of poll
> threads for shm and tcp combined together in NETTYPE can't be more
> than maximum number of VPs.
VP is virtual processor, but yes each VP is an oninit process. Yes,
there can only be 1 poll thread per oninit processes. If your NETTYPE
configuration specifies that both shm and tcp poll threads are to be
run on CPU vps then yes, the combined number of poll threads must be
less then the number of NUMCPUVPS configured in your onconfig. If
either tcp or shm NETTYPE is set to NET, then that would be the number
of net vps that is started when the server is brought online. If you
have tcp and shm NETTYPE set to cpu and the number of poll threads
combined is greater then the number of cpu vps defined by NUMCPUVPS,
the engine will still come online, however, it will push 1 of those
NETTYPEs from cpu to net automatically. There will be a message in
your MSGPATH file stating that the number of poll threads configured
to run on CPU exceeded NUMCPUVPS, and then it will say which
INFORMIXSERVER NETTYPE was pushed off to NET vps.
Jacques Renaut
IBM documentation says that in multiprocess system NUMCPUVPS should
not exceed number of CPUs on the system. Now if nettype is configured
for both NET and CPU class then total oninit process will be more than
NUMCPUVPS, is that ok. for eg: if number of physical CPUs are 10 and
NUMCPUVP is set to 8, and NETTYPE of type NET for soctcp is set to 10
listner threads then total oninit will be 18, which is more than total
number of physical CPUs. Is that ok.
First, only CPU VPs count in the recommendation in the manuals to not
exceed the number of CPU cores less one. Second, that recommendation
was written in the days of 25-50MHZ processors. The Informix user
community started experimenting with configuring the same number of
CPU VPs as cores and then with configuring two or more CPU VPs per
core at about the time that processor speed hit 400 MHZ. In those
experiments, reported here in CDI, it was determined that a 450MHZ
processor from most vendors (and 750MHZ from Intel) would continue to
show improved IDS server performance when NUMCPUVPS exceeded the
number of physical CPU cores up until there were two per core. So if
you have 5 dual core processors (or 10 cores) you can successfully run
with NUMCPUVP or VPCLASS .. CPU set to 20. Lately IB that with
processors in the multi-GHZ range that you can go even further and run
3 or more CPU VPs per core.
Test it. It's the only way to know for sure on your equipment with
your data.
Art S. Kagel
Exactly... Specially because the type of load may influence this quite heavily.
I recently saw a situation where increasing the CPUVPS caused problems.
I'd say that even within the Informix technical community this isn't a peaceful
subject.
Check other factors like the ready queue, cpu usages, user vs system time etc.
--
Fernando Nunes
Portugal
http://informix-technology.blogspot.com
My email works... but I don't check it frequently...
But when NETTYPE is set to NET it spawns different set of oninit,
which is additional set of oninit as compared to the one started by
informix for NUMCPUVPS. So why is there a separate parameter NUMCPUVPS
and why there is no such parameter for NET, something like NUMNETVPS.
I can feel there is some difference for not having something like
this, but I am not exactly sure.
Found that Genero 2.02 applications won't connect through shared
memory, so had to switch to sockets. Then found our ancient version
of ISQL wouldn't connect to sockets so had to upgrade. Thankfully the
previous problems in v7.3x versions have been resolved in the latest
one, it was just a matter of finding the source for all the forms &
reports written by the site themselves to rebuild them...
(in fact one, can't remember which (ACE or PERFORM), would run stuff
compilled on the original version of ISQL, but judged recompiling all
of them as a better option and yes, some of them did produce
compilation errors which had to be fixed)
I am posting it again as this is a separate question:
There is a parameter for NET vps, it's NETTYPE. You control the
number of net vps by the values in your NETTYPE. You get 1 net vp per
poll thread. If you have multiple protocols that you run on NET vps,
you will have a total number of net vps equal to the sum of the number
of poll threads (ie the 2nd parameter in NETTYPE is the number of net
vps that will be created for just that protocol, assuming your last
parameter is = NET, otherwise those poll threads will be run on cpu
vps). You control the number of cpu vps by NUMCPUVPS. The difference
is NETTYPE controls more then just the number of net vps, it controls
where the poll threads run. NUMCPUVPS only controls 1 thing, and that
is the intial number of cpu vps that are brought online when the
instance 1st comes up.
OK, now I get what you don't get. NUMCPUVPS (the original pre-9.21
parameter) and VPCLASS...CPU settings configure the number of virtual
processors (read oninit processES) that are running. This number is
NOT affected by ANY setting of the NETTYPE parameter. Indeed if you
configure more poll threads assigned to CPU VPs than are configured in
NUMCPUVPS / VPCLASS the engine will simply launch NET VPs to handle
the excess over and above NUMCPUVPS. You may ask "But these are all
copies of oninit so aren't they the same?". The answer is "No, they
are not." Once a copy of oninit is assigned to a VP class (ie: CPU,
NET, ADM, MSC, AIO, USER, or whatever) it behaves differently from
oninits assigned to a different VP class and performs different
functions. Only a CPU VP will perform queries against the data, sort
data streams, schedule outstanding requests, etc. Only AIO VPs
perform IOs against COOKED files, etc.
Now, why have two classes of poll thread? One, the NET class,
operates in a separate set of VPs (oninit instance) while the other,
the CPU class, operates as part of one or more of the CPU VP
instances.
Why did Informix (now IBM) bother to have two classes of poll
threads? The thinking was so that the users (ie DBAs) could tune how
the engine polled to adjust responsiveness. Informix originally
recommended that CPU VPs handle network connection polling under the
probable assumption that most user connections would be via network
and having the CPU VP pick up the requests directly and schedule them
immediately was best for throughput. The NET VPs were intended for
when the number of connections exceeded what the CPU VPs could handle
and for shared memory connections which were envisioned to be mostly
for administering the engine.
I REALLY didn't want to go into this again, and feel free to ignore
the rest, but...
The problem with this original thinking is that the CPU VPs cannot
block on the network ports to listen for new requests and new
connections, they have to process existing requests also (their main
job I might say). So, the CPU VP has to poll each port periodically
when it's not too busy processing existing work. That means that the
engine is actually less responsive than it might be. Meanwhile, if
the shared memory connection poll threads are set up in NET VPs, which
have nothing better to do, they cannot block on a shared memory read
there's no mechanism for that, so they have to poll all configured
shared memory connection structures constantly looking for new
requests and connections. This burns CPU cycles that the other VPS
could be using for processing and involves the OS kernel thousands of
system calls per second to latch and release semaphores or global
mutexes. Also bad. Similarly, the CPU VPs polling the ports also
involves loads of system calls. More bad.
Reviewing this logic, which explained why our own systems here were
being inundated with system calls as soon as the Informix engines
started up, and why the the system call overhead was worse when the
systems were idle than when they were running near capacity, I
reasoned that perhaps I should try it the other way around and that
worked. NET VPs listening on the TCP ports can block until there is
data to read and the CPU VP will poll the shared memory connections
far less often then hte NET VPs did. Voila, system call storms
disappeared.
Then I noticed that the one CPU VP that had the shared memory poll
thread running in it, VP #1, was using 80% of the total CPU time that
all of the 10 CPU VPs were using and the second most busy VP was using
only 10% of the total time. That wasn't taking good advantage of the
many processors on the box but was inundating one CPU. So I tried
setting NETTYPE ipcshm to the same number of listeners as there were
CPU VPs in NUMCPUVPS. Poof! Now there was a smooth curve with the
CPU usage spread in a smooth decline from the first VP using about 25%
on down. The system became suddenly much more responsive. Query
times were more consistent because wait time before being placed into
the ready queue was way down.
Art S. Kagel
There is but it is called NETTYPE because you have to configure not
just the number of NET VPS but also
- the type (soc,tli,ipx)
- the initial number of connections that memory should be allocated
for
etc.
It processes your sql.
> 2. How do NET VP thread work for the clients that keep persistent
> connection to database. Do each persistent connection take one poll
> thread ? What happens when client is connected but is not querying or
> working on DB.
No each connection takes one "slot" in the list of connections handled
by the poll thread.
> 3. In IBM manual it mentions that each poll thread runs on separate
> VP. Is VP synonymous to oninit ? So does it mean total number of poll
> threads for shm and tcp combined together inNETTYPEcan't be more
> than maximum number of VPs.- Hide quoted text -
The maximum number of poll threads that run on cpu vps cannot exceed
the number of cpu vps configured.
You can run as many on net vps as you like, check the manual each net
vp can handle 250-300 connections.
Does anyone actually use an IPX connection? That's the Novell SPX/IPX
protocol, just in case you're wondering (and not a typo for IPC).
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
publictimestamp.org/ptb/PTB-1349 ripemd320 2007-09-21 03:00:03
B16A0584F61720A0B8054AFA3861CD77A48DF41115E15A270CFE90AB8DB49D21C6FD12
45BFEB6E4
This explains a lot. We also saw similar gains when we switched to NET
VP for soctcp connections. This brings me to my next question about
KAIO VP.
1. Why are there 2 types of AIO VP.
2. Which one is more efficient
3. Looks like user can't control KAIO VP. So I am not sure how many
Informix will start and what determines this.
4. Also, are AIO VPs used when KAIO VPs are being run by Informix.
Keith
Never saw it being used in Informix... I remember the name from my Novell usage
in the past.
Regards.
What does that mean, please? I know of people using ipcstr connections;
I wasn't asking about that. Do you mean "Not only do I use the SPX/IPX
connections but also the IPCSTR connections too"? Or do you mean "Does
anyone use the ipcstr connections?"?
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
publictimestamp.org/ptb/PTB-1357 whirlpool2 2007-09-22 03:00:04
3844B5CF5EE618158AC5132655743249B9759FB86FB57DB25C4D4C7A0DF193661E7E1C
E04B7BD89398097EAC95BC9BA69000682CBD4298A3548221EB577E46E
If a list of protocols supported are being put forward, then that list should be complete.
Aaah! I see. If the question was putting forward a list of protocols,
then yes, it should be complete. However, I changed the subject when I
asked my question, and I've changed it again now, and the list of
protocols (just one) is complete.
The question I am asking is specifically about one protocol: the SPX/IPX
protocol. Does anyone you know use the SPX/IPX protocol to connect to
IDS? (If so, which platform, client version (CSDK), server version.)
The sub-text is - would anyone notice if it (SPX/IPX support) vanished.
--
Jonathan Leffler #include <disclaimer.h>
Email: jlef...@earthlink.net, jlef...@us.ibm.com
Guardian of DBD::Informix v2007.0914 -- http://dbi.perl.org/
publictimestamp.org/ptb/PTB-1364 tiger 2007-09-23 00:00:04
BAA91975D1E14C49E66C786BE243276C4FB75D98B1C05014
> would anyone notice if it (SPX/IPX support) vanished.
Someone somewhere would.
--
Bye now,
Obnoxio
"I'm astonished anyone pays real money for this crap."
-- Cosmo
"Cluster in my trousers"
-- Guy Bowerman
--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.