Throttling WebSphere Liberty Batch Jobs

Similar documents
Creating a 'Job Class' for WebSphere Liberty Batch

Monitoring WebSphere Liberty Batch with Batch Events

WebSphere Liberty Batch Exploring the REST API

The Stack, Free Store, and Global Namespace

JSR The Future of Java Batch and WebSphere Compute Grid

Linked Lists. What is a Linked List?

WebSphere Application Server for z/os Version 8.5 Hidden Gems in the WAS z/os Maintenance Stream

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

A "Top Down" Configuration Approach to WebSphere on Z

BEGINNER PHP Table of Contents

MITOCW ocw f99-lec07_300k

David DeFlyer Class notes CS162 January 26 th, 2009

WP WAS z/os Connect Interceptor Configuration Examples

I'm Andy Glover and this is the Java Technical Series of. the developerworks podcasts. My guest is Brian Jakovich. He is the

Hi everyone. I hope everyone had a good Fourth of July. Today we're going to be covering graph search. Now, whenever we bring up graph algorithms, we

JSR 352 Java Batch Technical Overview

Known Features of WebSphere Application Server on z/os

Chris' Makefile Tutorial

MITOCW watch?v=flgjisf3l78

In our first lecture on sets and set theory, we introduced a bunch of new symbols and terminology.

05. SINGLETON PATTERN. One of a Kind Objects

MITOCW watch?v=w_-sx4vr53m

Formal Methods of Software Design, Eric Hehner, segment 1 page 1 out of 5

MITOCW watch?v=zm5mw5nkzjg

COMP 105 Homework: Type Systems

Skill 1: Multiplying Polynomials

Digital Marketing Manager, Marketing Manager, Agency Owner. Bachelors in Marketing, Advertising, Communications, or equivalent experience

Mapping Application Modules to Multiple Servers using WSADMIN

Binary, Hexadecimal and Octal number system

CPSC 320 Sample Solution, Playing with Graphs!

Meet our Example Buyer Persona Adele Revella, CEO

Changing a Cell's Host Name and System Name

Using X-Particles with Team Render

Benefit of Asynch I/O Support Provided in APAR PQ86769

COSC 2P95 Lab 9 Signals, Mutexes, and Threads

Post Experiment Interview Questions

Quick Start Guide. IBM JSR 352 Java Batch. Start. Start. A simple guide to setting up and using IBM's JSR 352 Java Batch support in Liberty Profile

Welcome to this IBM podcast, Realizing More. Value from Your IMS Compiler Upgrade. I'm Kimberly Gist

Permission and Ownership

Chrome if I want to. What that should do, is have my specifications run against four different instances of Chrome, in parallel.

HELPLINE. Dilwyn Jones

Should You Cloak Your Affiliate Link?

MITOCW ocw f99-lec12_300k

Basic Reports & Dashboards

This presentation will cover three areas of discussion: 1.A brief overview of batch processing as a way to set context and provide some background on

Introduction to Databases and SQL

COMP2100/2500 Lecture 17: Shell Programming II

Message Driven Bean In Liberty Profile V8.5.5

Troubleshooting SCA Problems in WebSphere Process Server Open Mic

COMP 213. Advanced Object-oriented Programming. Lecture 23. Shared Variables and Synchronization

Staleness and Isolation in Prometheus 2.0. Brian Brazil Founder

WBSR85 Unit 3 - Server Models

Introduction. Using Styles. Word 2010 Styles and Themes. To Select a Style: Page 1

Instructor: Craig Duckett. Lecture 03: Tuesday, April 3, 2018 SQL Sorting, Aggregates and Joining Tables

How to Improve Your Campaign Conversion Rates

PATTERN MAKING FOR THE PHOENIX HOOP

PROFESSOR: Well, now that we've given you some power to make independent local state and to model objects,

PROFESSOR: Well, yesterday we learned a bit about symbolic manipulation, and we wrote a rather stylized

Dispatch Timeout Improvements in WebSphere Application Server for z/os Version 7

PROFESSOR: Last time, we took a look at an explicit control evaluator for Lisp, and that bridged the gap between

IBM Education Assistance for z/os V2R2

Efficient String Concatenation in Python

Why Use Graphs? Test Grade. Time Sleeping (Hrs) Time Sleeping (Hrs) Test Grade

MITOCW MIT6_172_F10_lec18_300k-mp4

Getting Help...71 Getting help with ScreenSteps...72

How to Close Sales on the Final Day of a Launch

i2i Systems Self-Service Support Portal

The Benefits of SMS as a Marketing and Communications Channel From The Chat Bubble written by Michael

Interlude: Expressions and Statements

Computer Graphics Exercise 1 Image Processing

Lesson 1 using Dreamweaver CS3. To get started on your web page select the link below and copy (Save Picture As) the images to your image folder.

CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley

MITOCW watch?v=se4p7ivcune

Announcements. Chapter 7 for Friday

Visualizing Results when GaussView and Gaussian are Installed on Different Machines

4. Write sets of directions for how to check for direct variation. How to check for direct variation by analyzing the graph :

CircuitPython Made Easy on Circuit Playground Express

(Refer Slide Time: 02.06)

Who am I? I m a python developer who has been working on OpenStack since I currently work for Aptira, who do OpenStack, SDN, and orchestration

Rsyslog: going up from 40K messages per second to 250K. Rainer Gerhards

IBM Student Mainframe Challenge Part Three Time to complete about ten to twelve hours

Drag and Drop Form Builder. Data Verity #2 Erikka Baker James Miller Jordan Schmerge

Introducing Thrive - The Ultimate In WordPress Blog Design & Growth

Direct Variations DIRECT AND INVERSE VARIATIONS 19. Name

COSC 2P95 Lab 5 Object Orientation

MITOCW ocw apr k

Out for Shopping-Understanding Linear Data Structures English

School of Computer Science CPS109 Course Notes 5 Alexander Ferworn Updated Fall 15

What s an Operating System? Real-Time Operating Systems. Cyclic Executive. Do I Need One? Handling an Interrupt. Interrupts

Shared Variables and Interference

You might already know that tables are organized into vertical columns and horizontal rows.

6.001 Notes: Section 8.1

C - Colour Mixing. Let's use the Sparkle module and some switches to make a colour mixer! 2018 courses.techcamp.org.

6.001 Notes: Section 6.1

The following content is provided under a Creative Commons license. Your support

Problem One: A Quick Algebra Review

MITOCW watch?v=hverxup4cfg

In today s video I'm going show you how you can set up your own online business using marketing and affiliate marketing.

Workload Classification in WebSphere XD Compute Grid on z/os V.8

MITOCW watch?v=tkwnms5irbu

Transcription:

WebSphere Application Server Throttling WebSphere Liberty Batch Jobs This document can be found on the web at: www.ibm.com/support/techdocs Search for document number WP102600 under the category of "White Papers" Version Date: June 3, 2016 See "Document change history" on page 9 for a description of the changes in this version of the document IBM Software Group Application and Integration Middleware Software Written by: David Follis IBM Poughkeepsie 845-435-5462 follis@us.ibm.com Don Bagwell IBM Advanced Technical Sales 301-240-3016 dbagwell@us.ibm.com

Many thanks go to the WebSphere Batch team for getting all this work done. - 2 - Version Date: Friday, June 03, 2016

Table of Contents WP102600 Throttling WebSphere Liberty Batch Jobs Introduction... 4 Our Sample Scenario... 4 Multiple Activation Specifications... 5 What about Throttling?... 7 A word about dots vs. underscores... 8 Document change history... 9-3 - Version Date: Friday, June 03, 2016

Introduction WP102600 Throttling WebSphere Liberty Batch Jobs If you've looked through the Creating a Job Class for WebSphere Liberty Batch under the WP102600 Techdoc, then you already know how to use parameters specified when a job is submitted to control which Executor server the job runs inside. If you haven't read it, this might be a good time to go take a look. Everyone else, just read slowly until they catch up. The example presented in that paper is pretty simple. We have two batch applications deployed into two servers and we use a job parameter called jobclass to control which server runs any given job. That's just great, but what happens when you have a lot more applications and more than just one parameter you want to use to control job routing? That selector is going to become very complicated and easy to mess up. And what if you want to control how many of a particular job can run in a server at a time? There must be a way to manage that. Yes there is, and it is actually pretty easy to set up. For the purposes of this paper we're going to stick to a somewhat simple example, but we'll show how you can configure your server in a way that scales up without becoming insanely complex. Our Sample Scenario Over in WP102600 we had two applications: SleepyBatchletSample-1.0 and BonusPayout-1.0. We also had two jobclass values: A and B. In our configuration for that paper we had one executor configured to run either application when the jobclass was 'A' or not set. The other server also ran either application, but only for a jobclass of 'B'. For this paper we want the first server to run up to five instances of the SleepyBatchlet application in jobclass 'A' and up to two instances of BonusPayout in jobclass 'A'. Over in the second server we want up to ten instances of SleepyBatchlet in jobclass 'B' and up to one hundred instances of BonusPayout in jobclass 'B'. This is kind of what we had before with jobclass 'A' in the first server and jobclass 'B' in the second server, but we now want limits on how many jobs for each application can run in each server. Server One / jobclass A Server Two / jobclass B SleepyBatchlet 5 10 BonusPayout 2 100 To achieve the throttling we're going to use an existing configuration variable that is part of the activation specification we put in the server configuration. But there is a problem. We want different throttling values for different applications in the same server. How do we separate those out? - 4 - Version Date: Friday, June 03, 2016

Multiple Activation Specifications As you grow the number of applications in any given server or you increase the complexity of the parameters being used to route work, the message selector you specify in the Activation Specification gets more and more complicated. Imagine a server with six different applications where routing decisions for each application are made based on a couple of the parameters passed to those applications. Remember that you can route based on any job parameter, so jobs accessing one datasource might go to one server and jobs using another datasource go to another. Or routing based on an accounting string. Or some other combination of parameters. That single selector string is going to become very very complex and quite easy to ruin when you try to make a small change. Wouldn't it be nice if you could just specify the routing parameters (message selector) for each application separately? Turns out you can. Remember that when we configure a Liberty Server as a Batch Executor we have to include the configuration element batchjmsexecutor. That element points us to the queue and the activation specification elements. The queue reference gives us the queue manager and queue name (among other things) from which we get jobs to dispatch. The activation specification contains the message selector and other configuration. Can you have more than one batchjmsexecutor element in a server configuration? You certainly can. For our example we will have two in each server: <batchjmsexecutor activationspecref="batchactivationspec1" queueref="batchjobsubmissionqueue"/> <batchjmsexecutor activationspecref="batchactivationspec2" queueref="batchjobsubmissionqueue"/> Yes, those are exactly the same except the activation specification we point to in each one is slightly different (the '1' and '2' at the end of the reference name). You can define as many of these elements as you need. For each one you will, of course, have to have a matching activation specification definition. They will start out like this: <jmsactivationspec id="batchactivationspec1" > and <jmsactivationspec id="batchactivationspec2" > - 5 - Version Date: Friday, June 03, 2016

And each one is exactly the same except for the message selector. In Server one the selectors look like this: messageselector="com_ibm_ws_batch_applicationname = 'SleepyBatchletSample-1.0' AND (jobclass = 'A' OR jobclass IS NULL)" and messageselector="com_ibm_ws_batch_applicationname = 'BonusPayout-1.0' AND (jobclass = 'A' OR jobclass IS NULL)" And for Server two we have two batchjmsexecutor elements that point to the same queueref but different activation specifications. And the message selectors in those two are like this: messageselector="com_ibm_ws_batch_applicationname = 'SleepyBatchletSample-1.0' AND jobclass = 'B'" and messageselector="com_ibm_ws_batch_applicationname = 'BonusPayout-1.0' AND jobclass = 'B'" Those are pretty simple and straight-forward, right? And you could easily just add more batchjmsexecutor elements with more activation specifications for other applications or other specific routing rules. - 6 - Version Date: Friday, June 03, 2016

What about Throttling? This actually isn't a new thing. It isn't even a batch thing. This is just part of the activation specification configuration. How you do it depends on whether you are using MQ or the integrated messaging engine (SIBus). What you need to do is tell the activation specification how many concurrent messages to allow. The onmessage method (part of the batch container code) will be driven for each message and isn't counted as 'complete' until the method returns. And the batch container is coded to wait for the job to complete before returning. I should point out that the actual job runs on a different thread than the onmessage execution so you will be using two threads in the server per job you allow to run. Fortunately the Liberty executor thread pool expands automatically and will grow as needed to handle the number of jobs you allow to run. What are the configuration parameters? For MQ you specify the maxpooldepth. For the integrated messaging engine you specify maxconcurrency. The default for maxpooldepth is ten and the default for maxconcurrency is five. If we are using MQ, then the full activation specification definition for SleepyBatchlet in Server One could look like this: <jmsactivationspec id="batchactivationspec1" > <properties.wmqjms destinationref="batchjobsubmissionqueue" messageselector="com_ibm_ws_batch_applicationname = 'SleepyBatchletSample-1.0' AND (jobclass = 'A' OR jobclass IS NULL)" maxpooldepth="5" transporttype="client" channel="system.def.svrconn" destinationtype="javax.jms.queue" queuemanager="mqs1" hostname="wg31.washington.ibm.com" port="1414"> </properties.wmqjms> </jmsactivationspec> And that's all there is to it. If you have multiple applications or complex routing property rules you can set up separate batchjmsexecutor elements for each one and specify its rules in a separate jmsactivationspec element. And having done that you can separately throttle the number of jobs for that message selector using either maxpooldepth or maxconcurrency depending on which messaging engine you are using. - 7 - Version Date: Friday, June 03, 2016

A word about dots vs. underscores My first pass at exploring this capability just involved SleepyBatchlet. I thought that it would be fun to throttle based on how long the batchlet was going to sleep. The sleep time is based on a job parameter called sleep.time.seconds. I tried to configure the server with two activation specifications, both for SleepyBatchlet. One was for long running (sleeping) batchlets so I wanted to limit it to one job at a time if the sleep time was greater than 60 seconds. The other specification was for short(er) batchlets and would allow up to ten jobs that slept less than 60 seconds. And it didn't work. The problem is that you can't use sleep.time.seconds as a routing parameter because MQ doesn't allow dots in the property names. There is a note in the Knowledge Center about this, but you might have missed it. The rule is that any message properties have to start with a character for which Character.isJavaLetter( ) returns true and can consist only of characters for which Character.isJavaLetterOrDigit returns true. Which means no dots. - 8 - Version Date: Friday, June 03, 2016

Document change history WP102600 Throttling WebSphere Liberty Batch Jobs Check the date in the footer of the document for the version of the document. June 03 2016 Initial Version End of WP102600-9 - Version Date: Friday, June 03, 2016