RE: Shared Virtual Memory Question/Engine Shutdown
Posted in 1997
Hi Carol!
Error 22, is a Unix error indicating hat an invalid argument has been passed,
in DSA terms, it means that the shared memory requested by oninit
cannot be allocated.
1) It is not recommendable for your OnLine system to add virtual segments
as if they were cookies :) , So your initial Virtual Segment must be
enough to accomplish your normal operations.
2) Your SUM is not correct, because SHMTOTAL will include the
size of the RESIDENT , VIRTUAL and the COMMUNICATIONS portions
of shared memory.
3) Check your Kernel Parameters,
SHMSEG is the maximum number of attached shared memory segments
per process. ( DSA uses oninit to allocate more shared memory )
SHMMAX is the operating system wide shared memory maximum segment
size, (in bytes)
SHMALL is the maximum amount of shared memory system wide
4) Increase SHMTOTAL in your onconfig file or set it to zero ( 0 )
I hope this helps,
Take care :)
----------------------------------------------------------------
Mario Estrada / SISTECO, S.A.
INFORMIX Suppor t / Fax (502) 3348447
Department / Phone (502) 3340214
----------------------------------------------------------------
---------------- Reply Separator ---------
----------
De: Carol Davies[SMTP:cdavies@csc.com]
Enviado: martes 4 de febrero de 1997 15:57
Para: informix-list@rmy.emory.edu
Asunto: Shared Virtual Memory Question/Engine Shutdown
Our project site recently received a binary executable from a sister
site which updated approximately 5000 stored procedures. The executable
brought down the engine due to shared memory limitations. When looking
at the data (onconfig, memory on machine, etc. as stated below), the
numbers don't exactly seem to add up and I am wondering if someone could
provide further insight, as I a probably missing something important:
Contents of onconfig as related to shared memory:
SHMBASE 0x30000000 # Shared memory base address
SHMVIRTSIZE 8000 # initial virtual shared memory segment
size (Kbytes)
SHMADD 16384 # Size of new shared memory segments
(Kbytes)
SHMTOTAL 190000 # Total shared memory (Kbytes)
Contents of online.log (paraphrased):
13:14:35 Logical Recovery Started.
13:14:35 dynamically allocated new shared memory segment (size
16777216)
(this is repeated for a total of 7 dynamic allocations). After the 7th
dynamic allocation, there are approximately 25 of the following
messages:
14:28:46 shmat: [EINVAL][22]: shared memory base address illegal
14:28:46 using 0xd0000000, needs 0xffffffff
14:28:46 out of virtual shared memory
which are followed by the engine shutting down with:
14:28:49 mtshpool.c, line 2549, thread 69, proc id 24814, Condition
Failed ((po
ol != NULL && ptr != NULL)), In (mt_shm_free)
Thread(69, sqlexec, 0, 1).
14:28:49 PANIC: Attempting to bring system down
The server memory configuration is as follows:
Virtual paging memory:
>lsps -a
Page Space Physical Volume Volume Group Size %Used Active
Auto Type
paging03 hdisk2 ccmvg 200MB 12 yes
yes lv
paging02 hdisk3 bldvg 200MB 12 yes
yes lv
paging01 hdisk2 ccmvg 200MB 12 yes
yes lv
paging00 hdisk5 pagevg 456MB 5 yes
yes lv
hd6 hdisk4 rootvg 200MB 16 yes
yes lv
Physcal Memory:
>lsdev -Cc memory
mem0 Available 00-0B 32 MB Memory Card
mem1 Available 00-0D 32 MB Memory Card
mem2 Available 00-0F 32 MB Memory Card
mem3 Available 00-0H 32 MB Memory Card
mem8 Available 00-0C 64 MB Memory Card
mem9 Available 00-0G 64 MB Memory Card
According to my math, 8000 (initial) + 114688 (16384 X7) = 122688, which
is less than the onconfig max of 190000, and there is system availble
paging memory, so why the shutdown? The only conceivable reason I can
think of is system virtual paging memory allocated to other system
processes, resources.
Any help would be appreciated.
System is AIX 3.2.5
OnLine Version 7.12.UC1
-----------------
Carol Davies
cdavies@csc.com