Skip Headers

Oracle® Database Administrator’s Reference
10g Release 1 (10.1) for UNIX Systems: AIX-Based Systems, hp HP-UX PA-RISC (64-bit), hp Tru64 UNIX, Linux x86, and Solaris Operating System (SPARC)
Part No. B10812-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous Next  

C Administering Oracle Database on Linux

This appendix contains information about administering Oracle Database on Linux. It contains the following sections:

Linux x86 Only: Extended Buffer Cache Support

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.


See Also:

For more information about the extended cache feature, see Oracle Database Concepts.


In-Memory File System

To use the extended buffer cache support, 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:

  1. For example, to create an 8 GB file system on the /dev/shm mount point, enter the following command as the root user:

    # mount -t shm shmfs -o size=8g /dev/shm
    
    
  2. Add an entry in the /etc/fstab file, similar to the following, to ensure that the in-memory file system is mounted when the system reboots:

    none /dev/shmfs shmfs 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, 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 Parameter

To enable the extended buffer cache feature, set the USE_INDIRECT_DATA_BUFFERS parameter to TRUE in the parameter file. Doing this allows Oracle Database to specify a larger buffer cache.


Dynamic Cache Parameters

If the extended cache feature is enabled, 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 cache feature is enabled:


Limitations

The following limitations apply to the extended buffer cache feature:


See Also:

For more information about the default block size used by the CREATE TABLESPACE command, see the Oracle Database SQL Reference.


Note:

The default VLM window size is 512 MB. This memory size is allocated to the process’s address space. To increase or decrease this value, set the VLM_WINDOW_SIZE environment variable to the new size in bytes. For example, to set the VLM_WINDOW_SIZE to 256 MB, enter the following:
$ export VLM_WINDOW_SIZE=268435456

The value 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 need to increase the default maximum size of the per-process max 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        3145728oracle          hard    memlock        3145728

If you use ssh to log in to the system, 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

Enabling Large Pages on Red Hat Enterprise Linux AS 2.1 and UnitedLinux

Enabling large pages can improve scalability by reducing virtual memory overhead in the kernel. However, memory resources in the large page pool cannot be swapped, so you must be sure that your system has sufficient memory.


Note:

Using the bigpages parameter is supported only on Red Hat Enterprise Linux AS 2.1 and UnitedLinux. It is not available or supported on Red Hat Enterprise Linux AS 3.

To use the large pages feature, you must determine the bigpages parameter value. To determine this value, convert the size of the instance’s SGA to megabytes, and round up by 4 MB. Use the following example as a guide:


Note:

You can determine the size of the SGA by using the SHOW SGA command in SQL*Plus or by using the ipcs command.

If the SGA is 2.7 GB:

  1. Determine the bigpages value as follows:

    bigpages = 2.7 * 1024 = 2764.8

  2. Round the value up by 4 to 2768.

  3. Depending on your boot loader, perform one of the following steps:

    LILO:

    1. Add the bigpages option to the appropriate image section in the /etc/lilo.conf file:

      append = "bigpages=2768MB"
      
      
    2. Run /sbin/lilo.

    3. Restart the system.

    GRUB:

    1. Add the bigpages option to the kernel command in the /etc/grub.conf file, for example:

      kernel /vmlinuz-2.4.9 root=/dev/hda5 bigpages=2768 MB
      
      
    2. Restart the system.

  4. To enable the large pages feature, enter one of the following commands, depending on whether you are using the Extended Buffer Cache, and set the USE_INDIRECT_DATA_BUFFERS parameter to TRUE in the parameter file:

    • If you are not using the Extended Buffer Cache (VLM):

      # echo 1 > /proc/sys/kernel/shm-use-bigpages
      
      
    • If you are using the Extended Buffer Cache (VLM), you can configure the bigpages memory pool to include the memory allocated in /dev/shm:

      # echo 2 > /proc/sys/kernel/shm-use-bigpages
      
      
  5. Enter the following command to set the parameter values:

    # sysctl -p /etc/sysctl.conf
    
    
  6. Start up Oracle Database.

Using hugetlbfs on Red Hat Enterprise Linux AS 2.1 (IA-64)

To enable Oracle Database on Red Hat Enterprise Linux AS 2.1 to use TLB memory, set the value of the vm.nr_hugepages kernel parameter. To determine the parameter value required, use the following formula to calculate the number of huge TLB pages you need to reserve.

(total SGA size for instance + hugeTLB page size -1)/(huge TLB page size)

Ensure that the value of the parameter kernel.shmmax is at least the size of a huge TLB page.

For example, if /proc/meminfo lists the huge TLB page size as 256 MB, and the total SGA size for the instance is 3.9 GB, then set the value for vm.nr_hugepages to (3.9 GB + 256 MB -1)/256 MB =16.

Using hugetlbfs on Red Hat Enterprise Linux AS 3

To use hugetlbfs on Red Hat Enterprise Linux AS 3, perform the following:

  1. Determine the memory required for the large page pool, similar to the large pages example in the previous section (2768 MB).

  2. Depending on your boot loader, perform one of the following:

    LILO:

    1. Add the hugepages option to the appropriate image section in the /etc/lilo.conf file:

      append = "hugepages=1024"
      
      
    2. Run /sbin/lilo.

    3. Restart the system.

    GRUB:

    1. Add the hugepages option to the kernel command in the /etc/grub.conf file, for example:

      kernel /vmlinuz-2.4.9 root=/dev/hda5 hugepages=1024
      
      
    2. Restart the system.

  3. Add or edit the following entry in the /etc/sysctl.conf file:

    vm.hugetlb_pool = 2768
    
    
  4. Enter the following command to set the kernel parameter values:

    # sysctl -p /etc/sysctl.conf
    
    
  5. Verify that this amount of memory was moved successfully into the hugetlb pool, as follows:

    # cat /proc/meminfo
    
    

    The lines at the end of the display show how many memory pages were moved into the hugetlb pool.

  6. Start up the database.

Linux x86 Only: Increasing SGA Address Space

Depending on your distribution of Linux, use the instructions in one of the following sections to increase the SGA address space:


Red Hat Enterprise Linux AS 2.1 and UnitedLinux

To increase the SGA address space on Red Hat Enterprise Linux AS 2.1, complete the following:

  1. If necessary, log in as the oracle user.

  2. In the $ORACLE_HOME/rdbms/lib directory, enter 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 runtime memory errors, then increase the hexidecimal number specified in the first command. For example, if the 0x15000000 value prevents Oracle Database from starting, specify the value 0x15000000. Lowering this value increases the SGA address space, but could decrease the PGA address space.

  3. Enter the following command to determine the process ID of the oracle user’s shell process:

    $ echo $$
    
    

    The number returned is the process ID.

  4. Switch user to root:

    $ su - root
    
    
  5. Enter 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
    
    
  6. Enter exit to return to the oracle user’s shell process, and start the Oracle Listener and Oracle Database.


Note:

All Oracle processes need to get this modified mapped_base value. Starting the listener from the shell that has the modified mapped_base allows client connections to connect properly.


Red Hat Enterprise Linux AS 3

To increase the SGA address space on Red Hat Enterprise Linux AS 3, complete the following:

  1. If necessary, log in as the oracle user.

  2. In the $ORACLE_HOME/rdbms/lib directory, enter the following commands:

    $ genksms -s 0x15000000 > ksms.s
    $ make -f ins_rdbms.mk ksms.o
    $ make -f ins_rdbms.mk ioracle
    
    
  3. Start Oracle Database.

Asynchronous I/O Support


Note:

On Linux, Automatic Storage Manager (ASM) uses asynchronous I/O by default.

Oracle Database supports kernel asynchronous I/O. This feature is disabled by default. If you are running Oracle Database on a system that supports kernel asynchronous I/O and is certified by Oracle to use asynchronous I/O, perform the following steps to enable asynchronous I/O support:

  1. As the oracle user, change directory to the $ORACLE_HOME/rdbms/lib directory.

  2. Enter the following command:

    $ make -f ins_rdbms.mk async_on
    
    

    Note:

    If you receive the "/usr/bin/ld: cannot find -laio" error, then the system does not support kernel asynchronous I/O and you must enter the following command to restore the Oracle instance to a usable state:

    $ make -f ins_rdbms.mk async_off


By default, the DISK_ASYNCH_IO parameter in the parameter file is set to true to enable asynchronous I/O on raw devices. To enable asynchronous I/O on file system files:

  1. Ensure that all Oracle database files are located on file systems that support asynchronous I/O.

  2. Set the FILESYSTEMIO_OPTIONS parameter in the parameter file to asynch.

Direct I/O Support

Direct I/O support is not available and is not supported on Red Hat Enterprise Linux 2.1 and UnitedLinux. It is available and is supported on Red Hat Enterprise Linux 3 if the driver being used on the system supports varyio. To enable direct I/O support:

Semtimedop Support

Oracle Database 10g supports the semtimedop() system call (semaphores with a time limitation). This feature is disabled by default. If you are running Oracle Database on UnitedLinux 1.0 SP3 or higher or Red Hat Enterprise Linux AS 3, you can enter the following command as the oracle user in the $ORACLE_HOME/rdbms/lib directory to enable support for the feature:

$ make -f ins_rdbms.mk smt_on

To disable semtimedop() support, enter the following command as the oracle user from the $ORACLE_HOME/rdbms/lib directory:

$ make -f ins_rdbms.mk smt_off

High Speed Network Support

Oracle Net supports Sockets Direct protocol (SDP) over the InfiniBand network architecture on Red Hat Enterprise Linux AS 2.1 and 3 for Oracle Database 10g Release 1. For this release, SDP support is limited to synchronous I/O only. For information about support for using asynchronous I/O on SDP, check the following Web site for updates:

http://otn.oracle.com/products/oraclenet/files/Oracle_Net_High-Speed_Interconnect_Support.doc


Note:

Do not set Oracle Net NET_ASYNC_IO and SDP_ASYNC_IO configuration parameters unless otherwise stated on this Web site.