Enable asynchronous disk I/O.
This step is recommended for HP Tru64 users.
HP Tru64 automatically enables asynchronous I/O but, by default, limits the number of concurrent I/O requests to 64. If you expect that you need additional requests for your Adaptive Server installation, add the following lines to the /etc/sysconfigtab file:
rt: aio-max-num=1024
To determine the current value of aio-maximum, enter:
/sbin/sysconfig -q -rt
Enable asynchronous disk I/O.
This step is mandatory for HP users.
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.
Before executing the following instructions, shut down Adaptive Server (or SQL Server).
To enable asynchronous I/O:
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.
Rebuild the kernel, and reboot the system.
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> userid.
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.
Enable asynchronous disk I/O.
This step is mandatory for HP users.
To improve I/O performance on character or raw 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.
Before executing the following instructions, shut down Adaptive Server (or SQL Server).
To launch the Kernel Configuration use kcweb -F.
Select Modules.
Select asyncdsk and change the next boot to static.
Rebuild the kernel, and reboot the system.
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 sybase userid.
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.
To verify that the async I/O is active on the Itanium machine:
Log in as root.
Issue the command:
# kcmodule -a l grep aync
Result: asyncdsk static required
or you can also use the following:
# ls /dev/asyn* idev/async /dev/asyncdsk
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):
Enter “smit” at the UNIX prompt.
From the Devices menu, select Asynchronous I/O.
Select Change/Show Characteristics of Asynchronous I/O.
Enter the values from Table 3-2:
SMIT parameter |
Values for RS/6000 AIX 4.3.3 |
---|---|
MINIMUM number of servers |
1 |
MAXIMUM number of servers |
10 |
MAXIMUM number of REQUESTS I/O |
4096 |
Server PRIORITY |
39 |
ASYNC I/O STATE (to be configured at system restart) |
Available |
If your system uses more than seven disks at the same time for Asynchronous I/O, increase the MAXIMUM number of servers value by 1 for every active device.
Setting the minor device number on /dev/async to 4 reduces or eliminates transient 605 errors in Adaptive Server.
If you are using LVM mirroring, set the minor device number to 0x0.
Silicon Graphics IRIX has two methods of executing asynchronous I/O:
For asynchronous I/O Adaptive Server uses the functions found in libC.so. Customers enable asynchronous I/O by turning on the allow sql server asynchronous i/o flag in the .cfg file. This is commonly known as uaio.
Prior to Adaptive Server 12.5, uaio used sproc()s. These were visible in the ps -elf listing.
In Adaptive Server version 12.5 and later the asynchronous I/O functions now use pthreads rather than sproc()s; you no longer see the extra pocesses. The ps -T command shows the pthreads.
Uaio functions are configurable using the environment variable AIO_THREADS to designate the number of pthreads per engine. The AIO_THREADS environment variable is set by the System Administrator.
Uaio is implemented through POSIX threads (pthreads). Dataserver engines create the pthreads at start-up. These pthreads run in user space and interact with the operating system AIO library in kernel space.
Although each engine can queue many I/O operations, the I/O requests are passed one at a time to the AIO library by each pthread. Increase I/O parallelism by increasing the number of pthreads.
The value of AIO_THREADS depends on the number of database devices and the number of CPUs on the system.
The default value for AIO_THREADS is 5. Although there is no maximum limit, Sybase recommends that you do not set AIO_THREADS to more than 75 per engine. As a general rule, there should be 1 pthread per 1.5 drives. For example, for a machine with 10 drives, set AIO_THREADS to 15.
The number of processes for the AIO_THREADS environment variable is n+2 for each engine running, where n is the value of AIO_THREADS. For example, if AIO_THREADS is set to 5, the number of processes is 7. If two engines are running, the number of processes is 14.
You must restart Adaptive Server for this environment variable to take effect.
The SGI Database Accelerator package (DBA) moves asynchronous I/O from user-space into kernel space (commonly called KAIO). If you elect to use KAIO, you must install DBA (version 3.0 or higher) and set an environment variable in the server start-up script.
KAIO only applies to raw (character special) devices, but coexists with file system asynchronous I/O. Databases located on file system devices use uaio, while raw devices use KAIO.
To confirm that KAIO is in use issue ps -T. (Make sure that no file system devices are being used, because file system device use causes pthreads to display in the ps -T listing.)
Another way to confirm that KAIO is in use is to issue the command par -i -n syssgi on the running dataserver. If SGI_KAIO_READ or SGI_KAIO_WRITE display, then KAIO is active.
It is recommended that all devices be raw unless there is heavy use of tempdb. If there is heavy tempdb use, you should elect to use cooked devices for the buffering. You can also create an xlv and not build a file system so that KAIO can be used.In addition to setting the allow sql server async i/o flag to true in the .cfg file, the RUN_SERVER file should set the environment variable __SGI_USE_DBA to one indicating that KAIO is being used. The following is an example RUN_SERVER file:
#!/bin/sh # set up kaio __SGI_USE_DBA=1; export __SGI_USE_DBA SYBASE=/usr/sybase $SYBASE/bin/dataserver -d/dev/rdsk/dks0d6s1 \ -sSYBASE -e$SYBASE/install/errorlog_SYBASE \ -i$SYBASE
Determine the location, type, and size of each database device.
You must provide this information during the installation of Adaptive Server. Devices are operating system files or portions of a disk (called raw partitions) used to store databases and database objects.