從11G開始,安裝RAC已經(jīng)變成了一個(gè)體力活兒,但是RAC安裝完成后,如何保證系統(tǒng)的穩(wěn)定運(yùn)行,如何得到系統(tǒng)的性能,這個(gè)對(duì)后期在線系統(tǒng)的穩(wěn)定運(yùn)行影響巨大。
成都創(chuàng)新互聯(lián)專注于敦化網(wǎng)站建設(shè)服務(wù)及定制,我們擁有豐富的企業(yè)做網(wǎng)站經(jīng)驗(yàn)。 熱誠(chéng)為您提供敦化營(yíng)銷型網(wǎng)站建設(shè),敦化網(wǎng)站制作、敦化網(wǎng)頁(yè)設(shè)計(jì)、敦化網(wǎng)站官網(wǎng)定制、小程序定制開發(fā)服務(wù),打造敦化網(wǎng)絡(luò)公司原創(chuàng)品牌,更為您提供敦化網(wǎng)站排名全網(wǎng)營(yíng)銷落地服務(wù)。
下面是總結(jié)了最近1年多來(lái)工程實(shí)施中的一些經(jīng)驗(yàn)。
###################################################################################
## 0. 環(huán)境檢查
## 1. IO性能測(cè)試
## 2. 網(wǎng)絡(luò)性能測(cè)試
## 3. 高可用測(cè)試
## 4. HP-UX 硬件查看命令
## 5. 日志收集
## 備注:該文檔基于HP-UX平臺(tái)整理,平臺(tái)不同時(shí)請(qǐng)參考平臺(tái)對(duì)應(yīng)的操作命令
###################################################################################
===================================================================================
## 0. 環(huán)境檢查
===================================================================================
-----------------------------------------------------------------------------------
# 0.1 系統(tǒng)時(shí)間/時(shí)區(qū)
-----------------------------------------------------------------------------------
# date
# cat /etc/TIMEZONE
# cat /etc/default/tz
# echo $TZ
-----------------------------------------------------------------------------------
# 0.2 檢測(cè)內(nèi)核參數(shù)/異步IO/網(wǎng)絡(luò)參數(shù)
# 異步IO文件權(quán)限正確值為: oracle/oinstall 660 101 0x000104 /dev/async
-----------------------------------------------------------------------------------
--HP
# kctune | sort
# ls -la /dev/async
# cat /etc/rc.config.d/nddconf
# netstat -inw
--Linux
# sysctl -a | sort
-----------------------------------------------------------------------------------
# 0.3 互信檢查
-----------------------------------------------------------------------------------
$ more /etc/hosts | grep -Ev '^#|^$|127.0.0.1|vip|scan|:' | awk '{print "ssh " $2 " date;"}' > ping.sh
$ sh ./ping.sh
-----------------------------------------------------------------------------------
# 0.4 集群狀態(tài)檢查
-----------------------------------------------------------------------------------
# crsctl stat res -t
# olsnodes -n -i -s -t
# olsnodes -c
# oifcfg getif
-----------------------------------------------------------------------------------
# 0.5 檢查實(shí)例運(yùn)行狀態(tài)
-----------------------------------------------------------------------------------
SQL>
set linesize 160;
select inst_id,instance_name, to_char(startup_time, 'yyyy-mm-dd hh34:mi:ss') START_TIME, status from gv$instance;
-----------------------------------------------------------------------------------
# 0.6 檢查ASM DG容量
-----------------------------------------------------------------------------------
SQL>
select group_number,
name,
state,
type,
ROUND(total_mb / 1024, 2) TOTAL_GB,
ROUND(free_mb / 1024, 2) FREE_GB,
round((total_mb - free_mb) / (case total_mb
when 0 then
1
else
total_mb
end) * 100,
2) ratio
from v$asm_diskgroup;
===================================================================================
## 1. IO性能測(cè)試
===================================================================================
-----------------------------------------------------------------------------------
# 1.1 calibrate_io測(cè)試
-----------------------------------------------------------------------------------
SELECT D.NAME,
I.ASYNCH_IO
FROM V$DATAFILE D,
V$IOSTAT_FILE I
WHERE D.FILE# = I.FILE_NO
AND I.FILETYPE_NAME = 'Data File';
--Enabled both direct I/O and asynchronous I/O where possible.
ALTER SYSTEM SET filesystemio_options=setall SCOPE=SPFILE;
SET SERVEROUTPUT ON
DECLARE
l_latency PLS_INTEGER;
l_iops PLS_INTEGER;
l_mbps PLS_INTEGER;
BEGIN
DBMS_RESOURCE_MANAGER.CALIBRATE_IO (num_physical_disks => 26, --> 磁盤數(shù)量 select count(1) from v$asm_disk;
max_latency => 20, --> 最大延遲
max_iops => l_iops,
max_mbps => l_mbps,
actual_latency => l_latency);
DBMS_OUTPUT.put_line('Max IOPS = ' || l_iops);
DBMS_OUTPUT.put_line('Max MBPS = ' || l_mbps);
DBMS_OUTPUT.put_line('Latency = ' || l_latency);
END;
/
--監(jiān)控IO及HBA卡的速率
# sar -H 2 10000
-----------------------------------------------------------------------------------
# 1.2 fio測(cè)試
-----------------------------------------------------------------------------------
===================================================================================
## 2. 網(wǎng)絡(luò)性能測(cè)試
===================================================================================
-----------------------------------------------------------------------------------
# 2.1 netperf測(cè)試
-----------------------------------------------------------------------------------
cd /usr/contrib/bin/tools
--服務(wù)器端
# netserver -4 -L 192.168.30.76 -p 8000
--客戶端
# netperf -H 192.168.30.76 -p 8000 -n 20 -l 60
--測(cè)試UDP發(fā)包
# netperf -t UDP_RR -H 192.168.30.76 -p 8000 -l 10 -- -r 1500 1500
# netperf -t UDP_RR -H 192.168.30.76 -p 8000 -l 10 -- -r 9000 9000
-----------------------------------------------------------------------------------
## 2.2 iperf測(cè)試,Linux中為iperf3
-----------------------------------------------------------------------------------
--服務(wù)器端
# iperf -s -p 5001 -i 2
--客戶端
# iperf -c 192.168.30.76 -P 4 -t 30 -i 2 -p 5001
-----------------------------------------------------------------------------------
## 2.3 ftp速率測(cè)試
-----------------------------------------------------------------------------------
ftp> put "|dd if=/dev/zero bs=32k count=10000" /dev/null
-----------------------------------------------------------------------------------
# 2.4 MUT測(cè)試為9000 (tcpdump需要root權(quán)限)
-----------------------------------------------------------------------------------
--lan902 心跳網(wǎng)卡
--192.168.20.67 對(duì)端心跳網(wǎng)卡地址
--從該節(jié)點(diǎn)通過訪問對(duì)方的心跳IP來(lái)建立tcp連接,隨后看上面抓到的TCP包即可看到mss值。如果為8960,則說(shuō)明mtu為9000.
--通過netperf或ping進(jìn)行發(fā)包測(cè)試,ICMP 長(zhǎng)度為 8976
cd /usr/contrib/bin/tools
# tcpdump -i lan902 ip host 192.168.20.67
# telnet 192.168.20.67 22
# netperf -H 192.168.20.67 -p 8000 -n 20 -l 60
# ping 192.168.20.67 9000
===================================================================================
## 3. 高可用測(cè)試
===================================================================================
-----------------------------------------------------------------------------------
# 3.1 存儲(chǔ)鏈路測(cè)試
# 查看操作系統(tǒng)日志中鏈路disabled和endable狀態(tài),查看HBA卡數(shù)據(jù)流量信息
# 查看磁盤鏈路聚合情況
# 存儲(chǔ)鏈路測(cè)試過程中,全程開啟DBMS_RESOURCE_MANAGER.CALIBRATE_IO進(jìn)行加壓
-----------------------------------------------------------------------------------
--確認(rèn)設(shè)備鏈路
# ioscan -m dsf /dev/rdisk/disk101
# tail -f /var/adm/syslog/syslog.log
# sar -H 2 10000
-----------------------------------------------------------------------------------
# 3.2 網(wǎng)卡/交換機(jī)測(cè)試
# 查看集群日志是否有網(wǎng)絡(luò)中斷情況,查看ASM告警日志 (grid用戶)
# 查看網(wǎng)卡聚合情況,查看網(wǎng)卡日志,查看是否丟包
# 網(wǎng)絡(luò)測(cè)試過程中,全程開啟netperf發(fā)包進(jìn)行加壓
-----------------------------------------------------------------------------------
grid$ cd $ORACLE_HOME/log/`hostname`/; tail -f alert`hostname`.log
grid$ cd $ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace; tail -f alert_$ORACLE_SID.log
# glance -> l
# nwmgr -S apa -c lan902 -v
# cd /var/adm; netfmt -f nettl.LOG000
# ping IP
===================================================================================
## 4. HP-UX 硬件查看命令
===================================================================================
-----------------------------------------------------------------------------------
## 4.1 查看設(shè)備
-----------------------------------------------------------------------------------
--FC設(shè)備
# ioscan -fnCfc
--網(wǎng)卡設(shè)備
# ioscan -fnClan
-----------------------------------------------------------------------------------
## 4.2 查看FC設(shè)備狀態(tài)
-----------------------------------------------------------------------------------
# fcmsutil /dev/fcd1
-----------------------------------------------------------------------------------
## 4.3 查看磁盤多路徑信息
-----------------------------------------------------------------------------------
# ioscan -m dsf /dev/rdisk/disk101
-----------------------------------------------------------------------------------
## 4.4 查看網(wǎng)卡信息
-----------------------------------------------------------------------------------
# lanscan -qv
# netstat -inw
-----------------------------------------------------------------------------------
## 4.5 查看網(wǎng)卡綁定信息
-----------------------------------------------------------------------------------
--網(wǎng)卡綁定信息
# nwmgr -S apa -c lan902 -v
--網(wǎng)卡優(yōu)先級(jí)
# nwmgr -g -A all -c lan5 -S apa
===================================================================================
## 5. 日志收集
===================================================================================
-----------------------------------------------------------------------------------
## 5.1 ASM日志 (grid)
-----------------------------------------------------------------------------------
cd $ORACLE_BASE/diag/asm/+asm/$ORACLE_SID/trace; tail -f alert_$ORACLE_SID.log
-----------------------------------------------------------------------------------
## 5.2 集群日志 (grid)
-----------------------------------------------------------------------------------
cd $ORACLE_HOME/log/`hostname`/; tail -f alert`hostname`.log
-----------------------------------------------------------------------------------
## 5.3 數(shù)據(jù)庫(kù)日志 (oracle)
-----------------------------------------------------------------------------------
cd $ORACLE_BASE/diag/rdbms/`echo ${ORACLE_SID%?}`/$ORACLE_SID/trace; tail -f alert_$ORACLE_SID.log
-----------------------------------------------------------------------------------
## 5.4 操作系統(tǒng)日志 (root)
-----------------------------------------------------------------------------------
tail -f /var/adm/syslog/syslog.log
-----------------------------------------------------------------------------------
## 5.5 網(wǎng)卡日志 (root)
-----------------------------------------------------------------------------------
cd /var/adm; netfmt -f nettl.LOG000
當(dāng)前名稱:ORACLERAC安裝-性能與高可用測(cè)試
當(dāng)前網(wǎng)址:http://aaarwkj.com/article48/jegpep.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供Google、網(wǎng)站設(shè)計(jì)公司、網(wǎng)站建設(shè)、營(yíng)銷型網(wǎng)站建設(shè)、手機(jī)網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)