2006-10-16 17:53
meidayhxp
解决Oracle 10 / Solaris 10在安装过程当中Out of Memory问题
[b][font=Times New Roman].:lol :lol :lol :lol ;P :P :P [/font][/b][b][font=宋体]解决[/font][/b][b][font=Times New Roman]Oracle 10 / Solaris 10[/font][/b][b][font=宋体]在安装过程当中[/font][/b][font=Times New Roman][b][color=black]O[/color][color=black]ut of [/color][/b][b][color=black]M[/color][color=black]emory[/color][/b][/font][b][color=black][font=宋体]问题[/font][/color][color=black][/color][/b]
[color=black][font=Times New Roman]Many kernel parameters have been replaced by so called resource controls in Solaris 10. It is possible to change resource controls using the prctl command. All shared memory and semaphore settings are now handled via resource controls, so any entries regarding shared memory or semaphores (shm & sem) in /etc/system will be ignored.[/font][/color]
[color=black][font=Times New Roman]Here is the procedure we followed to modify the kernel parameters on Solaris 10 / Oracle 10.2.0.2.[/font][/color]
[color=black][font=Times New Roman]Unlike earlier releases of Solaris, most of the system parameters needed to run Oracle are already set properly, so the only one you need is the maximum shared memory parameter. In earlier versions this was called SHMMAX and was set by editing the /etc/system file and rebooting. With Solaris 10 you set this by modifying a «Resource Control Value». You can do this temporarily by using prctl, but that is lost at reboot so you will need to add the command to the oracle user's .profile.[/font][/color]
[color=black][font=Times New Roman]The other option is to create a default project for the oracle user.[/font][/color]
[color=red][font=Times New Roman]# projadd -U oracle -K "project.max-shm-memory=(priv,4096MB,deny)" user.oracle [/font][/color][color=red][font=宋体]我的虚拟机是[/font][/color][color=red][font=Times New Roman]512M[/font][/color][color=red][font=宋体]的所以在此改为[/font][/color][color=red][font=Times New Roman]512M [/font][/color]
[color=red][font=Times New Roman]projadd -U oracle -K "project.max-shm-memory=(priv,1024MB,deny)" user.oracle[/font][/color]
[color=black][font=Times New Roman]What this does:[/font][/color]
[color=black][font=Times New Roman]o Makes a project named "user.oracle" in /etc/project with the user oracle as it's only member. [/font][/color]
[color=black][font=Times New Roman]# cat /etc/project[/font][/color]
[color=black][font=Times New Roman]system:0::::[/font][/color]
[color=black][font=Times New Roman]user.root:1::::[/font][/color]
[color=black][font=Times New Roman]noproject:2::::[/font][/color]
[color=black][font=Times New Roman]default:3::::[/font][/color]
[color=black][font=Times New Roman]group.staff:10::::[/font][/color]
[color=black][font=Times New Roman]user.oracle:100::oracle::project.max-shm-memory[/font][/color]
[color=black][font=Times New Roman] =(priv,4294967296,deny)[/font][/color]
[color=black][font=Times New Roman]o Because the name was of the form "user.username" it becomes the oracle user's default project.[/font][/color]
[color=black][font=Times New Roman] [/font][/color]
[color=black][font=Times New Roman]o The value of the maximum shared memory is set to 4GB, you might want to use a larger value here if you have more memory and swap.[/font][/color]
[color=black][font=Times New Roman] [/font][/color]
[color=black][font=Times New Roman]o No reboot is needed, the user will get the new value[/font][/color]
[color=black][font=Times New Roman]at their next login. [/font][/color]
[color=black][font=Times New Roman]Now you can also modify the max-sem-ids Parameter:[/font][/color]
[color=red][font=Times New Roman]# projmod -s -K "project.max-sem-ids=(priv,256,deny)" user.oracle[/font][/color]
[color=black][font=Times New Roman]Check the Paramters as User oracle[/font][/color]
[color=red][font=Times New Roman]$ prctl -i project user.oracle[/font][/color]
[color=black][font=Times New Roman] [/font][/color]
[color=black][font=Times New Roman]project: 100: user.oracle[/font][/color]
[color=black][font=Times New Roman]NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT[/font][/color]
[color=black][font=Times New Roman]project.max-contracts[/font][/color]
[color=black][font=Times New Roman] privileged 10.0K - deny -[/font][/color]
[color=black][font=Times New Roman] system 2.15G max deny -[/font][/color]
[color=black][font=Times New Roman]project.max-device-locked-memory[/font][/color]
[color=black][font=Times New Roman] privileged 125MB - deny -[/font][/color]
[color=black][font=Times New Roman] system 16.0EB max deny [/font][/color]