Shared Memory Problems
Posted in 1997
Hi,
We have been having strange problems with Informix.
We are using Informix 7.2 DS UC and we are running
SVR4 OS on an SMP5400 (5 processor, 1.4 TAKE 26) Unix box.
System memory is 128MB.
Could somebody help us out ?
Problem List :
___________________________________________________________
#1.Online runs for about 3 hrs (roughly) and then the
online.log says "shmat(ENOMEM) check system MAXMEM"
We found out that Informix allocates about 8000 KB
in Shared Memory when we start it up.This probably
is because the Non Res. SegSize in the Shared
Memory Parameters screen was set to 8000KB.We reduced
this to 200KB. We also the changed the Add SegSize
from 8192KB to 1024KB.
After doing this Informix on startup allocated 200KB
for Non Res. SegSize and then started dynamically
allocating shared memory 1024KB at a time. This went
on for about 10 new Shared Memory segments, after which
again memory allocation failed and now it said check
system SHMSEG value.
What we do not understand is, Informix keeps adding new
shared memory segments and after a while says check
system MAXMEM ? This is irrespective of any configuration
we try. At some point or the other memory allocation fails.
Ours is a Stored Procedure Intensive application and the
memory allocation fails more frequently when we execute
some large stored procedures.Also, we noted addition of
new shared memory segments are dependent on how often
we use our stored procedures.
Is there a parameter to allocate memory and tune
the usage of these stored procedures ?
Is there anything wrong with our configuration ?
Do we need any extra Informix patch for the SVR4 version?
Do we not have enough system resources out here ?
Once Informix could not even shutdown properly when we got the above
error message and it kept writing " 16:00:43 Assert Failed: Condition
Failed (Bad memory pointer 0x0), In (mt_shm_free) 16:00:43 Who:
Session(18, informix@msp6k550, 28739, 0) Thread(43, sqlexec, 0, 1)
16:00:43 Action: Please notify Informix Technical Support. 16:00:43 See
Also: /tmp/af.2b1c41 "
infinitely in the online.log. So we had to kill informix
processes manually.
___________________________________________________________
#2.When we try to start up Informix after shutting down mostly it fails
saying " 16:13:30 Event alarms enabled. ALARMPROG =
'/opt/informix/log_full.sh' 16:13:31 DR: DRAUTO is 0 (Off) 16:13:31
listener-thread: err = -25572: Network driver cannot bind a name to the
port.
16:13:31 Attempting to bring listener thread down
16:13:32 PANIC: Attempting to bring system down"
We figured that the port was not freed when we
shut Informix down and if we waited for sometime
Informix gets started up again. If it is a transient
condition why does Informix try to PANIC and bring
the entire system down?
___________________________________________________________
#3. Whenever we issue a "system " command in a stored
procedure and the system command fails the stored
procedure raises an exception. The Informix documentation
says the ISAM code contains the exit code of the system
command executed but we found the ISAM code is always
"-172". And finderr tells us that this is an Informix
internal error.
--COPY OF OUR MTUNE FILE
* ident "$Id: mtune,v 1.50 96/01/31 14:28:08 grouper!cth Exp $" * *
Copyright (c) 1990, 1991 UNIX System Laboratories, Inc. * Copyright
(c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T * All Rights Reserved * *
THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF * UNIX System
Laboratories, Inc. * The copyright notice above does not evidence
any * actual or intended publication of such source code. * *
Copyright (c) 1987, 1988 Microsoft Corporation * All Rights
Reserved * * This Module contains Proprietary Information of
Microsoft * Corporation and should be treated as Confidential. * *
Copyright (c) 1987, 1988 Microsoft Corporation * All Rights Reserved * *
This Module contains Proprietary Information of Microsoft * Corporation
and should be treated as Confidential. * *ident "@(#)master:mtune
1.3.5.7" * * Some of the parameters listed in this file are dynamically
* configured by the system and hence changing those parameters * in this
file does not affect the performance of the system. * They are listed
here strictly for backward compatibility reasons. * Please refer to the
System Administration Guide for more details. * * FORMAT... * NAME
DEFAULT MIN MAX * * General Kernel Parameters
------------------ * TRACESZ 8192 4096 8192 NCPU
10 1 32 NCALL 60 30 32767 NFILE
150 100 800 NMOUNT 25 25 25
NPROC 400 50 2000 NREGION 210 210
350 NCLIST 120 1 400 MAXUP 60
15 32767 NOFILES 60 20 800 NHBUF
128 32 1024 NPBUF 20 20 400 NAUTOUP
60 0 1200 FDFLUSHR 1 1 1 BDFLUSHR 1
1 1 NSLEEPQ 59 41 1013 MAXPMEM 0
0 1048576 SHLBMAX 3 2 6 FLCKREC
300 100 2000 PUTBUFSZ 4000 2000 20000 MAXSLICE 100
25 100 ULIMIT 3072 2048 12288 SPTMAP
2000 1000 30000 PIOMAP 50 50 50 PIOMAXSZ
64 4 64 MAXMINOR 32768 255 0x3ffff NGROUPS_MAX
16 1 16 NBUF 100 100 3000 BUFHWM 0
0 32767 ARG_MAX 10240 1024 51200 RSTCHOWN 0
0 1 OEMREBOOT 0 0 1 * * File System Parameters
--------------- * NINODE 512 100 1300 NS5INODE 500
100 3400 UFSNINODE 600 100 6200 NDQUOT 200
100 400 NRNODE 300 100 1300 S52KNBUF 100
100 400 S52KNHBUF 32 32 256 * * Paged Pipe Buffers Per
Process ----------------- * NPBPERPROC -1 -1 5 * * Paging
Parameters ----------------- * VHNDFRAC 16 8 32 AGEINTERVAL
9 2 100 MINPAGEFREE 25 25 50 GPGSLO
25 0 25 GPGSHI 40 1 40 GPGSMSK
0x00000420 0x00000420 0x00000420 MAXSC 1
1 1 MAXFC 1 1 1 MAXUMEM 2560
2560 32768 MINARMEM 35 25 40 MINASMEM 35 25
40 MINAKMEM 16 4 64 MINHIDUSTK 4 4 32
MINUSTKGAP 2 2 32 PAGES_UNLOCK 200 200 200 * *
STREAMS Parameters ---------------- * NSTRPUSH 9 9 10
STRMSGSZ 0 0 32767 STRCTLSZ 1024 1024 1024
STRTHRESH 0 0 0x1000000 NLOG 10 3 16
NUMSP 32 5 50 NUMTIM 128 1
512 NUMTRW 64 1 512 NUMSAD 8
1 16 NSTRPHASH 64 16 512 NAUTOPUSH 32 32
32 * * Message Parameters --------------- MSGMAP 200
10 32767 MSGMAX 2048 512 32768 MSGMNB
0x8000 4096 0x80000 MSGMNI 50 2 32767 MSGSSZ
16 8 32767 MSGTQL 256 40 32767
MSGSEG 4096 1024 32767 * Semaphore Parameters
------------- SEMMAP 25 10 32767 SEMMNI
25 10 32767 SEMMNS 60 60 32767 SEMMNU
30 30 32767 SEMMSL 25 25 32767
SEMOPM 10 10 32767 SEMUME 10 10
32767 SEMVMX 32767 32767 32767 SEMAEM 16384
16384 16384 * * Shared Memory Parameters ---------- SHMMAX
524288 131072 2147483136 SHMMIN 1 1 1 SHMMNI
10 10 1000 SHMSEG 10 6 300
SHMALL 0x20000 256 0x80000