📜 ⬆️ ⬇️

The right platform for Java EE applications: how z / OS + DB2 were 3 times faster than Linux + Oracle

Introduction


Currently, more and more enterprise applications are being developed based on portable cross-platform technologies, such as Java Enterprise Edition. The structure of this platform includes a set of software interfaces that allow developers to abstract from specific DBMS and message queue mechanisms. This allows you to deploy the application on virtually any platform, including the mainframe.

In the IT community, the idea is widespread that mainframes are a very reliable, but inferior in performance to the usual solutions based on Intel processors and the Linux operating system, a platform. In this article, we would like to share the results of testing the performance of the same bank payment system running on IBM zEnterprise EC12 , but in one case using Linux and Oracle DBMS , and in the other case the z / OS operating system and DB2 DBMS .

What we tested


The tested bank payment system is an application built on the Java EE 6 platform. EJB components are used to organize business logic. Interaction with the DBMS is carried out using JPA technology, while Hibernate acts as a provider. The application actively uses message queues, interacting with them using JMS technology. In both deployment scenarios, WebSphere Application Server 8.5.5 Network Deployment was used as an application server, and the Service Integration Bus (SIBus) mechanism built into it was used to manage message queues.

All payments processed can be divided into two types: urgent and non-urgent. Urgent payments are made immediately after they are read from the input queue. In the process of processing non-urgent payments can be divided into three successive phases. The first phase - the reception phase - payments are read from the input queue of the system and are registered in the database. The second phase - the phase of multilateral netting - is performed in a single-threaded mode. At this phase, all non-urgent payments accepted before are posted, taking into account the mutual obligations of the system participants. The third phase - the phase of sending notifications - starts automatically after the completion of the second phase. At this phase, the formation and distribution of information messages (receipts) for all participating in the multilateral netting accounts. Each phase represents one or more transactions involving a complex sequence of actions performed by the application server and the DBMS.
')
It is important to note that for the developers of this payment system, the main platform is the Linux operating system and Oracle DBMS. However, using JPA and Hibernate, we were able to migrate the application to DB2 z / OS very quickly by replacing the dialect used with org.hibernate.dialect.DB2390Dialect. An IBM Data Movement Tool is available for database migration.

Description of the test bench Linux + Oracle


The test bench architecture complies with best practices in the Linux world. On the zEnterprise EC12 mainframe, model H89 was allocated two logical partitions (LPAR), one with 10 central processors (CP) and 25 GB of RAM was deployed, the WebSphere Application Server with the payment system installed on it, and the other with 10 CP and 158 GB of RAM, - Oracle DBMS. The connection between the application under test and the DBMS was carried out using JDBC Type 4 technology.



Used software versions:

- SUSE Linux Enterprise Server 11 SP3;
- WebSphere Application Server 8.5.5 Network Deployment;
- Oracle DB 11gR2.

Description of the z / OS + DB2 testbed


The z / OS operating system bench consisted of one logical partition (LPAR) on the zEnterprise EC12 mainframe model H89, containing 32 GB of RAM and 10 central processing units (CP) plus 10 processors used for running Java applications and DB2 database engines (zIIP ). All the necessary software was deployed on this logical partition: DB2 DBMS and WebSphere Application Server for z / OS application server. The connection between the application under test and the DB2 database management system was implemented using JDBC Type 2 technology by accessing the native client libraries of the database management system without using network connections.



Used software versions:
- z / OS 2.1;
- WebSphere Application Server 8.5.5 for z / OS;
- DB2 z / OS v11.

After preparing and setting up each test bench, a series of training tests and tuning of the deployed applications were performed.

Testing and results


The load profile during the tests repeated the load profile of a really working system. At the entrance, 2 million non-urgent payments were submitted, combined into packages of 500, 1000 and 5000 payments. These packets in the form of electronic messages were fed to the input of the system in a continuous stream (one packet in one message). In parallel, electronic messages containing urgent payments (one payment in one message) were submitted to the system. Before conducting the tests, the required number of participants in the payment system and information on the payments made earlier were uploaded to each database.

In the process of performing the tests, the following results were obtained:



Guaranteed time for processing an urgent payment - the most important indicator of the level of service provided by a payment system - was 3 times less for installations with z / OS and DB2 than for installations with Linux and Oracle.

What can explain the results? It is worth noting the very concept of a monolithic system, implemented in z / OS, - performing a variety of tasks on a single operating system image and the availability of optimized ways of interaction between them. In addition to the task scheduler, which is unique in its characteristics, z / OS includes so-called Cross-memory services is a technology that allows you to transfer control from the address space of one subsystem directly to the address space of another with just a few special processor commands, without contacting the operating system scheduler. In other operating systems, the implementation of the interprocess communication stack (Inter-Process Communication, IPC) takes hundreds or even thousands of machine instructions, including calls to the functions of the operating system kernel. It is through cross-memory services that WebSphere Application Server for z / OS interacts with DB2 z / OS DBMS using JDBC Type 2.

Since the payment system in question was originally developed without being tied to a specific DBMS, the application did not use the multiversion concurrency control (mvcc) mechanism used in Oracle DBMS. It is known that the implementation of mvcc in Oracle is not free, for the convenience of having to pay hardware resources. In the case of DB2, all of these resources were spent directly on doing useful work. It should be noted that the development of this DBMS is carried out in close cooperation with the System z processor development team, which ensures a more efficient use of all platform features by it (not all System z processors are available on Linux).

Attention should be paid to the time of multilateral netting, excluding work with the DBMS, i.e. The runtime is only the estimated part. On z / OS, this time was 25% less than on Linux. This is a strong argument in response to the conviction among IT specialists that Java does not work well on z / OS and that this operating system should not be used to launch Java applications.

It is also interesting to measure the execution time of each stage of processing non-urgent payments:



At each phase of the installation on z / OS and the DB2 database system, it wins more than 3 times in time.

Separately, stress tests were carried out for processing urgent payments submitted to the system in a continuous stream. The purpose of the test was to measure the maximum number of transactions per second processed by the payment system in the respective installation.



When interpreting the results, it is important to take into account that each urgent payment has its own payment message, which during processing passes through several queues, each time generating new transactions in the DBMS. Thus, the number of transactions performed in a DBMS per second is several times greater than that presented in the table.

Conclusion


The load testing demonstrated that the use of the operating system native to the mainframe and the DBMS as a platform for the operation of corporate applications not only ensures the highest reliability of the solution (with which nobody usually argues), but also provides record-breaking performance indicators. In our case, the performance gain was threefold .

Due to the fact that the application under test is built on a portable Java EE platform, the migration procedure to the z / OS operating system was carried out as soon as possible. In just one day, the data schema was migrated from Oracle DBMS to DB2 z / OS DBMS. At the same time, we note that the development team of the payment system did not have much experience with mainframes, which did not prevent it from preparing and successfully conducting testing with the help of IBM Russian staff.

In conclusion, I would like to recommend corporate software developers to take a closer look at mainframes. Investing in learning how to work with the z / OS operating system and the DB2 database management system will not be in vain, because you can offer your customers solutions on a reliable, fault-tolerant and, as we were able to demonstrate, a very fast platform.

Source: https://habr.com/ru/post/252057/


All Articles