[z/OS]

通过在 ASF 方式下将 IBM MQ 用作消息传递提供程序,在 z/OS 上调整消息驱动的 Bean 处理

如果正在 z/OS® 平台上运行 WebSphere® Application Server(其中 IBM MQ 是消息传递提供程序,并且已按应用程序服务器工具 (ASF) 方式部署消息驱动的 Bean),可调整消息驱动的 Bean 处理。

开始之前

要调整消息驱动的 Bean 处理,需要考虑各种设置配合使用。可考虑使用许多不同的值和可能性,因为各种工作负载都可在任何给定服务器上运行。

当消息驱动的 Bean 映射(即侦听)至队列或映射至主题(通过持久预订)时,JMS 消息首先会进入应用程序服务器中的控制器,所以我们说该服务器“在控制器中侦听”这些消息。在有关调整消息驱动的 Bean 处理的描述中,通篇使用了“在控制器中侦听”这一术语。

关于此任务

如果在服务器中调整消息驱动的 Bean 处理,那么还需要考虑调整服务器的整个工作负载及两者之间的交互。

要调整消息驱动的 Bean 处理,请考虑所有以下设置配合使用:
  • WLM 服务类定义
  • WebSphere Application Server 工作负载概要文件选择
  • 消息侦听器服务侦听器端口设置
  • JMS 连接工厂池设置
  • IBM MQ 队列管理器设置
很难给出有关要为其中每个设置选择的值的建议,因为可在任何给定服务器中运行各种工作负载。有许多可能性需要考虑,包括以下因素:
  • 消息驱动的 Bean 的数目。
  • 管理配置选项,例如是将两个消息驱动的 Bean 映射至同一个侦听器端口还是映射至不同的侦听器端口。
  • 消息驱动的 Bean 的工作重要性,与服务器中运行的其他(HTTP 和 IIOP)工作类型相比。

以下建议设置提供了一个起点,假定仅对服务器配置了一个应用程序,该应用程序由已在此服务器上安装并正在运行的单个消息驱动的 Bean 组成。

z/OS 上的“在控制器中侦听”案例中较详细地讨论描述了建议背后的理由,并较详细地描述了侦听器端口功能。它们共同帮助您为自己的系统和服务器选择设置。

过程

  1. 将侦听器端口最大会话数属性至少设置为可供整个服务器使用的最大服务方工作线程数的两倍。 此属性值确定了阈值上限(阈值上限 = 最大会话数),调速功能使用此属性值来确定是阻塞请求还是允许请求。
    1. 启动管理控制台。
    2. 在导航窗格中,单击 服务器 > 服务器类型 > WebSphere 应用程序服务器->server_name > [通信] 消息传递 > 消息侦听器服务 > [其他属性] 侦听器端口 > listener_port 将显示消息侦听器端口集合面板。
    3. 选择您要使用的侦听器端口名。 将显示侦听器端口设置面板。
    4. 最大会话数属性设置为要让消息驱动的 Bean 调速功能使用的阈值上限值。 建议的最小值按以下计算公式进行计算:
      2 * (maximum number of servants) * (number of worker threads in one servant)

      Here “servants” means the same as “server instances” on the administrative console. To calculate the number of worker threads in a single servant, see the description of “Workload profile” in ORB services advanced settings.

    To learn more about setting the Listener Port maximum sessions property, see the information about message-driven beans and tuning settings on z/OS.

  2. Set the IBM MQ queue connection factory properties.
    1. To view this administrative console page, click 资源 > JMS->队列连接工厂.
    2. Select the queue connection factory specified for the listener port.
    3. From the Additional Properties, select the Connection Pool panel.
    4. Set the Max Connections property for the Connection Pool. Allow one connection for each message-driven bean. This property value might include message-driven beans mapped onto different listener ports, if those listener ports were each, in turn, mapped onto the same connection factory. To learn more about this setting, see the information about message-driven beans and tuning settings on z/OS.
    5. From the Additional Properties of the queue connection factory, select the Session Pool panel.
    6. Set the Max Connections property for the session pool. Allow one session for each worker thread in a single servant. Set this property to at least the number of worker threads available to a single servant. To learn more about this setting, see the information about message-driven beans and tuning settings on z/OS.
  3. Set the IBM MQ-related properties. Make sure that the backing IBM MQ queue manager has been configured with enough resources to support the intended JMS workload coming from WebSphere Application Server (and other clients). In particular, consider your queue manager CTHREAD, IDBACK, and IDFORE parameter settings. For more information on these IBM MQ settings, see the IBM MQ information center.

示例

  1. If your server is configured with the maximum server instances value set to 3, (whatever the minimum number might be), and if your workload profile is LONGWAIT (which means that each servant contains 40 worker threads), set your listener port maximum sessions value to at least
    240 = 2 * 3 * 40
  2. Suppose that your application contains two individual message-driven beans, each of which has an onMessage() implementation that forwards the message to another JMS destination. Therefore, each message-driven bean needs its own JMS connection factory to complete this task. Suppose the Administrator has mapped each message-driven bean JMS connection factory resource reference onto the same administratively-defined connection factory used by the listener port that each of these message-driven beans is mapped onto.

    In this case, you need to set the connection factory Connection Pool Max Connections value to 42. One connection for each of the two message-driven beans to be used by the listener port, and one connection potentially for each of the 40 onMessage() dispatches that night be running concurrently. (Remember that the connection pool is a per-servant pool).

  3. Set the connection factory Session Pool Max Connections to 40, the number of worker threads in a single servant, regardless of the number of servants.

For debugging tips, refer to [z/OS]优化 MDB 调速支持以在 z/OS 中进行调试.


指示主题类型的图标 任务主题



时间戳记图标 最近一次更新时间: last_date
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tprf_tunezmdb
文件名:tprf_tunezmdb.html