Shared Memory Setup.
Posted in 1996
>The type of info I'm looking for is:
>- How to interpret Informix shared memory error messages.
Usually either
a) the server fails to start or 4GL program used shared memory
connection fails to connect
SHMBASE environment variable is set incorrectly in either the
server's
onconfig file / the 4GL's environment variables.
b) the user receives an
"unable to allocate memory for query processing"
when running a query.
or
your online log file talks about unable to allocate shared memory
segment
This means you have hit a kernel limit either
HVMMLIM/SVMMLIM - maximum virtual memory (including shared
memory) which can be allocated to a process.
HDATLIM/SDATLIM - Maximum size of heap for a process.
HSTKLIM/SSTKLIM - Maximum size of stack for a process.
The are hard of soft limits - can't remember the difference - set
them
both the same.
Also check limits of number/size of semaphores/shared memory
segments.
- What to change for many users or large total shared memory, etc.
Up all the above limits also up the size of OnLine's initial shared
memory
segment (SHMVIRTSIZE). You should only have one virtual portion of
shared memory under OnLine for performance reasons.
To monitor this first run onmode -F to free unused segments then
run onstat -g seg and you should see
1) Either one or two segments of class R depending upon your platform.
These are resident shared memory segments. Two if your buffers are
allocated separately on your platform
2) One segment of class M - the message segment used for communicate
purposes.
3) One or more segments of class V these are virtual segments used to
handle SQL processing including sorts. (I know this is vague but
it's
been a long day). You should ideally only have one of these if you
have
more than one looks at the blkused column, add it up and use this
to
adjust your initial segment size. Repeat until you only have one.
- How to detect and avoid clashes between different applications using
shared memory.
This is difficult but any shared memory "operation" uses a unique key
which means applications are unlikely to clash. The only chance
really
is if two OnLine instances are started with the same SERVERNUM in
which case all bets are off and you may well get data corruption.
- Optimisation procedures.
See above.
- Any other useful info.
That's all folks!
Thank you very much
No problemo.