search
HomeDatabaseMysql Tutorialoracle 内核参数设置

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
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
MySQL: An Introduction to the World's Most Popular DatabaseMySQL: An Introduction to the World's Most Popular DatabaseApr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

The Importance of MySQL: Data Storage and ManagementThe Importance of MySQL: Data Storage and ManagementApr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system suitable for data storage, management, query and security. 1. It supports a variety of operating systems and is widely used in Web applications and other fields. 2. Through the client-server architecture and different storage engines, MySQL processes data efficiently. 3. Basic usage includes creating databases and tables, inserting, querying and updating data. 4. Advanced usage involves complex queries and stored procedures. 5. Common errors can be debugged through the EXPLAIN statement. 6. Performance optimization includes the rational use of indexes and optimized query statements.

Why Use MySQL? Benefits and AdvantagesWhy Use MySQL? Benefits and AdvantagesApr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

Describe InnoDB locking mechanisms (shared locks, exclusive locks, intention locks, record locks, gap locks, next-key locks).Describe InnoDB locking mechanisms (shared locks, exclusive locks, intention locks, record locks, gap locks, next-key locks).Apr 12, 2025 am 12:16 AM

InnoDB's lock mechanisms include shared locks, exclusive locks, intention locks, record locks, gap locks and next key locks. 1. Shared lock allows transactions to read data without preventing other transactions from reading. 2. Exclusive lock prevents other transactions from reading and modifying data. 3. Intention lock optimizes lock efficiency. 4. Record lock lock index record. 5. Gap lock locks index recording gap. 6. The next key lock is a combination of record lock and gap lock to ensure data consistency.

What are common causes of poor MySQL query performance?What are common causes of poor MySQL query performance?Apr 12, 2025 am 12:11 AM

The main reasons for poor MySQL query performance include not using indexes, wrong execution plan selection by the query optimizer, unreasonable table design, excessive data volume and lock competition. 1. No index causes slow querying, and adding indexes can significantly improve performance. 2. Use the EXPLAIN command to analyze the query plan and find out the optimizer error. 3. Reconstructing the table structure and optimizing JOIN conditions can improve table design problems. 4. When the data volume is large, partitioning and table division strategies are adopted. 5. In a high concurrency environment, optimizing transactions and locking strategies can reduce lock competition.

When should you use a composite index versus multiple single-column indexes?When should you use a composite index versus multiple single-column indexes?Apr 11, 2025 am 12:06 AM

In database optimization, indexing strategies should be selected according to query requirements: 1. When the query involves multiple columns and the order of conditions is fixed, use composite indexes; 2. When the query involves multiple columns but the order of conditions is not fixed, use multiple single-column indexes. Composite indexes are suitable for optimizing multi-column queries, while single-column indexes are suitable for single-column queries.

How to identify and optimize slow queries in MySQL? (slow query log, performance_schema)How to identify and optimize slow queries in MySQL? (slow query log, performance_schema)Apr 10, 2025 am 09:36 AM

To optimize MySQL slow query, slowquerylog and performance_schema need to be used: 1. Enable slowquerylog and set thresholds to record slow query; 2. Use performance_schema to analyze query execution details, find out performance bottlenecks and optimize.

MySQL and SQL: Essential Skills for DevelopersMySQL and SQL: Essential Skills for DevelopersApr 10, 2025 am 09:30 AM

MySQL and SQL are essential skills for developers. 1.MySQL is an open source relational database management system, and SQL is the standard language used to manage and operate databases. 2.MySQL supports multiple storage engines through efficient data storage and retrieval functions, and SQL completes complex data operations through simple statements. 3. Examples of usage include basic queries and advanced queries, such as filtering and sorting by condition. 4. Common errors include syntax errors and performance issues, which can be optimized by checking SQL statements and using EXPLAIN commands. 5. Performance optimization techniques include using indexes, avoiding full table scanning, optimizing JOIN operations and improving code readability.

See all articles

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor