Thursday, April 9, 2015

Quick fix for error "memory_target needs larger /dev/shm"

2015-04-07 11:52:44.455000 +08:00
Starting ORACLE instance (normal) (OS id: 2292)
CLI notifier numLatches:3 maxDescs:519
WARNING: You are trying to use the MEMORY_TARGET feature. This feature requires the /dev/shm file system to be mounted for at least 1342177280 bytes. /dev/shm is either not mounted or is mounted with available space less than this size. Please fix this so that MEMORY_TARGET can work as expected. Current available is 1025826816 and used is 665677824 bytes. Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm

[oracle@vmxdb01 ~]$ df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   36G   29G  7.9G  79% /
devtmpfs             1.6G     0  1.6G   0% /dev
tmpfs                1.6G  635M  979M  40% /dev/shm


[root@vmxdb01 ~]# echo "tmpfs      /dev/shm      tmpfs   defaults,size=2g   0   0" >> /etc/fstab

[root@vmxdb01 ~]# mount tmpfs
[root@vmxdb01 ~]# df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   36G   29G  7.9G  79% /
devtmpfs             1.6G     0  1.6G   0% /dev
tmpfs                2.0G     0  2.0G   0% /dev/shm
tmpfs                1.6G  8.9M  1.6G   1% /run
tmpfs                1.6G     0  1.6G   0% /sys/fs/cgroup
/dev/sda1            997M  223M  774M  23% /boot
tmpfs                2.0G     0  2.0G   0% /dev/shm


-- Start Oracle database 

2015-04-09 21:37:48.768000 +08:00
Starting ORACLE instance (normal) (OS id: 3273)
CLI notifier numLatches:3 maxDescs:519
**********************************************************************
Dump of system resources acquired for SHARED GLOBAL AREA (SGA)
 Per process system memlock (soft) limit = 128G
 Expected per process system memlock (soft) limit to lock
 SHARED GLOBAL AREA (SGA) into memory: 1280M
 Available system pagesizes:
  4K, 2048K
 Supported system pagesize(s):
  PAGESIZE  AVAILABLE_PAGES  EXPECTED_PAGES  ALLOCATED_PAGES  ERROR(s)
        4K       Configured          327682          327682        NONE
 Reason for not supporting certain system pagesizes:
  2048K - Dynamic allocate and free memory regions
**********************************************************************

[oracle@vmxdb01 ~]$ df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/mapper/ol-root   36G   29G  7.9G  79% /
devtmpfs             1.6G     0  1.6G   0% /dev
tmpfs                2.0G  1.5G  614M  71% /dev/shm
tmpfs                1.6G  8.9M  1.6G   1% /run
tmpfs                1.6G     0  1.6G   0% /sys/fs/cgroup
/dev/sda1            997M  223M  774M  23% /boot

tmpfs                2.0G  1.5G  614M  71% /dev/shm