网络逻辑问题
我有几个问题
1)我们如何在 weblogic 配置中定义特定应用程序允许或一次可以允许多少个并发用户?
2)我们如何知道 weblogic 中一次使用了多少个线程?
3)我应该设置多少个最大jdbc连接,这样用户就不会因为所有连接用完而被阻止。如何在jdbc连接最大允许的并发用户/线程数之间保持平衡?
谢谢
I have a couple of questions
1) How can we define in weblogic configuration how many concurrent users are allowed or can be allowed at a time to a particular application?
2) how can we tell how may threads are being used in a weblogic at a time?
3) How many max jdbc connections should I set so that users are not blocked due to all connections used up. How to keep a balance between number of concurrent user/threads allowed to jdbc connections max?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
每个用例场景都不同。
但通常 WLS 1 个实例可以覆盖每个实例 50~100 个活跃用户。
该实例有 2 个 CPU 和 1~1.5GB 堆。
本文档对您的问题很有用:
“Web应用服务器规划实例数和线程数”
It is different in each use case scenario.
But usually WLS 1 instance can cover 50~100 active user per instance.
The instance has 2 CPU and 1~1.5GB heap.
This document will be useful to your question:
"Planning Number Of Instance And Thread In Web Application Server"
1) 您可以使用工作管理器来执行此操作来管理请求。但是,限制并发用户数会因应用程序而异。如果它是 Web 应用程序,请使用工作管理器,其最大约束等于您想要限制的用户数量。但是,请确保您弄清楚如何处理溢出 - 当您收到 100 个请求但有 5 个用户限制时,您会怎么做?这是同步处理还是异步处理?
2) 理想情况下,您希望池中线程与连接的比例为 1:1。这保证没有线程(用户请求)正在等待连接。我建议尝试这个。您可以使用 WebLogic 控制台监控 JDBC 连接池,并将字段添加到连接的“监控”选项卡下的列中。如果您有大量的服务员和/或较长的等待时间,那么您可能希望增加池中的连接数。您可以从 1:0.75 的线程:连接比率开始,进行性能/负载测试并根据您的发现进行调整。这实际上取决于您管理连接的程度。从数据库获取数据后立即释放连接,还是继续执行应用程序逻辑并在方法/逻辑结束时释放连接?如果长时间保持连接,您可能需要接近 1:1 的比率。
1) You can user Work Managers to do this for managing requests. However, restricting the number of concurrent users will vary application to application. If it is a web app, use the work managers with a max constraint equal to the number of users you want to restrict it to. However, be sure you figure out how to handle overflow - what will you do when you get 100 requests but have a 5-user restriction? Is this synchronous or asynchronous processing?
2) Ideally you would want a 1:1 ratio of threads to connections in the pool. This guarantees that no thread (User Request) is waiting for a connection. I would suggest trying this. You can monitor the JDBC connection pools using the WebLogic console and adding fields to the columns under the 'Monitoring' tab for the connection. If you have a high number of waiters, and/or a high wait time then you would want to increase the number of connections in the pool. You could start with a 1:0.75 ratio of threads:connections, do performance/load testing and adjust based on your findings. It really depends on how well you manage the connections. Do you release the connection immediately after you get the data from the database, or do you proceed with application logic and release the connection at the end of the method/logic? If you hold the connection for a long time you will likely need closer to a 1:1 ratio.
1) 如果为每个用户分配一个会话,那么您可以在 webapp weblogic 描述符中控制最大会话数,例如添加以下约束:
它比限制会话数更有效(如果您的意思是 1 个用户 = 1 个会话)工作经理的要求。
当您无法预测会话大小和用户数量时,另一种方法是调整内存过载参数并设置:
更多信息此处:
http://download.oracle.com/docs /cd/E12840_01/wls/docs103/webapp/sessions.html#wp150466
2) 容量线程由 WebLogic 通过工作管理器进行管理。默认情况下,只有一个存在:默认具有无限数量的线程(!!!)。
3) 通常,使 JDBC 连接数适应线程数更为有效。
以下页面肯定会引起人们的极大兴趣:
http://download.oracle.com/docs/cd/E11035_01 /wls100/config_wls/overload.html
1) If to each user you assign a session, then you can control the max number of sessions in your webapp weblogic descriptor, for example adding the following constraint :
It's more effective (if you mean 1 user = 1session) than limiting the number of requests by work managers.
Another way, when you can't predict the size of sessions and the number of users, is to adjust memory overloading parameters and set :
More info here :
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/webapp/sessions.html#wp150466
2) Capacity of threads is managed by WebLogic through work managers. By default, just one exists : default with unllimited number of threads (!!!).
3) Usually, adapting the number of JDBC connections to the number of threads is the more effective.
The following page could surely be of great interest :
http://download.oracle.com/docs/cd/E11035_01/wls100/config_wls/overload.html
中控制此类内容
,您必须在
weblogic-xml-jar.xml
或weblogic.xml
据我所知,如果您寻找
weblogic-xml- jar.xml
命令你可以找到你想要的。As far as I know you have to control these kind of things in
weblogic-xml-jar.xml
orweblogic.xml
If you look for
weblogic-xml-jar.xml
commands you can find your desire .