Discussion:
Informix on Solaris Zones: The server ran out of memory during anattempt to allocate a new shared memory segment
(too old to reply)
Habichtsberg, Reinhard
2013-11-27 11:33:06 UTC
Permalink
IIRC Solaris restricts the use of memory to about 4 GB for one project per default.

To avoid this restriction you have to grant user informix more memory.

The content of /etc/project here (in this case it's the global zone):
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
group.informix:100:Informix DB Umgebung:informix::project.max-sem-ids=(privileged,4096,deny);project.max-shm-ids=(privileged,256,deny);project.max-shm-memory=(priv,34359738368,deny)

The output from projects -l
...
group.informix
projid : 100
comment: "Informix DB Umgebung"
users : informix
groups : (none)
attribs: project.max-sem-ids=(privileged,4096,deny)
project.max-shm-ids=(privileged,256,deny)
project.max-shm-memory=(priv,34359738368,deny)

AFAIK you can use the commands projadd, projmod and projdel to configure project in a local zone, too. It's important that the user who starts the oninits (informix) belongs to the project-group with advanced ressource usage (here:informix). Alternativly you can edit the /etc/project in the local zone and restart the zone.

Please let me know if it helps.

Thanks, Reinhard.
-----Original Message-----
Behalf Of Omar Muñoz
Sent: Tuesday, November 26, 2013 10:35 PM
Subject: Informix on Solaris Zones: The server ran out of memory during
anattempt to allocate a new shared memory segment
Hi.
I'm installing informix 11.70.FC6 on a non-global Solaris Zone (sparse root zone)
on a V890 machine Solaris 10. I can put online an instance with 1Gb of RAM, but
when I tried to start a 8 Gb instance - alone or with the other one online - it failed
and wrote in the online.log
14:23:38 IBM Informix Dynamic Server Started.
14:23:38 shmget: [ENOMEM][12]: key 52564801: The server ran out of memory
during an attempt to allocate a new shared memory segment.
14:23:38 mt_shm_init: can't create resident segment
Memory parameters are
RESIDENT 0
SHMBASE 0x10a000000
SHMVIRTSIZE 2048000
SHMADD 40000
EXTSHMADD 8192
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0.000000
SHMNOACCESS
Pools
BUFFERPOOL
default,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
BUFFERPOOL
size=2K,buffers=2000000,lrus=16,lru_min_dirty=50.00,lru_max_dirty=60.0
0
BUFFERPOOL
size=8K,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
Hardware seems to be enough: 32 Gb RAM. We're able to start same instance on
global zone.
Zone configuration seems to be right too, but since I'm new in virtualization, I'm
zonecfg -z jupiter_ids info
zonename: jupiter_ids
zonepath: /jupiter_ids
brand: native
autoboot: true
ip-type: shared
[max-shm-memory: 12G]
dir: /lib
dir: /platform
dir: /sbin
dir: /usr
dir: /export/home0
special: /dev/dsk/c1t5d0s1
raw: /dev/rdsk/c1t5d0s1
type: ufs
options: []
dir: /respaldo2
special: /dev/dsk/c1t5d0s3
raw: /dev/rdsk/c1t5d0s3
type: ufs
options: []
dir: /devices
special: /devices
raw not specified
type: lofs
options: []
address: 192.168.33.2
physical: ce0
defrouter: 192.168.33.252
device
match: /dev/rmt/*
device
match: /dev/md/dsk/*
device
match: /dev/md/rdsk/*
device
match: /devices/pseudo/*
device
match: /dev/dsk/*
device
match: /dev/rdsk/*
ncpus: 1
physical: 12G
[swap: 5G]
[locked: 3G]
name: zone.max-swap
value: (priv=privileged,limit=5368709120,action=deny)
name: zone.max-locked-memory
value: (priv=privileged,limit=3221225472,action=deny)
name: zone.max-shm-memory
value: (priv=privileged,limit=12884901888,action=deny)
Once into the zone, I checked prctl of the session from which I tried to start up
informix
JUPITER_V890 jupiter_ids:>ps -o taskid -p $$ TASKID
3139
JUPITER_V890 jupiter_ids:>prctl -i task 3139
task: 3139
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
task.max-cpu-time
system 18.4Es inf none -
task.max-lwps
system 2.15G max deny -
project.max-contracts
privileged 10.0K - deny -
project.max-device-locked-memory
privileged 1.96GB - deny -
project.max-locked-memory
system 16.0EB max deny -
project.max-port-ids
privileged 8.19K - deny -
project.max-shm-memory
privileged 12.0GB - deny -
project.max-shm-ids
privileged 256 - deny -
project.max-msg-ids
privileged 128 - deny -
project.max-sem-ids
privileged 1.02K - deny -
project.max-crypto-memory
privileged 7.82GB - deny -
project.max-tasks
system 2.15G max deny -
project.max-lwps
system 2.15G max deny -
project.cpu-cap
system 4.29G inf deny -
project.cpu-shares
privileged 1 - none -
zone.max-swap
privileged 5.00GB - deny -
zone.max-locked-memory
privileged 3.00GB - deny -
zone.max-shm-memory
privileged 12.0GB - deny -
zone.max-shm-ids
system 16.8M max deny -
zone.max-sem-ids
system 16.8M max deny -
zone.max-msg-ids
system 16.8M max deny -
zone.max-lwps
system 2.15G max deny -
zone.cpu-cap
system 4.29G inf deny -
zone.cpu-shares
privileged 1 - none -
Any suggestions on how to overcome this would be appreciated.
_______________________________________________
Informix-list mailing list
http://www.iiug.org/mailman/listinfo/informix-list
Omar Muñoz
2013-11-28 14:53:43 UTC
Permalink
Thank for your answer.

Project configuration seems to be ok. The output from an "informix" user session on the non-global zone prior to start the database is as follows:

JUPITER_V890 jupiter_ids:>id -p
uid=1001(informix) gid=101(informix) projid=200(IDS-ATLAS)
JUPITER_V890 jupiter_ids:>projects -l IDS-ATLAS
IDS-ATLAS
projid : 200
comment: ""
users : informix
groups : informix
attribs: process.max-sem-nsems=(priv,2048,deny)
project.max-sem-ids=(priv,1024,deny)
project.max-shm-ids=(priv,256,deny)
project.max-shm-memory=(priv,12884901888,deny)
project.max-msg-ids=(priv,128,deny)

With this, max-shm-memory was set to 12 Gb, since the zone has got 12 Gb fo physical memory assigned from 32 Gb of the entire server as done at capped-memory at zone's configuration

I've noticed that decresing SHMVIRTSIZE and BUFFERPOOL I was able to start up informix - done as a test, since I must preserve the original values - but I can't go beyond 4.74 Gb of allocated RAM on the instance as shown in "onstat - ". While doing so, I've noticed that prstat -Z command shown the zone as if all informix memory was sent to swap. For instance, this was the output with 1 Gb aprox.


PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
21315 informix 3928K 3344K cpu2 59 0 0:00:00 1.1% prstat/1
20405 noaccess 163M 124M sleep 59 0 0:00:33 0.6% java/18
20783 informix 1104M 280M sleep 59 0 0:00:04 0.0% oninit/2
20466 informix 7680K 4944K sleep 59 0 0:00:00 0.0% sshd/1
19891 root 7000K 4176K sleep 59 0 0:00:00 0.0% nscd/29
20477 informix 1888K 1424K sleep 59 0 0:00:00 0.0% ksh/1
19826 root 11M 9880K sleep 59 0 0:00:11 0.0% svc.configd/18
20784 informix 1103M 14M sleep 59 0 0:00:00 0.0% oninit/1
20128 root 4256K 2048K sleep 59 0 0:00:00 0.0% syslogd/14
20119 root 6104K 2256K sleep 59 0 0:00:00 0.0% automountd/3
20785 informix 1103M 13M sleep 59 0 0:00:00 0.0% oninit/1
19970 root 6888K 4200K sleep 59 0 0:00:01 0.0% inetd/4
19974 root 2464K 1432K sleep 59 0 0:00:00 0.0% sac/1
20791 informix 1103M 13M sleep 59 0 0:00:00 0.0% oninit/1
20123 root 4632K 2040K sleep 59 0 0:00:00 0.0% sshd/1
20474 root 9368K 2792K sleep 59 0 0:00:00 0.0% sendmail/1
20788 informix 1103M 13M sleep 59 0 0:00:00 0.0% oninit/1
20160 root 2928K 1792K sleep 59 0 0:00:00 0.0% snmpdx/1

ZONEID NPROC SWAP RSS MEMORY TIME CPU ZONE
12 46 1324M 227M 1.9% 0:00:51 1.9% jupiter_ids

Is there any limit or configuration to fit related to swap memory? I hope this new information were useful. Thanks in advance


--------------------------------------------
On Wed, 11/27/13, Habichtsberg, Reinhard <***@arz-emmendingen.de> wrote:

Subject: RE: Informix on Solaris Zones: The server ran out of memory during anattempt to allocate a new shared memory segment
To: "Omar Muñoz" <***@yahoo.com>
Date: Wednesday, November 27, 2013, 5:30 AM

IIRC Solaris restricts the use of
memory to about 4 GB for one project per default.

To avoid this restriction you have to grant user informix
more memory.

The content of /etc/project here (in this case it's the
global zone):
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
group.informix:100:Informix DB
Umgebung:informix::project.max-sem-ids=(privileged,4096,deny);project.max-shm-ids=(privileged,256,deny);project.max-shm-memory=(priv,34359738368,deny)

The output from projects -l
...
group.informix
        projid : 100
        comment: "Informix DB Umgebung"
        users  : informix
        groups : (none)
        attribs:
project.max-sem-ids=(privileged,4096,deny)
             
   project.max-shm-ids=(privileged,256,deny)
             
   project.max-shm-memory=(priv,34359738368,deny)

AFAIK you can use the commands projadd, projmod and projdel
to configure project in a local zone, too. It's important
that the user who starts the oninits (informix) belongs to
the project-group with advanced ressource usage
(here:informix).  Alternativly you can edit the
/etc/project in the local zone and restart the zone.

Please let me know if it helps.

Thanks, Reinhard.
-----Original Message-----
[mailto:informix-list-***@iiug.org]
On
Behalf Of Omar Muñoz
Sent: Tuesday, November 26, 2013 10:35 PM
Subject: Informix on Solaris Zones: The server ran out
of memory during
anattempt to allocate a new shared memory segment
Hi.
I'm installing informix 11.70.FC6 on a non-global
Solaris Zone (sparse root zone)
on a V890 machine Solaris 10. I can put online an
instance with 1Gb of RAM, but
when I tried to start a 8 Gb instance - alone or with
the other one online - it failed
and wrote in the online.log
14:23:38  IBM Informix Dynamic Server Started.
14:23:38  shmget: [ENOMEM][12]: key 52564801: The
server ran out of memory
during an attempt to allocate a new shared memory
segment.
14:23:38  mt_shm_init: can't create resident
segment
Memory parameters are
RESIDENT 0
SHMBASE 0x10a000000
SHMVIRTSIZE 2048000
SHMADD 40000
EXTSHMADD 8192
SHMTOTAL 0
SHMVIRT_ALLOCSEG 0.000000
SHMNOACCESS
Pools
BUFFERPOOL
   
default,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
BUFFERPOOL
   
size=2K,buffers=2000000,lrus=16,lru_min_dirty=50.00,lru_max_dirty=60.0
0
BUFFERPOOL
   
size=8K,buffers=10000,lrus=8,lru_min_dirty=50.00,lru_max_dirty=60.50
Hardware seems to be enough: 32 Gb RAM. We're able to
start same instance on
global zone.
Zone configuration seems to be right too, but since I'm
new in virtualization, I'm
not so sure it's the proper configuration to run
zonecfg -z jupiter_ids info
zonename: jupiter_ids
zonepath: /jupiter_ids
brand: native
autoboot: true
ip-type: shared
[max-shm-memory: 12G]
    dir: /lib
    dir: /platform
    dir: /sbin
    dir: /usr
    dir: /export/home0
    special: /dev/dsk/c1t5d0s1
    raw: /dev/rdsk/c1t5d0s1
    type: ufs
    options: []
    dir: /respaldo2
    special: /dev/dsk/c1t5d0s3
    raw: /dev/rdsk/c1t5d0s3
    type: ufs
    options: []
    dir: /devices
    special: /devices
    raw not specified
    type: lofs
    options: []
    address: 192.168.33.2
    physical: ce0
    defrouter: 192.168.33.252
device
    match: /dev/rmt/*
device
    match: /dev/md/dsk/*
device
    match: /dev/md/rdsk/*
device
    match: /devices/pseudo/*
device
    match: /dev/dsk/*
device
    match: /dev/rdsk/*
    ncpus: 1
    physical: 12G
    [swap: 5G]
    [locked: 3G]
    name: zone.max-swap
(priv=privileged,limit=5368709120,action=deny)
    name: zone.max-locked-memory
(priv=privileged,limit=3221225472,action=deny)
    name: zone.max-shm-memory
(priv=privileged,limit=12884901888,action=deny)
Once into the zone, I checked prctl of the session from
which I tried to start up
informix
JUPITER_V890 jupiter_ids:>ps -o taskid -p $$ TASKID
  3139
JUPITER_V890 jupiter_ids:>prctl -i task 3139
task: 3139
NAME    PRIVILEGE   
   VALUE   
FLAG   ACTION       
           
   RECIPIENT
task.max-cpu-time
         system 
        18.4Es   
inf   none         
               
       -
task.max-lwps
         system 
        2.15G 
   max   deny   
               
             -
project.max-contracts
         privileged 
    10.0K   
   -   deny   
               
             -
project.max-device-locked-memory
         privileged 
    1.96GB     
-   deny         
               
       -
project.max-locked-memory
         system 
        16.0EB   
max   deny         
               
       -
project.max-port-ids
         privileged 
    8.19K   
   -   deny   
               
             -
project.max-shm-memory
         privileged 
    12.0GB     
-   deny         
               
       -
project.max-shm-ids
         privileged 
      256   
   -   deny   
               
             -
project.max-msg-ids
         privileged 
      128   
   -   deny   
               
             -
project.max-sem-ids
         privileged 
    1.02K   
   -   deny   
               
             -
project.max-crypto-memory
         privileged 
    7.82GB     
-   deny         
               
       -
project.max-tasks
         system 
        2.15G 
   max   deny   
               
             -
project.max-lwps
         system 
        2.15G 
   max   deny   
               
             -
project.cpu-cap
         system 
        4.29G 
   inf   deny   
               
             -
project.cpu-shares
         privileged 
        1   
   -   none   
               
             -
zone.max-swap
         privileged 
    5.00GB     
-   deny         
               
       -
zone.max-locked-memory
         privileged 
    3.00GB     
-   deny         
               
       -
zone.max-shm-memory
         privileged 
    12.0GB     
-   deny         
               
       -
zone.max-shm-ids
         system 
        16.8M 
   max   deny   
               
             -
zone.max-sem-ids
         system 
        16.8M 
   max   deny   
               
             -
zone.max-msg-ids
         system 
        16.8M 
   max   deny   
               
             -
zone.max-lwps
         system 
        2.15G 
   max   deny   
               
             -
zone.cpu-cap
         system 
        4.29G 
   inf   deny   
               
             -
zone.cpu-shares
         privileged 
        1   
   -   none   
               
             -
    Any suggestions on how to overcome this
would be appreciated.
_______________________________________________
Informix-list mailing list
http://www.iiug.org/mailman/listinfo/informix-list
Loading...