Testing your DB2 database: Measuring performance with JMeter

Source: Internet
Author: User
Tags copy db2 db2 driver zip

Introduction: Author Kulvir Singh Bhogal introduces an open source tool called JMeter that can measure query performance and throughput in DB2 Universal Database.

Brief introduction

In today's fast-paced world, it's not enough to just get the job done. The key is to finish the work and do it in the easiest way. The database world is not immune to this desire for performance. Customers want to be able to save and extract their data quickly and efficiently. In many settings, IBM's ®db2®universal database TM has a leading performance track record, leading to a wide range of competitor databases.

Unfortunately, many DB2 users may not have all the benefits of DB2 performance due to some design flaws in the database or configuration. There are many articles and papers on DB2 performance tuning, and there are a lot of good tools in DB2 that can be analyzed in depth. In this article, I will introduce a tool--apache JMeter, another tool that can be added to your toolbox to help you understand the performance of your database and to help you with mock testing.

About Apache JMeter

JMeter is a product of the Apache Jakarta project. JMeter is a desktop application based on Java TM Swing, designed for load testing and measuring system performance. Initially, it was designed to test the WEB application. But it was later expanded, and now you can use it to test the relational database (via JDBC TM). On JMeter's official site http://jakarta.apache.org/jmeter/, you can learn more about it.

With JMeter, you can ensure that your database can meet certain metrics, such as being able to handle a certain number of concurrent users. Simulation testing is the key to successful projects. JMeter can simulate heavy loads against DB2. This can be done through the JMeter multithreaded framework. JMeter's multithreaded framework allows a large number of threads to perform concurrent sampling. As you'll see later in this article, JMeter can provide you with graphical feedback.

Get JMeter and set up your test environment

You can download the latest release of JMeter from http://jakarta.apache.org/builds/jakarta-jmeter/release/. When I wrote this article, the latest JMeter version was 1.8. JMeter requires work in the Sun's JDK1.4 (or higher) environment. The IBM JDK (referring to the current version) does not appear to be compatible with JMeter. JMeter has passed tests on a variety of UNIX® variants, including Solaris and Linux, and Windows® (98®, NT®, and 2000®).

To facilitate our JDBC testing of DB2, we need to copy the DB2 JDBC driver to the <jmeter installation directory >\jakarta-jmeter\lib directory. For DB2 8.1, the DB2 driver location is C:\Program Files\ibm\sqllib\java\db2java.zip under the default installation. Oddly, if the DB2 JDBC driver is named after the zip file, JMeter will not find the DB2 JDBC driver. To resolve this issue, you must change the file name to. JAR file. You can rename the files in the Lib directory to Db2java.jar. On the other hand, if you want to test the DB2 8.1 Java Common Client (JCC) driver, simply copy the Db2jcc.jar file to the JMeter Lib directory (without changing the name).

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.