在測試ORACLE 10.2.0.4升級到10.2.0.5 Patch Set的過程中,遇到一個內核參數檢查失敗的問題,具體錯誤信息如下所示 實驗環境: 操作系統:Oracle Linux Server release 5.7 記憶體:4G 資料庫版本:10.2.0.4.0 Checking oper... ...
在測試ORACLE 10.2.0.4升級到10.2.0.5 Patch Set的過程中,遇到一個內核參數檢查失敗的問題,具體錯誤信息如下所示
實驗環境:
操作系統:Oracle Linux Server release 5.7
記憶體:4G
資料庫版本:10.2.0.4.0
Checking operating system requirements ...
Expected result: One of redhat-6,redhat-5,redhat-4,redhat-3,SuSE-11,SuSE-10,SuSE-9,asianux-3,asianux-2,asianux-1
Actual Result: redhat-5
Check complete. The overall result of this check is: Passed
=======================================================================
Checking operating system package requirements ...
Checking for make-3.81; found make-1:3.81-3.el5. Passed
Checking for binutils-2.17.50.0.6; found binutils-2.17.50.0.6-14.el5. Passed
Checking for gcc-4.1.1; found gcc-4.1.2-51.el5. Passed
Checking for libaio-0.3.106; found libaio-0.3.106-5. Passed
Checking for libstdc++-4.1.1; found libstdc++-4.1.2-51.el5. Passed
Check complete. The overall result of this check is: Passed
=======================================================================
Checking kernel parameters
Checking for semmsl=250; found semmsl=250. Passed
Checking for semmns=32000; found semmns=32000. Passed
Checking for semopm=100; found semopm=100. Passed
Checking for semmni=128; found semmni=128. Passed
Checking for shmmax=1073741824; found shmmax=68719476736. Passed
Checking for shmmni=4096; found shmmni=4096. Passed
Checking for shmall=2097152; found shmall=4294967296. Passed
Checking for file-max=101365; found file-max=65536. Failed <<<<
Checking for VERSION=2.6.18; found VERSION=2.6.32-200.13.1.el5uek. Passed
Checking for ip_local_port_range=9000 - 65500; found ip_local_port_range=1024 - 65000. Failed <<<<
Checking for rmem_default=1048576; found rmem_default=262144. Failed <<<<
Checking for rmem_max=1048576; found rmem_max=262144. Failed <<<<
Checking for wmem_default=262144; found wmem_default=262144. Passed
Checking for wmem_max=262144; found wmem_max=1048576. Passed
Check complete. The overall result of this check is: Failed <<<<
Problem: The kernel parameters do not meet the minimum requirements (see above).
Recommendation: Perform operating system specific instructions to update the kernel parameters.
=======================================================================
Checking Recommended glibc version
Expected result: ATLEAST=2.5-12 NOT_EQUALS=2.5-18
Actual Result: 2.5-65
Check complete. The overall result of this check is: Passed
=======================================================================
Checking physical memory requirements ...
Expected result: 922MB
Actual Result: 3956MB
Check complete. The overall result of this check is: Passed
=======================================================================
Checking available swap space requirements ...
Expected result: 3956MB
Actual Result: 13987MB
Check complete. The overall result of this check is: Passed
有點納悶,為什麼這些參數在10.2.0.1安裝和升級到10.2.0.4的時候都通過檢測,但是在應用補丁10.2.0.5時反而不能通過了呢?我們先看看原先的值
1:Checking for file-max=101365; found file-max=65536. Failed <<<<
這個失敗,很好理解,因為processes為 150,而參數65536 = 512*128 , 我們的進程數為150,大於128(fs.file-max = 512 x processes (for example 65536 for 128 processes) ,所以系統給了一個推薦值(具體怎麼計算,還沒弄清楚)
SQL> show parameter processes;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
aq_tm_processes integer 0
db_writer_processes integer 1
gcs_server_processes integer 0
job_queue_processes integer 0
log_archive_max_processes integer 2
processes integer 150
2:Checking for ip_local_port_range=9000 - 65500; found ip_local_port_range=1024 - 65000. Failed <<<<
這個參數,官方文檔推薦就是net.ipv4.ip_local_port_range = 9000 65500 ,也沒啥好說的。 The runInstaller (OUI) checks may expect this to be the old guidance of "1024 65000". The new guidance from Oracle development is "9000 65500". Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development.
3:關鍵是下麵這幾個參數為啥會失敗,有點納悶?
Checking for rmem_default=1048576; found rmem_default=262144. Failed <<<<
Checking for rmem_max=1048576; found rmem_max=262144. Failed <<<<
Check complete. The overall result of this check is: Failed <<<<
在官方文檔Requirements For Installing Oracle10gR2 On RHEL 5/OEL 5 (x86_64) (文檔 ID 421308.1)裡面有下麵介紹,也是上面的配置值
4. Set the kernel parameters
Add the following the lines in the file /etc/sysctl.conf
kernel.shmall = physical RAM size / pagesize For most systems, this will be the value 2097152. See Note 301830.1 for more information.
kernel.shmmax = 1/2 of physical RAM. This would be the value 2147483648 for a system with 4Gb of physical RAM. See Note 567506.1 for more information.
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 512 x processes (for example 65536 for 128 processes)
Development recommends a minimum of 327679 for active systems.
net.ipv4.ip_local_port_range = 9000 65500
(The runInstaller (OUI) checks may expect this to be the old guidance of 1024 65000.
The new guidance from Oracle development is 9000 65500.
Please allow the runInstaller (OUI) to proceed with the new guidance from Oracle development.)
net.core.rmem_default = 262144
net.core.rmem_max = 2097152
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
後面在官方文檔 Requirements For Installing Oracle10gR2 On RHEL 5/OEL 5 (x86_64) (文檔 ID 421308.1) 裡面看到,這個是ORACLE的一個bug來的,可以忽略這個錯誤,具體見截圖
參考資料:
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=344982606646540&parent=DOCUMENT&sourceId=851598.1&id=421308.1&_afrWindowMode=0&_adf.ctrl-state=1cop5qqt49_151
https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=438495963667013&id=1280606.1&displayIndex=1&_afrWindowMode=0&_adf.ctrl-state=820qp5uyz_4