CentOS modification SHM

Source: Internet
Author: User

Linux ,the automatic memory management of Oracle 11g cannot be specified greater than this /dev/shm amount of memory. Otherwise, the following error will occur

Ora-00845:memory_target not supported on the This system

Linux Environment, the mount point /dev/shm Default is the 50% of the system memory . According to the Oracle Installation manual, you need to manually specify the size of the/DEV/SHM so that automatic memory management can use more memory.

recently wait4friend in a CentOS6.2 on the VM , modify the /dev/shm The problem occurs after the system restarts and the configuration always returns to its default value. The whole process is as follows

    1. 1. Check the current configuration of the system,tmpfs is 1.9G, is the system memory 50% .

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/mapper/vg_centos00-lv_root

14G 11G 2.6G 80%/

Tmpfs 1.9G 88K 1.9G 1%/DEV/SHM

/DEV/SDA1 485M 37M 424M 8%/boot

    1. 2. Modify the /etc/fstab to specify a larger value for the/DEV/SHM. The red part below is the newly specified value.

[Email protected] ~]# Cat/etc/fstab

/DEV/MAPPER/VG_CENTOS00-LV_ROOT/EXT4 Defaults 1 1

Uuid=3f3c551e-902d-46f6-9b93-0430c175421d/boot EXT4 Defaults 1 2

/dev/mapper/vg_centos00-lv_swap swap swap defaults 0 0

TMPFS/DEV/SHM tmpfs defaults, size=3276m 0 0

    1. 3. after re - Mount , you can determine that the new setting 3.2G can take effect.

[Email protected] ~]# FUSER-KM/DEV/SHM

/dev/shm:2136m

[Email protected] ~]# UMOUNT/DEV/SHM

[Email protected] ~]# MOUNT/DEV/SHM

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/mapper/vg_centos00-lv_root

14G 11G 2.6G 80%/

/DEV/SDA1 485M 37M 424M 8%/boot

Tmpfs 3.2G 0 3.2G 0%/dev/shm

    1. 4. The strange problem occurred after the reboot , the configuration disappeared, unexpectedly changed back to the default value.

[email protected] ~]# reboot

[Email protected] ~]# df-h

Filesystem Size used Avail use% mounted on

/dev/mapper/vg_centos00-lv_root

14G 11G 2.6G 80%/

Tmpfs 1.9G 88K 1.9G 1%/DEV/SHM

/DEV/SDA1 485M 37M 424M 8%/boot

    1. 5. has the modification not been written to the configuration file? Make sure that the changes you just made were saved successfully.

[Email protected] ~]# Cat/etc/fstab

Tmpfs/dev/shm Tmpfs defaults,size=3276m 0 0

and /etc/mtab The record information is also matched.

[Email protected] ~]# Cat/etc/mtab

/DEV/MAPPER/VG_CENTOS00-LV_ROOT/EXT4 RW 0 0

PROC/PROC proc RW 0 0

Sysfs/sys Sysfs RW 0 0

Devpts/dev/pts devpts rw,gid=5,mode=620 0 0

Tmpfs/dev/shm Tmpfs rw,size=3276m 0 0

/dev/sda1/boot ext4 RW 0 0

None/proc/sys/fs/binfmt_misc Binfmt_misc RW 0 0

Sunrpc/var/lib/nfs/rpc_pipefs rpc_pipefs RW 0 0

    1. 6. After many tests, this problem occurs repeatedly. Wait4friend found no other way, finally can only use more violent method in the boot process remount This directory, see the following red increase.

[Email protected] ~]# vi/etc/rc.local

"/etc/rc.local" 11L, 274c#!/bin/sh

#

# This script is executed *after* all and the other init scripts.

# can put your own initialization stuff in here if you don ' t

# want to does the full Sys V style init stuff.

Touch/var/lock/subsys/local

Mount-o REMOUNT/DEV/SHM

After restarting, the problem is resolved.

CentOS modification SHM

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.