连接池中的最佳连接数 [英] Optimal number of connections in connection pool

查看:151
本文介绍了连接池中的最佳连接数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我们正在使用4个带有8GB RAM的cpu windows box,并在同一个盒子上安装了MySQL 5.x.我们正在为我们的应用程序使用Weblogic应用程序服务器我们针对我们的应用程序定位了200个并发用户(显然不适用于相同的模块/屏幕)。那么我们应该在连接池中配置什么是最佳连接数(最小和最大数量)(我们使用weblogic AS'连接池机制)?

Currently we are using 4 cpu windows box with 8gb RAM with MySQL 5.x installed on same box. We are using Weblogic application server for our application. We are targeting for 200 concurrent users for our application (Obviously not for same module/screen). So what is optimal number of connections should we configured in connection pool (min and max number) (We are using weblogic AS' connection pooling mechanism) ?

推荐答案

这个问题有一个非常简单的答案:

There is a very simple answer to this question:

连接池中的连接数应该等于exec的数量WebLogic中配置的线程

基本原理非常简单:如果连接数小于线程数,则某些线程可能正在等待连接,从而使连接池成为可能瓶颈。因此,它至少应该等于exec线程的数量(线程池大小)。

The rationale is very simple: If the number of the connections is less than the number of threads, some of the thread maybe waiting for a connection thus making the connection pool a bottleneck. So, it should be equal at least the number the exec threads (thread pool size).

这篇关于连接池中的最佳连接数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆