Fwd: SHARED MEMORY ISSUE - SORRY FOR DIRECTLY ASKING THIS..
Posted in 2004
Topics: Storage & Space Management, Server Administration, Transactions, Locking & Isolation, Logging & Checkpoints, Networking & sqlhosts Configuration, Platform-Specific Issues
I'm posting this to CDI and the Linux List for Julia who's having a problem the
list may be able to help with. Please include her address (below) in you reply:
Art S. Kagel
----- Original Message -----
From: Julia M <juliamrus@YAHOO.COM>
At: 10/ 5 22:25
<SNIP>
I am trying to increase shared memory setting on our
server running on a DELL poweredge 6650 with 4GB RAM
and linux 2.4 (enterprise).
For some reason if I set the buffers value to anything
morethan 700000 it crashed saying can't allocate
shared memory.
Here I don't want to increase the Virtual segment but
the Buffers.
I tried the following SHMMAX values but Informix
doesn't seems to like any of the values set through
sysctl.conf during the server bootup.
#kernel.shmmax = 33554432 - release note value
#kernel.shmmax = 134217728
#kernel.shmmax = 2*536870912
(all above values failed with more than 700000
buffers)
SHMBASE 0x50000000 # Shared memory baseaddress in onconfig -
(release note says this should be set to 0x1000000L.
But when you do that you can't allocate shared memory
more than 700 MB)
kernel.shmmax = 536870912 (current value)
kernel.shmmin = 1
kernel.shmmni = 128
kernel.shmseg = 128
kernel.semmns = 4096
kernel.semmnu = 4096
kernel.semume = 32
kernel.semmap = 4096
kernel.semmsl = 100
I have no clue why It can't go beyond the shared
memeory value of 1896000 KB (When buffers value set
above 700000).
What am I missing here??
Any answer to this is much appreciated.
I have included the cat /proc/meminfo, onconfig and
online.log values for you to
get an idea.
cat /proc/meminfo
total: used: free: shared: buffers:
cached:
Mem: 3692048384 2287001600 1405046784 1521373184
107352064 151183360
Swap: 2146754560 0 2146754560
MemTotal: 3605516 kB
MemFree: 1372116 kB
MemShared: 1485716 kB
Buffers: 104836 kB
Cached: 147640 kB
SwapCached: 0 kB
Active: 136932 kB
Inact_dirty: 1601260 kB
Inact_clean: 0 kB
Inact_target: 917488 kB
HighTotal: 2752448 kB
HighFree: 699988 kB
LowTotal: 853068 kB
LowFree: 672128 kB
SwapTotal: 2096440 kB
SwapFree: 2096440 kB
BigPagesFree: 0 kB
Informix Dynamic Server Version 7.31.UD6 --
On-Line -- Up 09:23:06 -- 1896196 Kbytes
Configuration File: /usr/informix/etc/onconfig.malco
#**************************************************************************
#
# INFORMIX SOFTWARE, INC.
#
# Title: onconfig.std
# Description: Informix Dynamic Server Configuration
Parameters
#
#**************************************************************************
# Root Dbspace Configuration
ROOTNAME rootdbs # Root dbspace name
ROOTPATH /usr/informix/data/db01
# Path for devicecontaining root dbspace
ROOTOFFSET 2 # Offset of rootdbspace into device (Kbytes)
ROOTSIZE 1048576 # Size of root dbspace
(Kbytes)
# Disk Mirroring Configuration Parameters
MIRROR 0 # Mirroring flag (Yes
= 1, No = 0)
MIRRORPATH # Path for devicecontaining mirrored root
MIRROROFFSET 0 # Offset into mirrored
device (Kbytes)
# Physical Log Configuration
PHYSDBS plogdbs # Location (dbspace)
of physical log
PHYSFILE 262140 # Physical log file
size (Kbytes)
# Logical Log Configuration
LOGFILES 510 # Number of logicallog files
LOGSIZE 1024 # Logical log size
(Kbytes)
# Diagnostics
MSGPATH /var/informix/online.log # System
message log file path
CONSOLE /dev/tty1 # System consolemessage path
ALARMPROGRAM /usr/informix/etc/log_full.sh # Alarm
program path
SYSALARMPROGRAM /usr/informix/etc/evidence.sh # System
Alarm program path
TBLSPACE_STATS 1
# System Archive Tape Device
TAPEDEV /dev/vm0 # Tape device path#TAPEDEV /dev/null # Tape device path
TAPEBLK 512 # Tape block size
(Kbytes)
TAPESIZE 100000000 # Maximum amount ofdata to put on tape (Kbytes)
# Log Archive Tape Device
LTAPEDEV /dev/vm0 # Log tape device path#LTAPEDEV /dev/null # Log tape device
path
LTAPEBLK 512 # Log tape block size
(Kbytes)
LTAPESIZE 100000000 # Max amount of datato put on log tape (Kbytes)
# Optical
STAGEBLOB # Informix Dynamic
Server/Optical staging area
# System Configuration
SERVERNUM 1 # Unique idcorresponding to a Dynamic Server instance
DBSERVERNAME malco_1 # Name of defaultdatabase server
DBSERVERALIASES malco_2,mallive # List ofalternate dbservernames
NETTYPE ipcshm,5,50,CPU # Configure pollthread(s) for nettype
NETTYPE soctcp,2,25,NET # Configure pollthread(s) for nettype
DEADLOCK_TIMEOUT 30 # Max time to wait oflock in distributed env.
RESIDENT 1 # Forced residency
flag (Yes = 1, No = 0)
MULTIPROCESSOR 1 # 0 forsingle-processor, 1 for multi-processor
NUMCPUVPS 7 # Number of user (cpu)vps
SINGLE_CPU_VP 0 # If non-zero, limitnumber of cpu vps to one
NOAGE 0 # Process aging
AFF_SPROC # Affinity startprocessor
AFF_NPROCS # Affinity number ofprocessors
# Shared Memory Parameters
#LOCKS 65536 # Maximum number of
locks
LOCKS 250000
BUFFERS 648216 # Maximum number ofshared buffers
NUMAIOVPS 16 # Number of IO vps
PHYSBUFF 96 # Physical log buffer
size (Kbytes)
LOGBUFF 32 # Logical log buffer
size (Kbytes)
LOGSMAX 512 # Maximum number oflogical log files
CLEANERS 108 # Number of buffercleaner processes
SHMBASE 0x50000000 # Shared memory baseaddress
SHMVIRTSIZE 262144 # initial virtualshared memory segment size
SHMADD 65536 # Size of new sharedmemory segments (Kbytes)
SHMTOTAL 2048000 # Total shared memory
(Kbytes). 0=>unlimited
CKPTINTVL 300 # Check point interval
(in sec)
LRUS 128 # Number of LRU queues
LRU_MAX_DIRTY 2 # LRU percent dirtybegin cleaning limit
LRU_MIN_DIRTY 1 # LRU percent dirtyend cleaning limit
LTXHWM 40 # Long transactionhigh water mark percentage
LTXEHWM 60 # Long transactionhigh water mark (exclusive)
TXTIMEOUT 0x12c # Transaction
timeout (in sec)
STACKSIZE 32 # Stack size (Kbyt
ART KAGEL, BLOOMBERG/ 499 PARK wrote:
> I'm posting this to CDI and the Linux List for Julia who's having a problem the
> list may be able to help with. Please include her address (below) in you reply:
Nope - there's the IIUG archive, and there's groups.google.com, ...
> ----- Original Message -----
> From: Julia M <juliamrus@YAHOO.COM>
> At: 10/ 5 22:25
> <SNIP>
> I am trying to increase shared memory setting on our
> server running on a DELL poweredge 6650 with 4GB RAM
> and linux 2.4 (enterprise).
> For some reason if I set the buffers value to anything
> morethan 700000 it crashed saying can't allocate
> shared memory.
> Here I don't want to increase the Virtual segment but
> the Buffers.
You're on a 32-bit system (IDS 7.31.UD6). You won't get to all 4 GB
available as buffers in a single IDS instance because a 32-bit system
only has 4 GB total memory, and some of that has to be used for the
code, shared libraries, and per-process (as opposed to per-thread)
stack and heap space. You might, perhaps, reach 3GB; you'll be hard
pushed to reach much more.
The next problem is the way that Linux places shared libraries in
memory -- be grateful you aren't using RHEL v3 update 3 with its
Exec-Guard and randomized mapping (hi Ron!).
Basically, you need to have a 3GB gap in the memory map available to
allocate your 3 GB chunk of shared memory. I'm not clear on all the
ins and outs of how you do that, but you need to ensure that shared
libraries are loaded at a high enough address and SHMBASE is set low
enough that there is a 3GB gap available to use. (One reason why its
going to be hard to use more than 3 GB is that there's even less room
for manoeuvre as you increase the space allocated to shared memory.
> I tried the following SHMMAX values but Informix
> doesn't seems to like any of the values set through
> sysctl.conf during the server bootup.
>
>
> #kernel.shmmax = 33554432 - release note value
> #kernel.shmmax = 134217728
> #kernel.shmmax = 2*536870912
> (all above values failed with more than 700000
> buffers)
>
> SHMBASE 0x50000000 # Shared memory base> address in onconfig -
> (release note says this should be set to 0x1000000L.
> But when you do that you can't allocate shared memory
> more than 700 MB)
>
>
> kernel.shmmax = 536870912 (current value)
> kernel.shmmin = 1
> kernel.shmmni = 128
> kernel.shmseg = 128
> kernel.semmns = 4096
> kernel.semmnu = 4096
> kernel.semume = 32
> kernel.semmap = 4096
> kernel.semmsl = 100
>
>
>
> I have no clue why It can't go beyond the shared
> memeory value of 1896000 KB (When buffers value set
> above 700000).
> What am I missing here??
> Any answer to this is much appreciated.
>
> I have included the cat /proc/meminfo, onconfig and
> online.log values for you to
> get an idea.
>
>
> cat /proc/meminfo
> total: used: free: shared: buffers:
> cached:
> Mem: 3692048384 2287001600 1405046784 1521373184
> 107352064 151183360
> Swap: 2146754560 0 2146754560
> MemTotal: 3605516 kB
> MemFree: 1372116 kB
> MemShared: 1485716 kB
> Buffers: 104836 kB
> Cached: 147640 kB
> SwapCached: 0 kB
> Active: 136932 kB
> Inact_dirty: 1601260 kB
> Inact_clean: 0 kB
> Inact_target: 917488 kB
> HighTotal: 2752448 kB
> HighFree: 699988 kB
> LowTotal: 853068 kB
> LowFree: 672128 kB
> SwapTotal: 2096440 kB
> SwapFree: 2096440 kB
> BigPagesFree: 0 kB
>
> Informix Dynamic Server Version 7.31.UD6 --
> On-Line -- Up 09:23:06 -- 1896196 Kbytes
>
> Configuration File: /usr/informix/etc/onconfig.malco
>[...]
> ==================================================================
>
> This is what happened when I try to increase the
> number of buffers beyond=700000
>
>
> 04:30:03 Informix Dynamic Server Stopped.
>
> 04:36:37 Segment locked: addr=0x50000000,> size=1692237824
>[...]
> 04:36:37 Segment locked: addr=0x50000000,> size=1692237824
>
> Fri Sep 10 04:36:38 2004
>
> 04:36:38 Assert Failed: Internal error: embedded> mutex, name = support
>
> 04:36:38 Informix Dynamic Server Version 7.31.UD6
> 04:36:38 Who: Session(0, @, 0, 0)
> Thread(1, main_thread, 0, 1)
> File: mt.c Line: 6532
> 04:36:39 See Also: /tmp/af.3e9a2b6, shmem.3e9a2b6.0
> 04:36:42 Error writing '/tmp/shmem.3e9a2b6.0' errno => 14
> 04:36:42 mt.c, line 6532, thread 1, proc id 1417,> Internal error: embedded mutex, name = support
> 04:36:42 PANIC: Attempting to bring system down
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/