| Oracle® Database Administrator's Reference 11g Release 1 (11.1) for Linux and UNIX-Based Operating Systems Part Number B32009-04 |
|
|
View PDF |
This appendix contains information about administering Oracle Database on Linux. It contains the following topics:
Note:
This section applies to Linux x86 only.Oracle Database can allocate and use more than 4 GB of memory for the database buffer cache. This section describes the limitations and requirements of the extended buffer cache feature on Linux x86 systems.
See Also:
Oracle Database Concepts for more information about the extended buffer cache featureTo use the extended buffer cache feature, create an in-memory file system on the /dev/shm mount point equal in size or larger than the amount of memory that you intend to use for the database buffer cache. For example, to create an 8 GB file system on the /dev/shm mount point:
Run the following command as the root user:
# mount -t tmpfs shmfs -o size=8g /dev/shm
To ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:
shmfs /dev/shm tmpfs size=8g 0 0
When Oracle Database starts with the extended buffer cache feature enabled, it creates a file in the /dev/shm directory that corresponds to the Oracle buffer cache.
Note:
If an in-memory file system is already mounted on the/dev/shm mount point, then ensure that its size is equal to or larger than the amount of memory that is used for the database buffer cache.USE_INDIRECT_DATA_BUFFERS Initialization Parameter
To enable the extended buffer cache feature, set the USE_INDIRECT_DATA_BUFFERS initialization parameter to TRUE in the parameter file. This enables Oracle Database to specify a larger buffer cache.
If the extended cache feature is enabled, then you must use the DB_BLOCK_BUFFERS parameter to specify the database cache size.
Do not use the following dynamic cache parameters while the extended buffer cache feature is enabled:
DB_CACHE_SIZE
DB_2K_CACHE_SIZE
DB_4K_CACHE_SIZE
DB_8K_CACHE_SIZE
DB_16K_CACHE_SIZE
The following limitations apply to the extended buffer cache feature:
You cannot create or use tablespaces with nondefault block sizes. You can create tablespaces using only the block size specified by the DB_BLOCK_SIZE parameter.
You cannot change the size of the buffer cache while the instance is running.
See Also:
Oracle Database SQL Language Reference for more information about the default block size used by theCREATE TABLESPACE commandNote:
The default VLM window size is 512 MB. This memory size is allocated to the address space of the process. To increase or decrease this value, set theVLM_WINDOW_SIZE environment variable to the new size in bytes. For example, to set the VLM_WINDOW_SIZE to 256 MB, run the following command:
$ export VLM_WINDOW_SIZE=268435456
The value that you specify for the VLM_WINDOW_SIZE environment variable must be a multiple of 64 KB.
Red Hat Enterprise Linux 3 Only: VLM Window Size
To accommodate the VLM window size, you must increase the default maximum size of the per-process locked memory. To increase it, add the following lines to the /etc/security/limits.conf file, where oracle is the user that administers the database:
oracle soft memlock 3145728 oracle hard memlock 3145728
If you use ssh to log in to the system, then add the following line to the /etc/ssh/sshd_config file to enable the default values to be used when an ssh session is started:
UsePrivilegeSeparation no
To enable Oracle Database to use large pages (sometimes called huge pages) on SUSE Linux Enterprise Server 9, or Red Hat Enterprise Linux 4, set the value of the vm.nr_hugepages kernel parameter to specify the number of large pages that you want to reserve. You must specify a sufficient number of large pages to hold the entire SGA for the database instance. To determine the required parameter value, divide the SGA size for the instance by the size of a large page, then round up the result to the nearest integer.
To determine the default large page size, run the following command:
# grep Hugepagesize /proc/meminfo
For example, if /proc/meminfo lists the large page size as 2 MB, and the total SGA size for the instance is 1.6 GB, then set the value for the vm.nr_hugepages kernel parameter to 820 (1.6 GB / 2 MB = 819.2).
Note:
This section applies to Linux x86 only.Depending on the distribution of Linux, apply the instructions in one of the following sections to increase the SGA address space:
SUSE Linux Enterprise Server 10
To increase the SGA address space on SUSE Linux Enterprise Server 10:
Log in as the oracle user.
In the $ORACLE_HOME/rdbms/lib directory, run the following commands:
$ genksms -s 0x15000000 > ksms.s $ make -f ins_rdbms.mk ksms.o $ make -f ins_rdbms.mk ioracle
Note:
If Oracle Database does not start after completing this procedure, or if there are run-time memory errors, then increase the hexadecimal number specified in the first command. For example, if the 0x15000000 value prevents Oracle Database from starting, then specify the value 0x20000000. Lowering this value increases the SGA address space, but could decrease the PGA address space.Run the following command to determine the process ID of the oracle user's shell process:
$ echo $$
The number returned is the process ID.
Run the following command to switch user to root:
$ sudo sh
Run the following commands to change the mapped base setting for the oracle user's shell process, where pid is the process ID identified in step 3:
# echo 268435456 > /proc/pid/mapped_base
Run the exit command to return to the oracle user's shell process, and start Oracle Listener and Oracle Database.
Note:
All Oracle processes must get this modified mapped base value. Starting the listener from the shell that has the modified mapped base enables client connections to connect properly.Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5
To increase the SGA address space on Red Hat Enterprise Linux 4 and Red Hat Enterprise Linux 5:
Log in as the oracle user.
In the $ORACLE_HOME/rdbms/lib directory, run the following commands:
$ genksms -s 0x15000000 > ksms.s $ make -f ins_rdbms.mk ksms.o $ make -f ins_rdbms.mk ioracle
Start Oracle Database.
|
Note: On Linux, Automatic Storage Management uses asynchronous Input-Output by default. Asynchronous Input-Output is not supported for database files stored on Network File Systems. |
Oracle Database supports kernel asynchronous Input-Output. This feature is disabled by default.
By default, the DISK_ASYNCH_IO initialization parameter in the parameter file is set to TRUE. To enable asynchronous Input-Output on file system files:
Ensure that all Oracle Database files are located on file systems that support asynchronous Input-Output.
Set the FILESYSTEMIO_OPTIONS initialization parameter in the parameter file to one of the following values:
| Linux Distribution | Recommended Value |
|---|---|
| SUSE Linux Enterprise Server 9 | SETALL |
| Other distributions | ASYNCH |
Direct Input-Output support is available and supported on Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9.
Note:
To use direct Input-Output on Red Hat Enterprise Linux 3, the driver that you use must support vary Input-Output.To enable direct Input-Output support:
Set the FILESYSTEMIO_OPTIONS initialization parameter to DIRECTIO.
If you are using the asynchronous Input-Output option, then set the FILESYSTEMIO_OPTIONS initialization parameter to SETALL.
On Red Hat Enterprise Linux 3 and SUSE Linux Enterprise Server 9, Oracle Database supports the semtimedop() system call (semaphores with a time limitation). To enable support for the feature, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:
$ make -f ins_rdbms.mk smt_on
To disable semtimedop() support, run the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory:
$ make -f ins_rdbms.mk smt_off
Note:
This section applies to Linux x86 only.Oracle Net supports Sockets Direct Protocol over the InfiniBand network architecture on Red Hat Enterprise Linux AS 3 for Oracle Database 11g release 1. For this release, Sockets Direct Protocol support is limited to synchronous Input-Output only. For information about support for using asynchronous Input-Output on Sockets Direct Protocol, refer to the following document:
http://www.oracle.com/technology/products/oraclenet/files/Oracle_Net_High-Speed_Interconnect_Support.doc
Note:
Do not set the Oracle NetNET_ASYNC_IO and SDP_ASYNC_IO configuration parameters, unless otherwise stated in this document.If Simultaneous Multithreading is enabled, then the v$osstat view reports 2 additional rows corresponding to the online logical (NUM_LCPUS) and virtual CPUs (NUM_VCPUS).
To use the MEMORY_TARGET or MEMORY_MAX_TARGET feature, the following kernel parameters need to be potentially modified.
/dev/shm mount point should be equal in size or larger than the value of SGA_MAX_SIZE, if set, or should be set to be at least MEMORY_TARGET or MEMORY_MAX_TARGET, whichever is larger. For example, with MEMORY_MAX_TARGET=4GB only set, to create a 4GB system on the /dev/shm mount point:
Run the following command as the root user:
# mount -t tmpfs shmfs -o size=4g /dev/shm
ensure that the in-memory file system is mounted when the system restarts, add an entry in the /etc/fstab file similar to the following:
# shmfs /dev/shm tmpfs size=4g 0
The number of file descriptors for each Oracle instance are increased by 512*PROCESSES. Therefore, the maximum number of file descriptors should be at least this value, plus some more for the operating system requirements. For example, if the cat /proc/sys/fs/file-max command returns 32768 and PROCESSES are 100, you can set it to 65536 or higher as root, to have 51200 available for Oracle. Use one of the following options to set the value for the file-max descriptor.
Run the following command:
echo 65536 > /proc/sys/fs/file-max
OR
Modify the following entry in the /etc/sysctl.conf file and restart the system as root.
fs.file-max = 65536
Per-process number of file descriptors needs to be at least 512. For example, as root run the following command.
On bash and sh:
# ulimit -n
On csh
# limit descriptors
If the preceding command returns 200, then run the following command to set the value for the per processor file descriptors limit, for example to 1000:
On bash and sh:
# sudo sh # ulimit -n 1000
On csh
# sudo sh # limit descriptors 1000
MEMORY_TARGET and MEMORY_MAX_TARGET cannot be used when LOCK_SGA is enabled. MEMORY_TARGET and MEMORY_MAX_TARGET also cannot be used in conjunction with huge pages on Linux.