Memory Requirements for JRules on IBM zSeries
This week Albin Carpentier and I helped to run JRules memory consumption benchmarks on IBM zSeries. Within R&D we have 24×7 remote access to a machine we rent from IBM in Dallas, Texas. A large bank in Europe is evaluating deploying JRules on the mainframe and Albin was able to quickly deploy the Rule Execution Server to WebSphere and DB2 running on z/OS so we could gather memory consumption statistics to help inform their decision.
The configuration tested was: zOS 1.9, DB2 8.1, WebSphere Application Server 6.1.0.16 and IBM JDK 5.
We used a proof of concept ruleset containing representative rules that were cloned to create rulesets with 33, 66, 132, 264 and 528 rules. Memory consumption was measured using the JDK 5 MemoryMXBean and MemoryPoolMXBean. We ran three scenarios:
- Invoking the engine within a JVM (no WebSphere) using IlrContext,
- Rule Execution Server on WAS using J2SE provider,
- Rule Execution Server on WAS using POJO provider.
The product performed very well and we saw linear scalability in all three scenarios. The highest heap memory usage we saw was a very modest 35 MB on WebSphere with the Rule Execution Server.








June 26th, 2008 at 11:31 am
Hi Daniel,
This is interesting. I’ve been thinking for some time now about applying business rules and business transformations within the context of batch processing; where business rules can be applied to a domain object that is managed in a batch loop. I’m especially interested in finding ways to build some JRules patterns on top of the BDS Framework and the batch processing facility in WebSphere provided by WebSphere XD Compute Grid. You can find more information at the following links:
Eclipse Workspace with our development tooling: http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=190623&tstart=0
Overview of the batch development tooling for WebSphere XD Compute Grid: http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=190624&tstart=0
Overview of the batch processing infrastructure provided by WebSphere XD Compute Grid:
http://www.ibm.com/developerworks/websphere/techjournal/0804_antani/0804_antani.html
Overview of developing batch applications with WebSphere XD Compute Grid: http://www.ibm.com/developerworks/websphere/techjournal/0801_vignola/0801_vignola.html
and finally a link to our discussion forum: http://www-128.ibm.com/developerworks/forums/forum.jspa?forumID=1240&start=0
I’m interested in your thoughts and the thoughts of your team, please feel free to post on the forum or send me questions directly.
June 26th, 2008 at 11:43 am
I apologize, some of the links I posted are incorrect:
Eclipse workspace with our tooling and batch development environment: http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=210834&tstart=0
Overview of our batch development tooling story: http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=190624&tstart=0
Thanks,
Snehal
June 30th, 2008 at 6:47 pm
Snehal,
The sample is great! I have been looking for a readily run sample for XD and it takes me less than a minute to set that up.
There are a couple comments. I have been looking around for a batch solution that applying business rules for data transformation. XD and Spring Batch are the two I am looking at.
I am thinking that it would be more convenient to have List as the type for interface argument and return object so that JRules can load the partition of data for faster processing. The number of records (size of the list) can be configurable.
>>public Object processRecord(Object domainObject)
The idea is that, if the object is large and I want to send the request to our execution server remotely for load balancing(knowing that JEE remote call might not be fit for batch app), I want to minimize the remote call.
How does XD compare to SpringBatch? Do you know if job monitoring user interface is provided in XD or any JMX API available for external tool to query the job status? Do you guys also plan to provide wizards/editors in eclipse to facilitate the batch application development?
July 2nd, 2008 at 2:29 pm
YeePin,
Thanks for the feedback :). In terms of comparing Spring Batch to Compute Grid, you can read more about the differences here: http://www-128.ibm.com/developerworks/forums/thread.jspa?threadID=190609&tstart=0
The key point though is that Compute Grid delivers a complete batch processing platform (programming model and runtime infrastructure), whereas Spring Batch focuses on the programming model and still requires that you find a runtime infrastructure to host it.
If I understand JRules correctly, what you would try to do is have a list of records to process, and that each item in that list is processed N records at a time (where N is typically 1). First, is that correct? If so, what you could do is create an InputStream that points to the list. Each FetchRecord() on the inputStream would return 1 or more records to process, which would then be passed into processRecord() for processing. This pattern is for if you will do your processing locallly in the JEE server. If you are going to do it remotely, there are a few other choices. This is just a rough description, off the top of my head :), but let’s sit down and see what we can come up with. My email is part of this post.
In terms of futures… I like Google Guice and of course Spring is great also. For the next rev of the framework I’d like to investigate using either of those and make better use of annotations to increase flexibility. I’ve asked customers if they are interested in GUI tooling, surprisingly most have said no. As a result it’s not a high priority.
Also, for JMX API’s, while we don’t have JMX api’s available, we do have webservice and EJB calls that you can use to poll for status. In addition, there is a JMS api that allows you to synchronous submit a job and then receive status as the job executes.
July 8th, 2008 at 4:46 pm
[…] sent me some more benchmark results; an update to the results I published a couple of weeks ago. The initial results were intriguing because of the low heap usage on IBM z/OS, while we only ran […]
July 8th, 2008 at 5:44 pm
btw, I was mistaken about there not being JMX api’s available to monitor batch jobs and interact with the Compute Grid infrastructure. There are in addition to the other mechanisms I described.