使用HugePages优化内存性能(三)

2015-03-18 22:56:39 · 作者: · 浏览: 237
cho "***********"
echo "** ERROR **"
echo "***********"
echo "Sorry! There are not enough total of shared memory segments allocated for
HugePages configuration. HugePages can only be used for shared memory segments
that you can list by command:
# ipcs -m
of a size that can match an Oracle Database SGA. Please make sure that:
* Oracle Database instance is up and running
* Oracle Database 11g Automatic Memory Management (AMM) is not configured"
exit 1
fi
# Finish with results
case $KERN in
'2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`;
echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;;
'2.6') echo "Recommended setting: vm.nr_hugepages = $NUM_PG" ;;
*) echo "Unrecognized kernel version $KERN. Exiting." ;;
esac
# End


Upon startup of Linux database getORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device


Subject:


Upon startup of Linux database getORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device


Doc ID:


Note:301830.1


Type:


PROBLEM


Last Revision Date:


31-OCT-2008


Status:


PUBLISHED


In this Document


Symptoms


Changes


Cause


Solution


References



--------------------------------------------------------------------------------


Applies to:


OracleServer- Enterprise Edition - Version: 9.2.0.4 to 11.1.0.6


UnitedLinux x86-64


x86 64 bit


Symptoms


When trying to increase the SGA to approachhalf available RAM with an Oracle 64bit version on a Linux 64bit operatingsystem, even though shmmax is set to match half the amount of? RAM, youget the following error when trying to start the instance:


SQL> startup nomount


ORA-27102: out of memory


Linux-x86_64 Error: 28: No space left ondevice?


Changes


shmall is too small, most likely is set tothe default setting of 2097152



$ cat /proc/sys/kernel/shmall


2097152


Cause


shmall is the total amount of sharedmemory, in pages, that the system can use at one time.


Solution


Set shmall equal to the sum of all the SGAson the system, divided by the page size.?


The page size can be determined using thefollowing command:?


$ getconf PAGE_SIZE


4096


For example, if the sum of all the SGAs onthe system is 16Gb and the result of? '$ getconf PAGE_SIZE' is 4096 (4Kb)then set shmall to 4194304 (4Mb)


As the root user set the shmall to 4194304in the /etc/sysctl.conf file:


kernel.shmall = 4194304


then run the following command:


# sysctl –p


# cat /proc/sys/kernel/shmall


4194304


NOTE:


The above command loads the new value and areboot is not necessary


Switch back to being the oracle user andretry the startup command.


References


Note 169706.1 - Oracle? Database onAIX?,HP-UX?,Linux?,Mac OS? X,Solaris?,Tru64 Unix? Operating SystemsInstallation and Configuration Requirements Quick Reference (8.0.5 to 11.1)


Keywords


NO~SPACE~LEFT~ON~DEVICE ; START~INSTANCE ;OUT~OF~MEMORY ; 64BIT ;