Linux上安裝oracle的注意點
今天看了《tuning and optimizing rhel for oracle 9i and10gdatabases》這篇文的,感覺講得不錯,對linux下的管理有了一定的認識,這裡記錄下一些內容(主要是一些安裝時需要調整的核心引數,其它還有一些技術細節可檢視這份文件,是個不錯的參考)
1、 swap的設定
RAM Swap Space
--------------------------------------------
1 GB - 2 GB 1.5 times the size of RAM
2 GB - 8 GB Equal to the size of RAM
more than 8GB 0.75 times the size of RAM
一些實時的記憶體變化,可檢視/proc/meminfo,這裡包括記憶體的所有內容(swap,ram,hugepage ……)
2、 Setting SHMMAX Parameter
Shmmax表示一個共享記憶體段的最大值,由於sga都是在共享記憶體段中,所以,這個值的建議是等於sga的大小。另外,檢視oracle使用的共享記憶體段的大小,可通過
Ipcs –m
如果共享記憶體段不足,有可能會報:
ORA-27123: unable to attach to shared memory segment
修改共享記憶體段可通過如下途徑:
To determine the maximum size of a shared memory segment, run:
# cat /proc/sys/kernel/shmmax
2147483648
The default shared memory limit for SHMMAX can be changed in the proc file system without reboot:
# echo 2147483648 > /proc/sys/kernel/shmmax
Alternatively, you can use sysctl(8) to change it:
# sysctl -w kernel.shmmax=2147483648
To make a change permanent, add the following line to the file /etc/sysctl.conf (your setting may vary). This file is used during the boot process.
# echo "kernel.shmmax=2147483648" >> /etc/sysctl.conf
3、 Setting SHMMNI Parameter
Shmmni表示最大的共享記憶體段的數量,這個值對於oracle 9i和10g基本都是4096(預設值)。
檢視和設定shmmni的值:
To determine the system wide maximum number of shared memory segments, run:
# cat /proc/sys/kernel/shmmni
4096
The default shared memory limit for SHMMNI can be changed in the proc file system without reboot:
# echo 4096 > /proc/sys/kernel/shmmni
Alternatively, you can use sysctl(8) to change it:
# sysctl -w kernel.shmmni=4096
To make a change permanent, add the following line to the file /etc/sysctl.conf. This file is used during the boot process.
# echo "kernel.shmmni=4096" >> /etc/sysctl.conf
4、 Setting SHMALL Parameter
Shmall表示所有的共享頁(shared segment pages)的數量,這個值通常為shmmax/PAGE_SIZE
而一般情況下,page_size=4096(4K),如何獲得os的page_size呢
$ getconf PAGE_SIZE
4096
檢視和設定該值:
To determine the system wide maximum number of shared memory pages, run:
# cat /proc/sys/kernel/shmall
2097152
The default shared memory limit for SHMALL can be changed in the proc file system without reboot:
# echo 2097152 > /proc/sys/kernel/shmall
Alternatively, you can use sysctl(8) to change it:
# sysctl -w kernel.shmall=2097152
To make a change permanent, add the following line to the file /etc/sysctl.conf. This file is used during the boot process.
# echo "kernel.shmall=2097152" >> /etc/sysctl.conf
5、 Removing Shared Memory
有的時候,我們通過ipcs –m觀察共享記憶體段時,會發現如下情況:
$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x8f6e2129 98305 oracle 600 77694523 0
0x2f629238 65536 oracle 640 2736783360 35
0x00000000 32768 oracle 640 2736783360 0 dest
Status為dest表示該共享記憶體段是沒用的,但是又不能釋放掉,所以,我們需要手工把它給刪除掉。
我們可以通過如下命令檢視status為dest的更為細緻的資訊:
$ ipcs -m -i 32768
Shared memory Segment shmid=32768
uid=500 gid=501 cuid=500 cgid=501
mode=0640 access_perms=0640
bytes=2736783360 lpid=3688 cpid=3652 nattch=0
att_time=Sat Oct 29 13:36:52 2005
det_time=Sat Oct 29 13:36:52 2005
change_time=Sat Oct 29 11:21:06 2005
刪除該共享記憶體段,需要執行以下命令:
$ ipcrm shm 32768
還有一種辦法是使用oracle的sysresv命令,具體參考該文件內容
6、 hugepage
如果os的系統記憶體超過了64g,那麼就可以使用hugepage了,這樣,就能更高效得使用共享記憶體,因為 hugepage不會被swap out,而且,在定址方面,有更高的效能。
下面可檢視hugepage的一些基本設定
$ grep Huge /proc/meminfo
HugePages_Total:
HugePages_Free:
Hugepagesize: 2048 kB
預設情況下,Hugepagesize都是2M,那麼如果我們有充足的RAM,我們需要怎麼配置Hugepage呢,一般情況下,讓它等於oracle的sga大小就可以了。
設定vm.nr_hugepages =4096就可以了,具體,可參考metalink ID 744769.1
^_^,就到這裡了,其它的也不作詳細記錄了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-733179/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 在WINDOWS上安裝ORACLE RAC的注意事項WindowsOracle
- linux上安裝oracleLinuxOracle
- Oracle在Linux上的安裝OracleLinux
- 在Linux上安裝Sybase的注意事項(轉)Linux
- 安裝pybrain的注意點AI
- RedHat 5.1上安裝Oracle 10g 注意事項RedhatOracle 10g
- 在Oracle Linux 7.1上安裝DockerOracleLinuxDocker
- Oracle Linux 7上安裝Oracle 12cOracleLinux
- ORACLE 11G 安裝注意Oracle
- 在Oracle Linux 6.6上安裝Oracle 12cOracleLinux
- 安裝linux中的注意事項(轉)Linux
- linux 上 redis的安裝LinuxRedis
- Oracle——Linux的安裝OracleLinux
- 簡化 Oracle Linux 6 上的 Oracle Database 11g 安裝OracleLinuxDatabase
- oracle rac安裝配置注意事項Oracle
- 在oracle linux 5.6上安裝oracle 11g RACOracleLinux
- oracle 11g 之linux redhat 5.5上的安裝OracleLinuxRedhat
- Oracle11gR2 RAC在Linux上的安裝OracleLinux
- linux5.2上安裝oracle10gLinuxOracle
- 紅旗linux 4.1上安裝oracle 9204LinuxOracle
- 【解除安裝】通過全面刪除Linux系統上Oracle檔案的方式解除安裝OracleLinuxOracle
- weblogic安裝注意事項_linuxWebLinux
- linux 下oracle的安裝LinuxOracle
- oracle 12c rac 在aix 7.1 上安裝需要注意的IOCP問題OracleAI
- linux上安裝ELKLinux
- linux上安裝mongodbLinuxMongoDB
- linux 上安裝kapacitorLinux
- linux上安裝mysqlLinuxMySql
- linux上安裝VNCLinuxVNC
- Oracle10gRAC在Linux AS5.3上的安裝配置OracleLinux
- 如何在你的Linux機器上安裝執行OracleLinuxOracle
- Linux安裝oracleLinuxOracle
- linux 安裝ORACLELinuxOracle
- 在linux上安裝oracle10g(轉載)LinuxOracle
- 在vmware esxi上安裝panabit實現連線管控(防火牆)的注意點防火牆
- Android Studio ButterKnife Zelezny 安裝注意點Android
- SQL Server安裝補丁注意點--記錄SQLServer
- 【解除安裝】通過全面刪除Linux系統上Oracle檔案的方式解除安裝Oracle RACLinuxOracle