Re: NETTYPE NET/CPU
Posted in 2007
Topics: Networking & sqlhosts Configuration
On Aug 9, 6:50 am, "Art S. Kagel" <art.ka...@gmail.com> wrote:
> On Aug 8, 8:57 pm, mohitanch...@gmail.com wrote:
>
> > Version: IDS 10
>
> 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 fullInformixFAQ (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
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.
> 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 ?
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
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