"Dynamically added new Virtual segment "question
Posted in 2007
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Platform-Specific Issues
(Reposting, the last one seems to have disappeared!)
IDS9.30HC5, HP-UX11i
One of our hundreds of users has run something that's caused extra
virtual segment allocation.
Background:
The system runs for months on a single Virtual segment of 600Mb, quite
happily day and night with up to 300 connections, all running any one
of the hundred or so 4gl OLTP programs which are the most used; they
generally tend to be enquiry or updates for about a dozen rows, tops
(it's a policy administration system). There's some progs that build
reports, other stuff like that.
Just a couple of times lately, the system has added 6 100Mb (SHMADD
size) segments after which the OS has none left so we get an OS error
report (over a 15-minute period); obviously some user has run a
program or report with a wildcard query that's asked for sort or group
space, yes?
Trouble is, by the time we get the alert, whatever the rogue is has
finished and we can't seem to find out what it was doing it, so we
need to somehow jump in early.
OK, no big deal, I've now set up a cron which will detect the first
new allocation so when it does it again I can be in quick to do some
delving.
What do I do? (and don't start me on onmode -F on HP-UX!!!!!!!!!!)
First off is onstat -g seg to find the address of the new segment, no
problem.
But once I've done that, what's the next move?
I'm guessing onstat -g mem and find out what processes have a pool
starting within that new segment?
Also, there's onstat -g afr when I've found a likely target, but I
don't know what the "memid" identifiers mean
- there's fragman, osenv, sqscb,osenvgentcb and so on but I can't
find definitions for these.
TIA
Malc
> What do I do? (and don't start me on onmode -F on HP-UX!!!!!!!!!!)
> First off is onstat -g seg to find the address of the new segment, no
> problem.
> But once I've done that, what's the next move?
> I'm guessing onstat -g mem and find out what processes have a pool
> starting within that new segment?
> Also, there's onstat -g afr when I've found a likely target, but I
> don't know what the "memid" identifiers mean
> - there's fragman, osenv, sqscb,osenvgentcb and so on but I can't
> find definitions for these.
> TIA
> Malc
Yeah I would agree after you identify a new segment you would want to
look at the onstat -g mem to see which new pool or pools were in the
new segment. However, it could be an existing pool (started in a
different segment) needed more memory which caused the segment to be
added. So this idea isn't fool proof. However, if it is a new pool
in the segment and the pool is associated with a new connection or
user, the name of the pool is/contains the sesion id of the
connection. I would think you would be better off then using onstat -
g ses <sesssion id> and onstat - g sql <session id> to attempt to
determine what this new session is doing, rather then attempting to
look at onstat -g afr. The afr output just shows you how the memory
is being allocated by various portions of the engine code and trying
to work backword from that to what a session is doing would be very
difficult. But the -g ses and -g sql output would show you the SQL a
session is trying to run, which is more what a session would be doing.
If there is no new pool in the -g mem output for the new segment. You
might want get -g ses and -g sql for all currently connected
sesssions, and since you are having more then 1 segment get added,
keep getting onstat -g mem output and then look for pools that have
their size growing as the new segments are added. Then once you can
identify which pool is growing, hopefully it will be a session pool
and you can then look at the collected -g ses and -g sql for that
session and see what SQL had been executed.
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