ORACLE 内存规划及LINUX内核设置

简介: 原创 转载请注明出处  公司的新服务器到了内存24GB预装 LINUX AS 5.1 64BIT,我正在对其进行安装,同时需要部署DATA GUARD 最大性能模式。

原创 转载请注明出处 

公司的新服务器到了内存24GB预装 LINUX AS 5.1 64BIT,我正在对其进行安装,同时需要部署DATA GUARD 最大性能模式。我准备未SGA分配

15GB空间,PGA无所谓了分给4GB好了,反正PGA也是
按需分配的,不像SGA实例一启动就分配了,当然设置包括几个重要的内核参数,主要涉及到LINUX共享内存,重要的2个内核参数是SHMMAX和

SHMALL,
SHMMAX:表示任意时刻系统可以分配一个共享内存段的最大值,当然我们希望SGA包含在一个共享段里面,所以这个值要设置外>15G,设置为

16G好了。
SHMALL:  表示任意时刻系统可以分配给共享内存段页数的最大值,同样这个值至少不能小于我们最大的共享内存段的大小SHMMAX吧,这个值

是以内存页为单位的,查看内存页大小使用getconf PAGE_SIZE
一般都4096,所以是16GB/4KB=16777216KB/4KB=4194304
所以内核参数修改为

# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled.  See sysctl(8) and
# sysctl.conf(5) for more details.

# Controls IP packet forwarding
net.ipv4.ip_forward = 0

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1

# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmall = 4194304
kernel.shmmax = 17179869184
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144

 


下面的文档取自METALINK
Applies to:
Oracle Server - Enterprise Edition - Version: 9.2.0.4 to 11.1.0.6
SUSE \ UnitedLinux x86-64
Red Hat Enterprise Linux Advanced Server x86-64 (AMD Opteron Architecture)
x86 64 bit (for Enterprise Linux only)

Symptoms
When trying to increase the SGA to approach half available RAM with an Oracle 64bit version on a Linux 64bit 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  
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
 

相关文章
|
Oracle 关系型数据库 MySQL
Oracle Linux 8.10 编译安装sysbench
Oracle Linux 8.10 编译安装sysbench
568 34
|
缓存 Prometheus 监控
Elasticsearch集群JVM调优设置合适的堆内存大小
Elasticsearch集群JVM调优设置合适的堆内存大小
2896 1
|
Oracle Cloud Native 关系型数据库
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
569 11
Oracle Linux 10 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
642 0
Oracle Linux 9.6 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
|
Oracle 关系型数据库 MySQL
Oracle linux 8 二进制安装 MySQL 8.4企业版
Oracle linux 8 二进制安装 MySQL 8.4企业版
672 1
|
Oracle 关系型数据库 Linux
MyEMS开源系统安装之CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux
本指南介绍如何在CentOS/RHEL/Rocky/AlmaLinux/Oracle Linux服务器上部署MyEMS开源能源管理系统。内容涵盖系统准备、数据库配置、多个MyEMS服务(如myems-api、myems-admin、myems-modbus-tcp等)的安装与配置,以及Nginx服务器设置和防火墙规则调整。通过完成所有步骤,您将能够访问MyEMS Admin UI和Web UI,默认端口分别为8001和80,初始登录凭据已提供。
952 0
|
算法 Linux
深入探索Linux内核的内存管理机制
本文旨在为读者提供对Linux操作系统内核中内存管理机制的深入理解。通过探讨Linux内核如何高效地分配、回收和优化内存资源,我们揭示了这一复杂系统背后的原理及其对系统性能的影响。不同于常规的摘要,本文将直接进入主题,不包含背景信息或研究目的等标准部分,而是专注于技术细节和实际操作。
559 35
|
存储 IDE Java
java设置栈内存大小
在Java应用中合理设置栈内存大小是确保程序稳定性和性能的重要措施。通过JVM参数 `-Xss`,可以灵活调整栈内存大小,以适应不同的应用场景。本文介绍了设置栈内存大小的方法、应用场景和注意事项,希望能帮助开发者更好地管理Java应用的内存资源。
1017 4
|
Oracle 关系型数据库 Linux
linux8安装oracle 11g遇到的问题记录
Oracle 11g在Linux 8上安装时会遇到link编译环节的问题。官方建议忽略安装中的链接错误,安装完成后应用DBPSU 11.2.0.4.240716补丁及一次性补丁33991024,再重新编译二进制文件,并配置监听器和数据库。但因11g已退出服务期,这些补丁需付费获取。网上信息显示22年1月的PSU补丁也可解决问题,找到该补丁后按常规方式打补丁即可。如有需求或疑问可咨询我。
983 20
|
Oracle Cloud Native 关系型数据库
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版
470 10
Oracle Linux 9.5 正式版发布 - Oracle 提供支持 RHEL 兼容发行版