Enabling asynchronous disk I/O

Sybase recommends that you do not use block devices on UNIX and Linux systems. A system crash may lead to loss of data integrity if you use block devices as database devices.

If you are using raw devices on a UNIX platform, you cannot:

If either of these are set to true, Adaptive Server returns a similar to:

You cannot set directio option for raw device '/dev/raw/raw235' or You cannot set attribute dsync for raw device

Linux

Verify there are sufficient system resources for kernel asynchronous I/O before starting Adaptive Server.

Linux requires that the total number of system-wide reservable I/O descriptors (aio-max-nr), minus the current number of descriptors reserved by all processes (aio-nr), must be sufficient to accommodate the value for max async i/os per engine multiplied by the value for max online engines.

To determine the values for aio-max-nr and aio-nr:

cat /proc/sys/fs/aio-max-nr
cat /proc/sys/fs/aio-nr

Modify the number of reservable descriptors by setting fs.aio-max-nr with the sysctl operating system command.

See your operating sytem documentation.

Adaptive Server may issue messages similar to these in the errorlog if there are insufficient number of I/O descriptors during startup, or when an engine is brought online:

kernel KAIO not initialized because the requested number of async I/Os(%d) will exceed the resources available on the operating system.

kernel Kernel asynchronous I/O not initialized. The io_setup() system call returned %d.

See max async i/os per engine in the System Administration Guide, Volume 1.

HP-UX 11.31 and later using file system devices

StepsEnabling asynchronous I/O on HP-UX running with file system devices

Before enabling asynchronous I/O for file system devices, Sybase recommends you to adjust below OS parameters to their maximum values:

# kctune aio_max_ops=0x100000
# kctune aio_proc_threads=2048
  1. Enable the allow sql server async i/o configuration parameter.

  2. Enable the enable hp posix async i/o configuration parameter.

    sp_configure 'enable hp posix async i/o', 1
    
  3. This parameter is static: restart Adaptive Server.

See “Setting Configuration Parameters” in the System Administration Guide, Volume 1.

StepsEnabling Concurrent I/O on HP-UX running with file systems

Sybase recommends that you to enable VxFS Concurrent I/O (CIO) on HP-UX file systems to take advantage of its performance benefits. VxFS Concurrent I/O is available with OnlineJFS (VxFS-Full) version 5.0.1 and later for HP-UX 11.31.

  1. To verify that OnlineJFS is installed and enabled, enter:

    # vxlicrep | grep -i onlinejfs 
    

    Or,

    #  swlist -l product |grep -i onlinejfs
    

    See your operating system documentation.

HP-UX on raw partitions

It is mandatory for HP-UX users to enable asynchronous I/O.

To improve I/O performance on character or raw and block devices, enable asynchronous I/O by installing the HP asynchronous I/O driver from SAM. For help with installing this driver, contact your operating system administrator or HP technical support.

NoteBefore executing the following instructions, shut down Adaptive Server (or SQL Server).

To enable asynchronous I/O:

  1. From the SAM Kernel Configuration menu, choose Drivers and set the Pending State for asyncdisk to In by adding the driver.

    An alternate step could be done by adding the asyncdsk subsystem keyword to /stand/system.

  2. Rebuild the kernel, and reboot the system.

  3. Execute the following commands using the userid root:

    #/etc/mknod/dev/async c 101 4
    #chmod 0660/dev/async
    #chown <uid> /dev/async
    #/etc/setprivgrp <ugrp> MLOCK
    

    Where:

    <uid> is the identification (user ID)used by the user that is booting Adaptive Server.

    <ugrp> is the user group for the <uid> user ID.

  4. At the UNIX prompt, execute the following statements as “root”. The user ID of the user who is starting Adaptive Server and Backup Server must be the owner of the /dev/async directory.

For IBM AIX

Enable asynchronous disk I/O.

This step is mandatory for IBM users.

Enable asynchronous I/O by adjusting the kernel parameters, using the System Management Interface Tool (SMIT):

  1. Enter “smit” at the UNIX prompt.

  2. From the Devices menu, select Asynchronous I/O.

  3. Select Change/Show Characteristics of Asynchronous I/O.