环境:linux 5.4 + oracle11g
首先看一下session的官方解析
SESSIONS specifies the maximum number of sessions that can be created in the system. Because every login requires a session, this parameter effectively determines the maximum number of concurrent users in the system. You should always set this parameter explicitly to a value equivalent to your estimate of the maximum number of concurrent users, plus the number of background processes, plus approximately 10% for recursive sessions.
可能很多人看到英语就不想看,其实我也是,百度到有英语的基本就略过了,其实,真实的、确切的还是英语的好点,毕竟个人的翻译总有偏差,反正我英语不咋滴,每次看到题目云里雾里,百度翻译后,才恍然大悟,原来说的是这个,所以还是要懂点英语的,不好意思扯远了。做一个深刻的反面教材还是很有必要的。
上面的话翻译过来就是,session指定了在系统中可以建立的session的最大数目。因为每个登陆都需要请求一个session,这个参数影响了在系统中的最大并发用户数。然后后面就是建议怎么设置session数的问题了。数量=(可能的连接数+后台进程数)*1.1。
翻译的有问题,欢迎放心大胆的指出,英语真的不好。
然后就是processes的官方解析
PROCESSES specifies the maximum number of operating system user processes that can simultaneously connect to Oracle. Its value should allow for all background processes such as locks, job queue processes, and parallel execution processes.
The default values of the SESSIONS and TRANSACTIONS parameters are derived from this parameter. Therefore, if you change the value of PROCESSES, you should evaluate whether to adjust the values of those derived parameters.
processes指定了可以同时连接到oracle的最大操作系统用户数,os层面。它的值应该大于或等于所有的后台进程例如锁、作业、并行处理程序的总数。其中sessions和transactions参数的默认值都是由这个参数所派生出来的。所以,你要改变processes的时候,要考虑一下派生出来的值是否需要调整。
processes和sessions的数量关系:sessions>=(processes值+后台process数量)*1.4~1.5
以下是个人的见解,不一定正确,错误之处希望指出。
由于session 由 process所建立,所以process相当于session的基础,而处理多少session的能力要看process,即process决定了session,所以当日常用户的并发数为120的时候,此时应当设置相应的process的值为120以确保当并发用户数达到或者超过session上限时,有足够的process可以处理session。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30824085/viewspace-2113726/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30824085/viewspace-2113726/