AIX的異步IO需要bos.rte.aio文件集的支持 #lslpp -l bos.rte.aio
Fileset Level State Description
—————————————————————————-
Path: /usr/lib/objrepos
bos.rte.aio 5.3.0.62 COMMITTED Asynchronous I/O Extension
如何啟用AIO #mkdev -l aio0
aio0 Available
#chdev -P -l aio0 -a autoconfig=’available’
aio0 changed
查看aio的配置信息 #lsattr -El aio0
autoconfig available STATE to be configured at system restart True
fastpath enable State of fast path True
kprocprio 39 Server PRIORITY True
maxreqs 4096 Maximum number of REQUESTS True
maxservers 10 MAXIMUM number of servers per cpu True
minservers 1 MINIMUM number of servers True
其中,maxreqs表示同一時刻所允許的異步 I/O 請求,包括已經(jīng)在處理的異步 I/O 請求和等待處理的異步 I/O 請求。maxservers和minservers參數(shù)指定了用于處理異步IO的進程數(shù)。默認的maxservers=10對于大多數(shù)系統(tǒng)來說,應(yīng)該已經(jīng)足夠了,這兩個參數(shù)都是針對文件系統(tǒng)等的aio的,而raw設(shè)備的異步IO直接由內(nèi)核進程完成,不依賴aioserver。autoconfig必須設(shè)置為available才會在下次啟動時自動激活A(yù)IO。 通過如下命令可以查詢系統(tǒng)當(dāng)前aioserver的個數(shù),如果已經(jīng)達到或者接近maxservers,則需要考慮增加該參數(shù)。 #pstat -a | grep aios | wc -l
從AIX5.2開始,支持兩種模式的AIO,一種是傳統(tǒng)模式的,一種是posix的 #pstat -a | grep aio
40 a 28088 1 28088 0 0 1 posix_aioserver
67 a 43002 1 43002 0 0 1 aioserver
Oracle在AIX平臺上安裝的時候要求必須開啟AIO,在rootpre.sh腳本中包含了啟動AIO的代碼 # Asynchronous I/O
echo “Configuring Asynchronous I/O…” | tee -a $LOG
aio=`lsdev -C -t aio|awk ‘{print $2}’`
case $aio in
*Available*) echo “Asynchronous I/O is already defined” | tee -a $LOG
;;
*Defined*) mkdev -l aio0 | tee -a $LOG
chdev -P -l aio0 -a autoconfig=’available’
;;
*) echo “Asynchronous I/O is not installed on this system.” >> $LOG
cat << END
Asynchronous I/O is not installed on this system. You will need to install it, and either configure it yourself using
’smit aio’ or rerun the Oracle root installation procedure.
END
;;
esac
如何刪除AIO AIO是由內(nèi)核提供支持的,首先將autoconfig改為defined然后重啟系統(tǒng) #chdev -P -l aio0 -a autoconfig=’defined’
如果使用rmdev -dl aio0徹底刪除了aio0的定義,則再次使用mkdev -l aio0的時候可能遭遇以下錯誤: mkdev: 0514-519 The following device was not found in the customized
device configuration database:
name = ‘a(chǎn)io0′
這時需要先定義設(shè)備,才能添加設(shè)備,定義aio0設(shè)備可以通過smit aio選擇Configure Defined Asynchronous I/O。 另外要提到的一點,就是Oracle的存儲測試工具Orion,也是必須打開AIO的,否則會報如下錯誤: exec(): 0509-036 Cannot load program ./orion because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a[aio_64.o] because:
0509-136 Symbol kaio_rdwr64 (number 0) is not exported from
dependent module /unix.
0509-136 Symbol listio64 (number 1) is not exported from
dependent module /unix.
0509-136 Symbol acancel64 (number 2) is not exported from
dependent module /unix.
0509-136 Symbol iosuspend64 (number 3) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait (number 4) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait64 (number 5) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout (number 6) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout64 (number 7) is not exported from
dependent module /unix.
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
‘dump -Tv’ command.
|