参考文档:
GCS_SERVER_PROCESSES (oracle.com)
在awr报告中,看到addm建议如下:
其中有Global Cache Messaging和 Global Cache Congestion
Activity During the Analysis Period
-----------------------------------
Total database time was 2724 seconds.
The average number of active sessions was .75.Summary of Findings
-------------------Description Active Sessions RecommendationsPercent of Activity----------------------- ------------------- ---------------
1 Top SQL Statements .6 | 80.47 2
2 Hard Parse .03 | 3.33 0
3 Global Cache Messaging .02 | 3.15 1
4 Global Cache Congestion .02 | 2.4 1
关于Global Cache Congestion的建议如下:
ADDM建议增加参数gcs_server_processes的值
Finding 4: Global Cache Congestion
Impact is .02 active sessions, 2.4% of total activity.
------------------------------------------------------
Global Cache Service Processes (LMSn) in other instances were not processing
requests fast enough.Recommendation 1: Database ConfigurationEstimated benefit is .02 active sessions, 2.4% of total activity.-----------------------------------------------------------------ActionIncrease throughput of the Global Cache Service (LMSn) processes.Increase the number of Global Cache Service processes by increasing thevalue of the parameter "gcs_server_processes". Alternatively, if thehost is CPU bound consider increasing the OS priority of the GlobalCache Service processes.RationaleThe value of parameter "gcs_server_processes" was "8" during theanalysis period.Symptoms That Led to the Finding:---------------------------------Inter-instance messaging was consuming significant database time on thisinstance.Impact is .02 active sessions, 3.15% of total activity.Wait class "Cluster" was consuming significant database time.Impact is .03 active sessions, 3.33% of total activity.
查看gcs_server_processes参数的设置及相关参数(CPU、内存、SGA)
CPU为96,内存为256G ,SGA为80G
该RAC中的LMS数量为8
根据官网对该参数的介绍:
Oracle calculates the default value as follows (in order of precedence):
-
If
CLUSTER_DATABASE
is set tofalse
, then0
-
If Oracle ASM, then
1
-
If 1 - 3 CPUS, then
1
-
If 4 - 15 CPUs, then
2
-
If 128 or more CPUs and SGA is 100 GB or more, then (CPUs / 6). If the result includes a fraction, then the fraction is disregarded.
-
Otherwise, the value is 2 + (CPUs / 32). If the result includes a fraction, then the fraction is disregarded. For example, if you have 20 CPUs, then 2 + (20 / 32) would equal 2 GCS processes.
-
On NUMA-enabled systems with 32 or more CPUs, the value is rounded up to a multiple of the number of NUMA processor groups, with a limit of (CPUs / 4) rounded down to a multiple of the number of NUMA processor groups.
再看一个真实的例子 : 128 CPU,256G内存,SGA 122G
RAC中LMS为21:
根据官方的计算,第五条,128/6 = 21.33333 .去掉小数,21 。 与RAC统计中的lms吻合。
例子2 : 56 CPU ,256G 内存 ,SGA 52G
RAC中统计信息中,lms为 2
根据第六条的计算。 2+(56/32)= 3.75 . RAC中统计LMS=2 。吻合。
GCS_SERVER_PROCESS包含LMS和LM进程。 (上面计算出来gcs_server_process = 3, LMS=2 )。CPU数量也可能要以数据库的参数cpu_count为准??
GCS_SERVER_PROCESSES
specifies the number of background GCS server processes (LMSn and LMnn) to serve the inter-instance traffic among Oracle RAC instances.
END 。