Re: Shared Virtual Memory Question/Engine Shutdown
Posted in 1997
In article <5d8dfb$9au@cssun.mathcs.emory.edu>, Carol Davies
<cdavies@csc.com> writes
>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
^^^^^^^
|||||||
||||||| See Note 1 below.
>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)
16384K as expected.
>
>(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>
The shmat() system call failed with erno = 22 (EINVAL).
>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).
Memory corruption.
>14:28:49 PANIC: Attempting to bring system down
Online says bye,bye.>
>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
All ok here - plenty of swap space
>
>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
>
256Mb phyical memory - not bad.
>According to my math, 8000 (initial) + 114688 (16384 X7) = 122688, which
Note 1: That is only virtual segments!!!
^^^^^^^
|||||||
SHMTOTAL also includes the RESIDENT and MESSAGE portions of shared
memory. Use onstat -g seg to check the size of these. I suspect
with 120Mb in virutal portion and 256Mb of physical memory that
you have say 190Mb-120Mb = 70Mb in the other portions E.g.
30000*2K buffers (=60Mb) + some for messaging/rest of resident
portion.
>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
--
David Williams