The shared memory file system can be mounted automatically by adding the following line into /etc/fstab file:mount -t shm shmfs -o size=3g /dev/shm
In the above example I've created the shmfs with a size of 3G as that is the size of the buffer cache I am planning to use. The other elements of the SGA are placed in regular memory, not this shared memory file system, so they should not be included when deciding on the size of the shmfs. It is advisable to size this slightly bigger than the actual size needed, but in this example I've used a 3G shmfs for a 3G buffer cache.shmfs /dev/shm shm size=3g 0 0
bigpages=xMB to the relevant kernel entry in the boot loader file /boot/grub/grub.conf file, where "x" is calculated as follows:
Then round this value to the nearest hundredth. So for a 4G SGA we would do the following:(Total SGA size in Gig) x 1024
So the /boot/grub/grub.conf file entry might look like this:4 x 1024 = 4096 = 4100
With this entry saved the system should be rebooted. Once the system is available you must perform the following command as the root user:kernel /vmlinuz-2.4.9-e.40enterprise ro root=/dev/cciss/c0d0p2 bigpages=4100MB
Alternatively you can add the following entry into the /etc/sysctl.conf file so this value persists between reboots:echo 2 > /proc/sys/kernel/shm-use-bigpages
kernel.shm-use-bigpages = 2
Add these commands into the "/etc/rc.local" file. As with the RHEL 2.1 method, only the buffer cache is stored in this location.umount /dev/shm
mount -t ramfs ramfs /dev/shm
chown oracle:oinstall /dev/shm
In reality, it is better to oversize it a little.oracle soft memlock 2097152
oracle hard memlock 2097152
Alternatively it can be set in the /etc/sysctl.conf file with the following entry:echo 3221225472 > /proc/sys/kernel/shmmax
The contents of your /etc/sysctl.conf file may look something like this:kernel.shmmax = 3221225472
Alterations to the /etc/sysctl.conf file can be applied without a reboot by issuing the following command as root:kernel.shmmax = 3221225472
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 1000 32000 100 150
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
kernel.shm-use-bigpages = 2
/sbin/sysctl -p
The following parameter should be added to the spfile or pfile:-- Change the parameter value in the spfile directly.
ALTER SYSTEM SET parameter = value SCOPE=spfile
-- Create a pfile with the contents of the current spfile.
CREATE PFILE='/tmp/pfile' FROM SPFILE;
-- Manually manipulate the contents of the pfile.
-- Recreate the spfile from the amended pfile.
CREATE SPFILE FROM PFILE='/tmp/pfile';
Also, any references to db_cache_size and db_xK_cache_size parameters should be removed and replaced with the old style db_block_buffers parameter entry:use_indirect_data_buffers=true
This means that the multiple block size feature is not available when using this method. Remember that the buffer cache is only one part of the SGA.[@more@]# 3Gig for an 8K db_block_size. ((3 * 1024 * 1024) / 8) = 393216
db_block_buffers = 393216
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9907339/viewspace-1048977/ ,如需转载,请注明出处,否则将追究法律责任。