Home Database Mysql Tutorial oracle 内核参数设置

oracle 内核参数设置

Jun 07, 2016 pm 03:54 PM
oracle

共享内存的相关内核参数设置

Kernel.shmmax

shmmax 指的是单个共享内存段的最大尺寸,单位为字节

oracle 建议,kernel.shmmax的值不能少于物理内存的一半,而且要大于Oracle中sga-max-size的值,否则会造成oracle性能下降

一般32bit操作系统,直接设置为系统支持的最大内存即可,64bit操作系统设置大于sga-max-size的值即可

如:当前内存为2G 则kernel.shmmax = 2*1024*1024=2097152

当前内存为8G则 kernel.shmmax = 7*1024*1024=7340032

Kernel.shmall

Shmall指系统一次可以使用的共享内存段的最大数量,以页为单位

Oracle默认设置为 kernel.shmall = 2097152 即最大8G(2097152*4/1024/1024),(在调整SGA时需要注意,SGA大小设置不可超过该值),根据系统内存大小和使用的不同可以参考如下:设置的一般规律

kernel.shmall = 8G/4k=8388608k/4k=2097152    ---内存8G

kernel.shmall = 16G/4k=16777216k/4k=4194304    ---内存16G

kernel.shmall = 32G/4k=33554432k/4k=8388608    ---内存32G

(RedHat linux系统中页大小为4096即4K,实际环境以getconf PAGE_SIZE结果为准)

kernel.shmmni

shmmni 指系统共享内存段的最大数量

oracle设置默认值为4096,一般是足够用了,不需要调整

文件句柄数的相关内核参数设置

fs.file-max

fs.file-max指系统能够打开最大的文件句柄数

oracle建议设置为65536,一般不用修改

信号的相关内核参数设置

kernel.sem

kernel.sem是指 semmsl,semmns,semopm,semmni这4个参数

semmsl 指每个线号集的最大信号数,Oracle建议是设置为oracle的最大进程数+10

semmni 指整个系统的信号集的最大数量

semmns 指整个系统的信号总数,也就是semmni*semmsl的结果

semopm 指每个semop系统调用可以执行的信号操作的最大数量

oracle默认设置

semmsl=250

semmns=3200

semopm=100

semmni=128

即kernel.sem= 250 3200 100 128

例:在oracle  ora.init文件参数中设置PROCESSES参数为5000

则semmsl=5010,semmni=128,semmns=semmsl* semmni=641280

另外semopm建议设置等于semmsl值即5010

那么kernel.sem=5010 641280 5010 128

网络相关的内核参数设置

net.core.rmem_default

net.core.rmem_default 指网络套接字的默认接收缓冲区的大小,oracle建议设置为265K即262144

net.core.rmem_max

net.core.rmem_max 指网络套接字的最大接收缓冲区的大小,oracle10g及以前版本建议设置为256k即262144  oracle11g建议设置为4M 即4194304

net.core.wmem_default

net.core.wmem_default指网络套接字的默认发送缓冲区的大小,oracle建议设置为265K即262144

net.core.wmem_max

net.core.wmem_max  指网络套接字的最大发送缓冲区的大小,oracle10g及以前版本建议设置为256k即262144  oracle11g建议设置为1M即1048576

net.ipv4.ip_local_port_range

net.ipv4.ip_local_port_range ,指本地的允许打开随机端口范围

oracle10g前建议端口范围为1024 65000,oracle11g建议端口范围为:

9000 65500 并忽略oracle安装程序任何关于这个参数的警告

Asynchronous I/O相关的内核参数设置

fs.aio-max-nr

fs.aio-max-nr 指系统允许的最大的异步IO请求大小

oracle默认设置为1M即1048576,一般不用更改

Oracle用户的限制参数设置(/etc/security/limits.conf)

oracle           soft    nofile          4096

oracle           hard    nofile          63536

这两行设置用来设置限制oracle用户能打开的文件句柄数,soft限制是指oracle用户登录后默认能够打开的文件句柄数的最大数。hard 限制是指当用户收到打开文件限制的错误时,可以使用ulimit –n设置的最大数。

oracle           soft       nproc          1024

oracle           hard      nproc           65536

这两行设置用来限制oracle用户能打开的进程总数,soft限制是指oracle用户登录后默认能够打开的进程的最大数。hard 限制是指当用户收到达到最大进程限制的错误时,可以使用ulimit –u设置的最大数。

更多相关教程请访问 MySQL视频教程

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Function to calculate the number of days between two dates in oracle Function to calculate the number of days between two dates in oracle May 08, 2024 pm 07:45 PM

The function in Oracle to calculate the number of days between two dates is DATEDIFF(). The specific usage is as follows: Specify the time interval unit: interval (such as day, month, year) Specify two date values: date1 and date2DATEDIFF(interval, date1, date2) Return the difference in days

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

How to use interval in oracle How to use interval in oracle May 08, 2024 pm 07:54 PM

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

How to replace string in oracle How to replace string in oracle May 08, 2024 pm 07:24 PM

The method of replacing strings in Oracle is to use the REPLACE function. The syntax of this function is: REPLACE(string, search_string, replace_string). Usage steps: 1. Identify the substring to be replaced; 2. Determine the new string to replace the substring; 3. Use the REPLACE function to replace. Advanced usage includes: multiple replacements, case sensitivity, special character replacement, etc.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

See all articles