In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "what are the solaris memory parameters". In the daily operation, I believe many people have doubts about the solaris memory parameters. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "what are the solaris memory parameters?" Next, please follow the editor to study!
I. description of solaris memory parameters
Shared memory: shared memory segment:
An area of memory that can be read by different processes. Oracle uses it to form a SGA. Oracle uses the following three methods to create a SGA zone:
1. Use a single shared memory segment.
2. Use multiple consecutive shared memory segments.
3. Use multiple discontiguous shared memory segments.
Oracle uses the first method first, and if it is successful, it continues initialization, if it is not successful, it uses the second method, and if it is not successful, it uses the third method. If it does not succeed again, initialization fails and Oracle reports an error code.
Semaphore:
Can be seen as a mark. You can have both On and Off states. Oracle uses semaphores to realize the access control of the server process to the SGA area.
Shared memory and semaphore are important resources for Oracle to run on Unix. If the Oracle instance does not get the required resources, the instance startup will fail.
Parameters:
For a Solaris system running an Oracle instance, change some parameters about shared memory in the / etc/system file so that the Oracle instance can function properly. If you have more than one instance, you need to recalculate some values according to the following method.
Shmmax
Meaning: this setting does not determine how much physical memory is used by the Oracle database or operating system, only the maximum amount of memory that can be used. This setting does not affect the kernel resources of the operating system.
Setting method: 0.5 * physical memory. If the physical memory is 20g, then 0.5x20g × 1024 × 1024mm 10485760
Example: Set shmsys:shminfo_shmmax=10485760
Shmmin
Meaning: the minimum size of shared memory.
Setting method: generally set to 1.
Example: Set shmsys:shminfo_shmmin=1
Shmmni
Meaning: the maximum number of shared memory segments in the system. The recommended values are 100 or 128.
Example: Set shmsys:shminfo_shmmni=100
Shmseg
Meaning: the maximum number of shared memory segments that each user process can use. The recommended value is 20 or 10.
Example: Set shmsys:shminfo_shmseg=20
Semmni
Meaning: the maximum number of semaphore identifierer in the system. The recommended values are 100 or 128.
Setting method: set the value of this variable to the value of the largest processes in the init.ora of all instances of Oracle on this system plus 10.
Example: Set semsys:seminfo_semmni=100
Semmns
Meaning: the maximum number of semaphores in the system.
Setting method: this value can be calculated by the following ways: the sum of the values of processes in the initSID.ora of each Oracle instance (excluding the largest Processes parameter) + the number of the largest Processes × 2 × 10 × Oracle instances. For details, see "(semmns calculation example)" below.
Example: Set semsys:seminfo_semmns=200
Semmsl
Meaning: the maximum number of semaphore in a set.
Setting method: set the value of the largest Processes in the InitSID.ora of all 10 + Oracle instances. For details, see "(SEMMSL calculation example)" below.
Example: Set semsys:seminfo_semmsl=200
After changing the above parameters in / etc/system, restart the computer:
$reboot
Then check the current parameters:
$sysdef-I
If the system parameters remain unchanged, use the following command:
$modload / kernel/sys/shmsys.
2. Calculation of parameters when oracle is installed under solaris
SHMMAX maximum size of a shared memory segment
(maximum number of bytes of shared memory segment)
SHMMIN minimum size of shared memory segment
(minimum size of shared memory segment)
SHMMNI maximum number of shared memory identifiers in the system
(maximum number of shared memory identifiers in the system)
SHMSEG maximum number of shared memory segments a user process can attach
(maximum number of shared memory segments that can be allocated per user process)
SEMMNI maximum number of semaphore identifiers in the system
(maximum number of semaphore identifiers in the system)
SEMMSL maximum number of semaphores in a set
(maximum number of semaphores in each (semaphore) set)
SEMMNS maximum number of semaphores in the system
(maximum number of semaphores in the system)
SEMOPM maximum number of operations per semop call
(maximum number of semaphores per semop call)
SEMVMX semaphore maximum value
(maximum value of semaphore)
Set semsys:seminfo_semmni 100
Set semsys:seminfo_semmns 1024 (semmns calculation example)
The sum of the processes values in the "init [Sid] .ora" file of each Oracle instance in the system (excluding the largest PROCESSES value) + the number of Oracle instances with the largest Oracle value * 2 + 10.
Note: [SID] is the specific database instance name.
For example, for a system with three Oracle instances, the PROCESSES parameter in their "initsid.ora" file is set to the following values:
ORACLE_SID=A, PROCESSES=100
ORACLE_SID=B, PROCESSES=100
ORACLE_SID=C, PROCESSES=200
Then the SEMMSL value is calculated as follows (SEMMSL calculation example):
SEMMSL = [(cym200) + 10] = 210
The SEMMNS value is calculated as follows:
SEMMNS = [(Aq100) + (Bath100)] + [(Cym200) * 2] + [(# of instances=3) * 10] = 630
Set semsys:seminfo_semmsl 256
The value of SEMMSL can be calculated in the following ways:
The largest processes value + 10 in the "init [Sid] .ora" file for all Oracle instances
Set semsys:seminfo_semvmx 32767
Set semsys:seminfo_shmmax 12884901888
24g * 0.5 * 1024mm 1024 (24g is physical memory)
Set semsys:seminfo_shmmin 100
Third, the setting of memory parameters by solaris11
1. Use prctl to adjust
Prctl-n project.max-shm-memory-v 10G-r-i project default
Prctl-n project.max-sem-ids-v 256-r-i project default
Prctl-n project.max-shm-ids-v 256-r-i project default
The changes made in this way will be invalidated after the system is restarted.
2. Create project, and the adjustment will be recorded in / etc/project
You can use the following methods to create a separate project for oracle users, and then modify the corresponding values
Projadd-U oracle user.oracle
Projmod-a murk "project.max-shm-memory= (priv,10g,deny)" user.oracle
Projmod-a murk "project.max-sem-ids= (priv,100,deny)" user.oracle
Projmod-a murk "process.max-sem-nsems= (priv,500,deny)" user.oracle
Projmod-a murk "project.max-shm-ids= (priv,100,deny)" user.oracle
After modification, as long as you switch to the oracle user settings, it will take effect, and it will not be lost after reboot. For more details on the operation of project, please refer to the corresponding manual of solaris. The method of modifying / etc/system in the future should be gradually replaced by this method.
At this point, the study of "what are the solaris memory parameters" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.