This appendix contains information about administering Oracle Database on Linux.
It contains the following topics:
Note:
Starting with Oracle Database 11g Release 2 (11.2), Linux x86-64 and IBM: Linux on System z media does not contain Linux x86 binaries.To enable Oracle Database to use large pages (sometimes called HugePages) on Linux, 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 adequate 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:
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. Asynchronous Input-Output is enabled by default on raw volumes. Automatic Storage Management uses asynchronous Input-Output 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 ASYNCH
or SETALL
.
Note:
If the file system files are managed through ODM library interface or Direct NFS Client, asynchronous Input-Output is enabled by default. There is no need to setFILESYSTEMIO_OPTIONS
to enable asynchronous Input-Output in these environments.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 I/O on raw devices. 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 ASYNCH
to enable asynchronous Input-Output. If you want to enable both asynchronous Input-Output and direct Input-Output, set the FILESYSTEMIO_OPTIONS
initialization parameter in the parameter file to SETALL.
Direct Input-Output support is available and supported on Linux.
To enable direct Input-Output support:
Set the FILESYSTEMIO_OPTIONS
initialization parameter to DIRECTIO
.
Set the FILESYSTEMIO_OPTIONS
initialization parameter in the parameter file to SETALL
, which will enable both asynchronous Input-Output and direct Input-Output.
If Simultaneous Multithreading is enabled, then the v$osstat
view reports two 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 must be 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 4 GB 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:
tmpfs /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 6815744 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 6815744 > /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 = 6815744
Per-process number of file descriptors must 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 with huge pages on Linux.