Beruflich Dokumente
Kultur Dokumente
Best Practices
MDM System Performance Testing
- Guidelines and Instructions
Table of Contents
Table of Contents ................................................................................................. 2 Executive Summary............................................................................................. 3 Introduction Understand and Plan Performance Testing........................... 4 Recommendations for a Repeatable Performance Test Process.................... 7 High Level Recommendations..................................................................... 7 High Level Test Process ................................................................................ 9
Pre Test Steps ................................................................................................................9 Test Execution Steps ..................................................................................................10 Post Test Execution Steps ..........................................................................................11
Performance Data Collection Instructions ..................................................... 12 MDM / WebSphere Application Server(WAS) ........................................ 12 DB2 for z/OS Server ..................................................................................... 14 DB2 for AIX/Linux ....................................................................................... 14 References ........................................................................................................... 15 Acknowledgments ............................................................................................. 16 Appendixes ......................................................................................................... 16 Appendix #1 Dynamic SQL Statement Statistics.................................. 16 Appendix #2 Sample Approach for DB2 Snapshot Data Collection . 18 Appendix #3 Sample Run README Document Template ................ 20 Notices ................................................................................................................. 22 Trademarks ................................................................................................... 23
Executive Summary
An MDM implementation usually faces strict performance and scalability requirements because it is a mission critical system in the center of the enterprise level IT systems. Being the cornerstone of such a MDM system, InfoSphere Master Data Management (MDM) Server has been designed with high performance and scalability requirements since its inception and has been thoroughly tested as part of the rigorous development cycle in each release. However, as with any other software project, the performance characteristics of the implementation using MDM server should also be ascertained by following a similar rigorous performance engineering process and this needs to be done as part of the implementation project. MDM server can be used and customized in so many different ways that these customizations may have an overall affect on the overall performance of the system. Customizations may be required for a number of reasons and are based on a set of specific customer business requirements including business functional requirements, integration requirements with other systems, and different data characteristics of customer data. Taken together these may all impact the behavior and performance of the system differently and may require different implementation design decisions. For any MDM implementation, performance must be forethought and not an afterthought. While there are many areas and opportunities to improve performance, you should follow best practices during the design phase long before starting the actual performance testing of your implementation. Please see the resources section for further reading on this particular topic. This paper focuses on the best practices for performance testing and this is necessary throughout the implementation cycle and is critical to the success of your MDM system in production. At the end of the implementation cycle, you will still always need to do the final performance testing and gather performance metrics properly to ensure the implementation performs to meet your SLA (Service Level Agreement) before going into production. Ongoing regression testing is also needed as the implementation evolves. While this document is an MDM Server best practices document, many of the best practices presented are also more general performance testing best practices.
IBM InfoSphere MDM Server Introduction Understand and Plan Performance Testing
Best Practice: Clarify and document the performance objectives and performance test data collection for key usage scenarios, and start performance testing early in the implementation cycle
For MDM systems, performance goals may be defined based on a few key performance metrics that include:
IBM InfoSphere MDM Server Introduction Understand and Plan Performance Testing a) throughput - for example, the number of Transactions Per Second (TPS), b) MDM service response time, and c) resource utilization of the involved servers (CPU, RAM and I/O). These performance goals are only valid in the context of a specific workload on a specific system configured in a certain way. Consequently, it is important to clearly document a matrix that identifies the hardware being used for a particular workload as part of the performance testing tasks. In the context of performance testing a MDM system, this document provides guidelines and instructions on the following topics 1. 2. How to establish a consistent and repeatable performance test process What data, and with what process data should be collected
These are general best practices recommended both to our customers and services people in the field working on MDM server solutions. First, a repeatable performance testing process should be established in the early stage of the MDM solution implementation phase. With this repeatable testing process, major code changes should be tested and evaluated against a baseline in order to determine their performance impact during the journey to get the system into production. It has been proven many times that proper planning for performance testing and thorough execution of such a performance test plan early in the cycle is a must to ensure good performance and scalability of any implemented MDM system. Equally important is having proper data collection in order to ensure that the right performance metrics are collected and compared. A repeatable process and the right set of data are required to properly evaluate the impact of the changes and accurately quantify and characterize the level of performance of the system. Good source code and change control is also required. Using source control will allow the team to go back to the performance tests for a particular version of the implementation thereby facilitating the performance problem investigation process. Recognize that performance testing is an iterative process that requires multiple iterations of the same, or similar, steps until the defined performance goals are met. Change control applies to all elements of the system, including the servers, storage, network, Operating System and database software, as examples.
Best Practice: Establish a consistent and repeatable performance testing process that includes proper and sufficient performance data collection, a dedicated or controlled performance testing environment, and good source code and change control
IBM InfoSphere MDM Server Introduction Understand and Plan Performance Testing
Using a disciplined approach, as described above, also means better efficiency and productivity by avoiding unnecessary test repetition allowing the project to progress more quickly. This document provides a set of commonly used data collection instructions which can be tailored to serve a specific purpose. With minor exceptions you can consider the list as a mandatory minimum set of data to collect. Even if you dont think you have the need of a particular piece of data we strongly encourage you to keep them as part of data collection because more often than you think, later on you will come back to check certain things and find the collected data has become a reference point. The suggested data collection typically has a very minimal performance impact. It is also strongly recommended to have a performance data repository to keep the performance data from all the milestone deliveries of the implementation with properly labeled names for the tests. This historical performance information becomes very handy when trying to understand performance behavior changes or when investigating a performance problem.
Best Practice: Always collect the recommended minimum set of data required for monitoring each layer of the whole MDM stack
IBM InfoSphere MDM Server Recommendations for a Repeatable Performance Test Process
IBM InfoSphere MDM Server Recommendations for a Repeatable Performance Test Process the synthetic data set are similar to production data, while at the same time ensuring that primary key, foreign key and domain constraints are met. 5) Sufficient warm up Performance measurements should only be taken after a sufficient warm up phase has been completed. This phase needs to be long enough to allow the workload to reach a stable steady state (a nearly flat throughput curve). A warm up of 20 minutes is a good starting point; a bigger system and higher throughput will require a longer warm up. The best way to determine a suitable warm-up period is to do a set of long runs and look for a repeatable inflection point where throughput has risen to a flat or nearly flat line. 6) Long enough steady state The number of transactions or data to drive the test should be sufficient to last long enough for stable and consistent performance. Once in steady state, a performance measurement phase of 30 minutes is a good starting point. In other cases, especially when there is high workload variation, longer measurement phase is required for better consistency and comparability. 7) A run README document A run README document/directory should be created for each test describing the test with some basic run information. This document records the key run information including the time of the run, duration of the run, purposes of the run, software settings and hardware configurations, application version being used, performance metrics (e.g. average Response Time, Transaction Per Second), and so on. A template of such document should be developed and ready for use prior to the start of testing (please see Appendix #2 below for an example) 8) Test repeatability confirmation The repeatability of the tests in the performance test environment should be established and confirmed. To establish repeatability, or to understand the run to run performance variation in your test environment, its strongly recommended to run the same test multiple times at different times of the day or on different days, without any changes, then compare the key performance metrics. The greater the variability the more runs need to be made but there should be at least 3 runs and as many as 7-9 so the high/low results can be discarded. The collected performance metrics should include average transaction Response Times, Transactions Per Second, CPU and I/O utilization on both database and MDM server machines, and MIPS consumption in case of any databases on System z. Repeatability confirmation may need to be done again when there are changes in the test environment causing any doubt about such repeatability. 9) Proper source and change control
IBM InfoSphere MDM Server Recommendations for a Repeatable Performance Test Process Source code control is important to allow a performance test to be able to go back to a particular version of the application code and the performance test. So both the application and the test harness need to be managed. Change control (in the test environment) is also necessary to help ensure the tests are valid and performance impact is from the targeted changes only.
Best Practice: Allocate a dedicated or well controlled environment Follow exactly the same test steps Start from the same state Use production data or alike in a volume close to production Ensure sufficient warm up before take measurements Take long enough performance measurements during steady stage Confirm repeatability of the tests Enforce proper source and change control Document each test with a run README file
IBM InfoSphere MDM Server Recommendations for a Repeatable Performance Test Process b) WAS settings c) DB2 settings d) OS level monitoring 4) Clear or reset files, directories, metric counters and tables used for logging purpose Examples are: a) Application server side WAS/MDM log and trace directories or files should be reset or cleared for each new run. Old files or content should be backed up if needed) b) Any tables in DB2 used solely for logging purpose for each run should be cleared by issuing delete * from so the table will only contain the needed data for the coming test; one example is the table created for dynamic statement cache statistics collection on DB2 for z/OS c) Some resettable DB2 snapshot counters should be reset using db2 reset command 5) Restart the MDM application instance 6) Set up the driver tier The driver tier should be set up with the same chosen test case (including the right input data) with the same chosen load level (e.g. Same # of submitters as specified in batch processor, unless this is the variable you are trying to test) 7) Prepare the monitoring scripts/tools Get the monitoring scripts or tool ready for any required monitoring and data collection Note: for detailed data collection instructions, please refer to the data collection instruction section later in this document.
10
IBM InfoSphere MDM Server Recommendations for a Repeatable Performance Test Process for a specified period of time. Once in steady state, establish a performance measurement phase. Thirty minutes is a good starting point. In some cases, especially if you have a highly variable workload, a longer measurement phase may be required for better consistency and comparability. Notes: a) You dont need to have a stop between warm up and steady state if you are using the same workload as long the time is recorded correctly in the run README document to tell the start and end time for each phase. b) If different techniques (other than running the same workload) are used to warm up the system, document clearly how it was done in the run README document and explain why you think such warm up is sufficient.
Best Practice: Carefully follow all pre-test, execution and post-test steps, and consciously ensure no other workloads on the system that may impact the performance tests. This will ensure accuracy, repeatability and comparability and guarantees that the data collected is from and only from the monitored run.
11
MDM Performance Monitor data (only when requested for problem determination) Performance Monitor data is suggested to be enabled and set to level 2. This
12
IBM InfoSphere MDM Server Performance Data Collection Instructions should be done only when requested. Normally this is not needed for pure performance measurements. Rather, its more often needed for performance investigation. Enabling MDM Performance Tracking To make use of MDM Performance Tracking you must explicitly enable it. Like most product features in MDM Server, this is accomplished by modifying the Configuration and Management tables, specifically the CONFIGELEMENT table. Use the following commands to enable MDM Performance Tracking at the recommended level for problem diagnosis and tuning:
UPDATE CONFIGELEMENT SET VALUE = 'true', LAST_UPDATE_DT = CURRENT_TIMESTAMP WHERE NAME = '/IBM/DWLCommonServices/PerformanceTracking/enabled'; UPDATE CONFIGELEMENT SET VALUE = '2', LAST_UPDATE_DT = CURRENT_TIMESTAMP WHERE NAME = '/IBM/DWLCommonServices/PerformanceTracking/level'; COMMIT;
Since we are recommending the use of the log4j output as a starting point for problem investigation, it helps to configure log4j optimally to get the right size and roll-over window for the performancemonitor.log. To ensure proper capture of an elusive problem or to simply get a large statistical sample, we recommend dedicating at least 2 GB to the rolling performancemonitor.log files. This is typically enough to capture an hour of workload on an MDM Server in complicated and high-volume implementations. Find the following entries in the log4j.properties file in the MDM Server properties.jar archive, as an example:
log4j.appender.performanceLog=org.apache.log4j.RollingFileAppender log4j.appender.performanceLog.Encoding=UTF-8 log4j.appender.performanceLog.Threshold=ALL log4j.appender.performanceLog.layout.ConversionPattern=%d : %m%n log4j.appender.performanceLog.layout=org.apache.log4j.PatternLayoutlog4j.appender.performanceLog.File=/opt/IBM/MDM 85/MDMlogs/perflogs/performancemonitor.log log4j.logger.com.dwl.base.performance.internal.PerformanceMonitorLog=ALL,performanceLog log4j.appender.performanceLog.MaxBackupIndex=20 log4j.appender.performanceLog.MaxFileSize=100MB...
After both the CONFIGELEMENT and log4j changes, a WebSphere Application Server recycle for the MDM Server instance will be required to enable MDM Performance Tracking. Once the server has recycled, any transactions sent to that MDM Server will be logged by MDM Performance Tracking. WAS Performance Monitoring Infrastructure (PMI) data (when requested for problem determination) PMI data normally needs to be collected on all the MDM instances if more than one is used. Current settings (default/BASIC) are fine. Please start logging just before your test and then stop it afterwards. For more details, see following instructions: WAS PMI should be left at the default level (this has a negligible impact)
13
IBM InfoSphere MDM Server Performance Data Collection Instructions Enable Logging and watch the Tivoli Performance Viewer during the run. Specifically: DWL/Customer datasource pool size DWL/Customer datasource connections ORB Thread count For details on the Tivoli Performance Viewer, please refer to chapter 14.3 in the following IBM Redbook: http://www.redbooks.ibm.com/abstracts/sg246392.html?Open
14
IBM InfoSphere MDM Server References DB2 snapshot data using db2 commands or other monitoring tools capture the following information: Buffer Pool sizes, Buffer Pool hit ratios, Database Configuration and Database Manager Configuration settings, table space, table and index definitions and disk layout description. Please find one approach as an example (in Appendix #2) that works for both old and new DB2 versions. You can either follow the steps to do exactly the same, or learn the techniques and ideas and apply them when using different tools. Event monitor log for deadlocks (only when requested for problem determination) Event monitors are used to collect information about the database and about any connected applications when specified events occur. One of such event monitors is deadlock event monitor. When a deadlock occurs, the deadlock event monitor collects information about the applications involved including the SQL statements participating in the deadlock and the locks causing high contention. Deadlock event monitor log can help you to understand and resolve excessive deadlocks that sometimes happen in an MDM Server database. By default, all databases have an event monitor defined named DB2DETAILDEADLOCK, which records detailed information about deadlock events. The DB2DETAILDEADLOCK event monitor starts automatically when the database starts. After formatting the event monitor files, typically you should be able to find all the SQL statements participating in the deadlocks. Please refer to DB2 information center for more details.
References
o o o o o o o o o o o o Best Practices: Implementing InfoSphere MDM Server for high performance Best Practices: Achieving high availability and scalability with IBM InfoSphere Master Data Management WebSphere Customer Center: Understanding performance Loading a large volume of Master Data Management data quickly, Part 1: Using RDP MDM Server maintenance services batch Monitoring and tuning InfoSphere Master Data Management Server, Part 1: Set goals and tune each layer of the infrastructure Monitoring and tuning InfoSphere Master Data Management Server, Part 2: Monitor the DB2 layer and learn about different monitoring tools Master Data Management: IBM InfoSphere Rapid Deployment Package More MDM best practices publications MDM Server 9: Information Center DB2 tuning tips for OLTP applications Patterns & Practices: Performance testing guidance Software performance testing
15
Acknowledgments
The author would like to thank Berni Schiefer, Distinguished Engineer & Technical Executive of IBM, for his encouragement and guidance on creating this document, David Zhang from DB2 for z/OS performance team for his contribution to the DB2 for z/OS related items, Stephanie Hazlewood from MDM server development, for her thorough review and great editorial work, and the global MDM performance team members for continuously maturing this team development topic and for the feedback on improving this article.
Appendixes
16
--------------------------------------------------------------------CREATE THE AUXILIARY TABLE FOR THE SAMPLE DSN_STATEMENT_CACHE_TABLE CREATE LOB TABLESPACE DSN8L!!X IN DSN8D!!A BUFFERPOOL BP32K; CREATE AUX TABLE DSN8!!0.DSN_STATEMENT_CACHE_AUX IN DSN8D!!A.DSN8L!!X STORES DSN8!!0.DSN_STATEMENT_CACHE_TABLE COLUMN STMT_TEXT; CREATE INDEX DSN8!!0.DSN_STATEMENT_CACHE_IDX1 ON DSN8!!0.DSN_STATEMENT_CACHE_TABLE ( "STMT_ID" ASC ); CREATE INDEX DSN8!!0.DSN_STATEMENT_CACHE_IDX2 ON DSN8!!0.DSN_STATEMENT_CACHE_TABLE ( "STMT_TOKEN" ASC ) CLUSTER; CREATE INDEX DSN8!!0.DSN_STATEMENT_CACHE_IDX3 ON DSN8!!0.DSN_STATEMENT_CACHE_TABLE ( "EXPLAIN_TS" DESC );
17
2) If above table was created in the past, ensure to do the following: delete the content of DSN_STATEMENT_CACHE_TABLE table to clean up any data collected from the previous runs: DELETE FROM DSN_STATEMENT_CACHE_TABLE 3) Stop and start tracing with IFCID 316, 317, 318 to reset all the counters dynamic statement cache statistics so that we don't pick up stats from previous runs STOP TRACE(P) CLASS(30) IFCID(316, 317, 318) START TRACE(P) CLASS(30) IFCID(316, 317, 318) IFCID 316 contains the first 60 bytes of SQL text and execution statistics; IFCID 317 captures the full text of the SQL statement; IFCID 318 is a monitor trace instrumentation identifier; DB2 begins to collect statistics and accumulates them for the length of time when the trace is on. 4) Run the workload Issue statement EXPLAIN STMTCACHE ALL in a DSNTEP2 job to extract all statements from the global cache and to dump the statistics information to DSN_STATEMENT_CACHE_TABLE, begin your evaluation of the statement cache performance by selecting on the inserted rows from the DSN_STATEMENT_CACHE_TABLE table. Important: Stopping the trace will reset all statistics. It is important to complete the above step before turning off the monitor trace.
18
IBM InfoSphere MDM Server Appendixes Below is one approach as an example in the appendix section that works for both old and new DB2 versions. You can either follow the steps to do exactly the same, or learn the techniques and ideas and apply them when using different tools. For a deeper understanding of a database workload during optimization or problem resolution, try the low-impact investigative technique of taking snapshots in intervals, with monitor resets between each capture. For example, to monitor a one-hour period for a production workload, a script can be easily constructed to do the logic of thread 1 and thread 2 as shown in the thread in Listing 1. Thread 1 in Listing 1 is for taking multiple interval snapshots of 60 seconds each with a reset monitor at the beginning of each interval snapshot.
Thread 2 in Listing 2 is for taking multiple snapshots over the period without issuing the reset monitor command after the initial reset monitor command.
19
Test Purpose: o Notes / Key observations: o Average TPS: o Average Response Time o Error/Failure Count: o Type of Failures/Errors o Concerns / Issues
Key Application Server Settings: o Number of application server instances: o JDBC o Prepared statement cache: o EJB cache: o KeepDynamic (enabled?): o JVM heap setting: Min: Max: GC policy: o Database Connection pool setting Min : Max : o Log4J debug settings: o PMI setting: o MDM session count: o DB Connection timeout setting Timeout: Min: Max: Reap: Unused: Aged: o Any other performance monitoring agents / profilers:
20
IBM InfoSphere MDM Server Appendixes o o o o o o Group Buffer pool size: KeepDynamic enabled (yes/no): Number of table partitions (if applicable): Trace /debug setting: Number of connections: Key zParms:
Key MDM Configuration: o Logging level (error, warning, etc): o Performance monitor logging (off, 1, 2, ): o SDP (on/off): o Tail (on/off): o History (on/off): o Householding (yes/no): o Event Manager (yes/no):
System Information: Application Server Configuration LPAR A Hardware Model Number Enabled / Active (yes/no) Max Cores Memory GB Entitlement: Capped (yes / no) MDM version AIX version Database Server Configuration (for AIX on Power) LPAR C Hardware Model Number Enabled / Active (yes/no) Max Cores Memory GB Entitlement: Capped (yes / no) DB2 version AIX version Database Sever Configuration (for z/OS on mainframe) LPAR C Hardware Model Number Physical CEC (mainframe) Enabled / Active (yes/no) Logical Processors (GP) ZIIP Processors ZAAP Processors Memory GB zOS Version DB2 Version Data Sharing (yes/no)
21
Notices
This information was developed for products and services offered in the U.S.A. IBM may not offer the products, services, or features discussed in this document in other countries. Consult your local IBM representative for information on the products and services currently available in your area. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service. IBM may have patents or pending patent applications covering subject matter described in this document. The furnishing of this document does not grant you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. The following paragraph does not apply to the United Kingdom or any other country where such provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or implied warranties in certain transactions, therefore, this statement may not apply to you. Without limiting the above disclaimers, IBM provides no representations or warranties regarding the accuracy, reliability or serviceability of any information or recommendations provided in this publication, or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information contained in this document has not been submitted to any formal IBM test and is distributed AS IS. The use of this information or the implementation of any recommendations or techniques herein is a customer responsibility and depends on the customers ability to evaluate and integrate them into the customers operational environment. While each item may have been reviewed by IBM for accuracy in a specific situation, there is no guarantee that the same or similar results will be obtained elsewhere. Anyone attempting to adapt these techniques to their own environment do so at their own risk. This document and the information contained herein may be used solely in connection with the IBM products discussed in this document. This information could include technical inaccuracies or typographical errors. Changes are periodically made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials for this IBM product and use of those Web sites is at your own risk. IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring any obligation to you. Any performance data contained herein was determined in a controlled environment. Therefore, the results obtained in other operating environments may vary significantly. Some measurements may have been made on development-level systems and there is no guarantee that these measurements will be the same on generally available systems. Furthermore, some measurements may have been estimated through extrapolation. Actual
22
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. If these and other IBM trademarked terms are marked on their first occurrence in this information with a trademark symbol ( or ), these symbols indicate U.S. registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at Copyright and trademark information at www.ibm.com/legal/copytrade.shtml Windows is a trademark of Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. Other company, product, or service names may be trademarks or service marks of others.
23