点击(此处)折叠或打开
- SQL> show parameter db_writer_processes;
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_writer_processes integer 6
- SQL> show parameter memory_target
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- memory_target big integer 57984M
- SQL> show parameter sga_max_size
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- sga_max_size big integer 57984M
- SQL> show parameter sga_target
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- sga_target big integer 0
- SQL> show parameter pga_aggregate_target
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- pga_aggregate_target big integer 0
- SQL> show parameter optimizer_mode
-
- SQL> show parameter open_cursors
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- open_cursors integer 300
- SQL> show parameter db_writer_processes
-
- NAME TYPE VALUE
- ------------------------------------ ----------- ------------------------------
- db_writer_processes integer 6
- SQL>
- SQL>
- SQL>
- SQL> alter system set memory_target=0 scope=spfile;
-
- System altered.
-
- SQL> alter system set sga_target=57984M scope=spfile;
-
- System altered.
-
- SQL> alter system set pga_aggregate_target=20480M scope=spfile;
-
- System altered.
-
- SQL> ALTER SYSTEM SET open_cursors=1000 scope=both;
-
- System altered.
-
- SQL>
- SQL> startup force
- ORA-27102: out of memory
- Linux-x86_64 Error: 28: No space left on device
- Additional information: -134217728
- Additional information: 1
[ID 301830.1]
Upon startup of Linux database get ORA-27102: out of memory Linux-X86_64 Error: 28: No space left on device [ID 301830.1] To Bottom
--------------------------------------------------------------------------------
Modified:Oct 4, 2012Type:PROBLEMStatus:PUBLISHEDPriority:3 Comments (0)
In this Document
Symptoms
Ask Questions, Get Help, And Share Your Experiences With This Article
Changes
Cause
Solution
References
--------------------------------------------------------------------------------
Applies to:
Oracle Server - Standard Edition - Version 9.2.0.1 and later
Oracle Server - Enterprise Edition - Version 9.2.0.1 and later
Linux x86-64
Symptoms
When trying to increase the SGA to approach half available RAM with an Oracle 64-bit version on a Linux 64-bit operating system, even though shmmax is set to match half the amount of RAM, you get 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 on device
Ask Questions, Get Help, And Share Your Experiences With This Article
Would you like to explore this topic further with other Oracle Customers, Oracle Employees, and Industry Experts?
Click here to join the discussion where you can ask questions, get help from others, and share your experiences with this specific article.
Discover discussions about other articles and helpful subjects by clicking here to access the main My Oracle Support Community page for Database Install/Upgrade.
Changes
shmall is too small, most likely is set to the default setting of 2097152
$ cat /proc/sys/kernel/shmall
2097152
Cause
shmall is the total amount of shared memory, in pages, that the system can use at one time.
Solution
Set shmall equal to the sum of all the SGAs on the system, divided by the page size.
The page size can be determined using the following command:
$ getconf PAGE_SIZE
4096
For example, if the sum of all the SGAs on the system is 16Gb and the result of '$ getconf PAGE_SIZE' is 4096 (4Kb) then set shmall to 4194304 pages
As the root user set the shmall to 4194304 in 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 a reboot is not necessary.
Switch back to being the oracle user and retry the startup command.
Modifying /etc/sysctl.conf is a permanent workaround (applies at boot time). If for some reason you DO NOT want to change the system wide configuration, you can do it on the fly by directly changing the kernel pseudo FS AKA procfs.
e.g. echo "4194304" > /proc/sys/kernel/shmall
Using HUGEPAGES does not alter the calculation for configuring shmall.
所以,我们就来确定下操作系统层面的参数shmall 值,以及该参数的实际意义。
点击(此处)折叠或打开
- [root@oracle ~]# cat /proc/sys/kernel/shmmax
- 4294967295
- [root@oracle ~]# getconf PAGE_SIZE
- 4096
- [root@oracle ~]# cat /proc/sys/kernel/shmall
- 2097152
(20480+57984) * 1024 *1024 / 4096 = 20086784
点击(此处)折叠或打开
- [root@oracle ~]# sysctl -p
- net.ipv4.ip_forward = 0
- net.ipv4.conf.default.rp_filter = 1
- net.ipv4.conf.default.accept_source_route = 0
- kernel.sysrq = 0
- kernel.core_uses_pid = 1
- net.ipv4.tcp_syncookies = 1
- kernel.msgmnb = 65536
- kernel.msgmax = 65536
- kernel.shmmax = 68719476736
- kernel.shmall = 4294967296
- fs.aio-max-nr = 1048576
- fs.file-max = 6815744
- kernel.shmall = 20086784
- kernel.shmmax = 4294967295
- kernel.shmmni = 4096
- kernel.sem = 250 32000 100 128
- net.ipv4.ip_local_port_range = 9000 65500
- net.core.rmem_default = 262144
- net.core.rmem_max = 4194304
- net.core.wmem_default = 262144
- net.core.wmem_max = 1048586
- [root@oracle ~]#
修改完成后,可以正常startup了
点击(此处)折叠或打开
- SQL> startup
- ORACLE instance started.
-
- Total System Global Area 6.0529E+10 bytes
- Fixed Size 2267992 bytes
- Variable Size 5100274856 bytes
- Database Buffers 5.5298E+10 bytes
- Redo Buffers 128942080 bytes
- Database mounted.
- Database opened.
- SQL>
参考博客 :
1、 http://blog.youkuaiyun.com/leshami/article/details/8746021
2、http://surachartopun.com/2009/10/shared-memory-tuning-startup-database.html
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27039319/viewspace-2121815/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27039319/viewspace-2121815/