Using DOTS as Apache Derby System Test



Similar documents
Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.

Informatica Corporation Proactive Monitoring for PowerCenter Operations Version 3.0 Release Notes May 2014

SQL Anywhere New Features Summary

Apache Derby Security. Jean T. Anderson

HP OO 10.X - SiteScope Monitoring Templates

agileworkflow Manual 1. agileworkflow 2. The repository 1 of 29 Contents Definition

Java DB Performance. Olav Sandstå Sun Microsystems, Trondheim, Norway Submission ID: 860

NGASI AppServer Manager SaaS/ASP Hosting Automation for Cloud Computing Administrator and User Guide

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

SQL Server for developers. murach's TRAINING & REFERENCE. Bryan Syverson. Mike Murach & Associates, Inc. Joel Murach

StreamServe Persuasion SP5 StreamStudio

Job Reference Guide. SLAMD Distributed Load Generation Engine. Version 1.8.2

Tutorial: Load Testing with CLIF

Configuring an Alternative Database for SAS Web Infrastructure Platform Services

Oracle Database 10g Express

WSO2 Business Process Server Clustering Guide for 3.2.0

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

A Brief Introduction to MySQL

Using SQL Server Management Studio

Informatica Cloud Connector for SharePoint 2010/2013 User Guide

Database Administration with MySQL

vcenter Operations Management Pack for SAP HANA Installation and Configuration Guide

CS 377 Database Systems SQL Programming. Li Xiong Department of Mathematics and Computer Science Emory University

FileNet P8 Platform Directory Service Migration Guide

OLH: Oracle Loader for Hadoop OSCH: Oracle SQL Connector for Hadoop Distributed File System (HDFS)

SQL Server An Overview

COSC344 Database Theory and Applications. Java and SQL. Lecture 12

Package sjdbc. R topics documented: February 20, 2015

Enhanced Connector Applications SupportPac VP01 for IBM WebSphere Business Events 3.0.0

D61830GC30. MySQL for Developers. Summary. Introduction. Prerequisites. At Course completion After completing this course, students will be able to:

LICENSE4J AUTO LICENSE GENERATION AND ACTIVATION SERVER USER GUIDE

IBM Operational Decision Manager Version 8 Release 5. Getting Started with Business Rules

Basic Unix/Linux 1. Software Testing Interview Prep

TimesTen Auditing Using ttaudit.java

Configuring Apache Derby for Performance and Durability Olav Sandstå

Configuring IBM WebSphere Application Server 6.1 to Support SAS 9.2 Web Applications

Volume SYSLOG JUNCTION. User s Guide. User s Guide

Concepts of Database Management Seventh Edition. Chapter 7 DBMS Functions

New Features... 1 Installation... 3 Upgrade Changes... 3 Fixed Limitations... 4 Known Limitations... 5 Informatica Global Customer Support...

ITG Software Engineering

White Paper. Fabasoft Folio Environment Variables. Fabasoft Folio 2015 Update Rollup 2

Informatica Master Data Management Multi Domain Hub API: Performance and Scalability Diagnostics Checklist

Configuring Apache Derby for Performance and Durability Olav Sandstå

MDM Multidomain Edition (Version 9.6.0) For Microsoft SQL Server Performance Tuning

SQL Server Instance-Level Benchmarks with DVDStore

MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy

Java SE 7 Programming

A FRAMEWORK FOR MANAGING RUNTIME ENVIRONMENT OF JAVA APPLICATIONS

sqlite driver manual

Release Date May 10, Adeptia Inc. 443 North Clark Ave, Suite 350 Chicago, IL 60654, USA

EDI Process Specification

Tableau Server Trusted Authentication

Evaluation. Copy. Evaluation Copy. Chapter 7: Using JDBC with Spring. 1) A Simpler Approach ) The JdbcTemplate. Class...

Monitoring HP OO 10. Overview. Available Tools. HP OO Community Guides

Unicenter Workload Control Center r1 SP4. Server Status Troubleshooting Guide

Contents CHAPTER 1 IMail Utilities

Embedded SQL programming

Configuring the Bundled SESM RADIUS Server

CSCI110 Exercise 4: Database - MySQL

An Oracle White Paper June Migrating Applications and Databases with Oracle Database 12c

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Oracle Enterprise Manager

enom, Inc. API response codes

Workflow Templates Library

Architecting the Future of Big Data

Report on the Train Ticketing System

Plug-In for Informatica Guide

Simba Apache Cassandra ODBC Driver

STREAMEZZO RICH MEDIA SERVER

Working With Derby. Version 10.2 Derby Document build: December 11, 2006, 7:06:09 AM (PST)

CA Workload Automation Agent for Databases

vrops Microsoft SQL Server MANAGEMENT PACK User Guide

Spectrum Technology Platform. Version 9.0. Spectrum Spatial Administration Guide

Java SE 7 Programming

Creating a Simple, Multithreaded Chat System with Java

Chapter 9 Java and SQL. Wang Yang wyang@njnet.edu.cn

18.2 user guide No Magic, Inc. 2015

Managing Users and Identity Stores

MS Enterprise Library 5.0 (Logging Application Block)

The release notes provide details of enhancements and features in Cloudera ODBC Driver for Impala , as well as the version history.

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova

Witango Application Server 6. Installation Guide for OS X

Application Development Guide: Programming Server Applications

*Described in the Release Notes. Generally this step will be performed by the admin end-users.

SQL Databases Course. by Applied Technology Research Center. This course provides training for MySQL, Oracle, SQL Server and PostgreSQL databases.

The Monitis Monitoring Agent ver. 1.2

Why Is This Important? Database Application Development. SQL in Application Code. Overview. SQL in Application Code (Contd.

Integrating VoltDB with Hadoop

Teradata Connector for Hadoop Tutorial

Performance Testing of Java Enterprise Systems

Consumer Preferences Profile (CPP) GUI User Manual

CA Output Management Web Viewer

User Migration Tool. Note. Staging Guide for Cisco Unified ICM/Contact Center Enterprise & Hosted Release 9.0(1) 1

High Level Design Distributed Network Traffic Controller

More SQL: Assertions, Views, and Programming Techniques

Performance Monitoring API for Java Enterprise Applications

SMTP-32 Library. Simple Mail Transfer Protocol Dynamic Link Library for Microsoft Windows. Version 5.2

EMC Documentum Content Management Interoperability Services

Transcription:

Using DOTS as Apache Derby System Test Date: 02/16/2005 Author: Ramandeep Kaur ramank@yngvi.org

Table of Contents 1 Introduction... 3 2 DOTS Overview... 3 3 Running DOTS... 4 4 Issues/Tips/Hints... 6 5 Summary... 10 6 References... 10 Derby System Test with DOTS 2

1 Introduction Database Open Source Test Suite (DOTS) is a test suite designed for stress testing on database systems. Apache Derby was tested with DOTS to investigate its usefulness as a system test. After several iterations of the test, it was found that DOTS may provide some value to Derby as a system test. This document is intended to provide information to the Derby community regarding the use of DOTS as a system test suite. The document initially provides a brief introduction to DOTS and then provides the information on setting up DOTS to run with Derby, and details of the issues/problems that were found during Derby system testing with DOTS. 1.1 Notes This document contains references to urls. The urls may change anytime. If there is any problem with any url, post it to the Derby mailing list (derby-dev@db.apache.org). 2 DOTS Overview Database Opensource Test Suite (DOTS) is a set of test cases designed for the purpose of stress testing and long run testing on database systems to measure database performance and reliability. It has two kinds of test cases - Basic Cases and Advanced Cases. The primary goal of Basic Cases is stress and long run database testing; the secondary goal is 100% JDBC API coverage. There are 8 test cases written in Java to cover JDBC API under the Basic Cases category. The goal of the Advanced Cases is modeling real-world business logic, stress and long run testing on database systems. There are 2 test cases written in Java under the Advanced Cases category. [2] 2.1 DOTS Test Cases DOTS suite has 10 test cases that provide robust and complex version of testing by doing the database testing close to the production use of the system. DOTS basic cases mainly gets database meta data, uses single and multiple SQL commands to execute database operations (insert, update, select and delete), uses PreparedStatement and CallableStatement to execute database operations, manipulates SQL3 data types CLOB (Character Large Object) and BLOB (Binary Large Object), sends CLOBs and BLOBs to the database, and accesses SQL CLOB and BLOB values. [2] DOTS advanced cases tests real-world business scenario. DOTS advanced test case 1 simulates the database actions of new user registration, updating existing user information and user authentication. This test case does the following actions: Continuously insert new user registration information into the user information table Continuously check userid/password to validate user login Derby System Test with DOTS 3

Continuously update user information table for record update [2] DOTS advanced test case 2 simulates the database actions of an online auction scenario. This test case does the following actions: Continuously search auction items for detail information (Buyer) Continuously update auction prices for the items to bid (Buyer) Continuously insert new auction items for sale (Seller) Continuously search all the auction items on which one particular user has transaction with. (Buyer and Seller) [2] For DOTS test cases, initially a database is created with multiple tables. DOTS test cases continuously inserts and updates the data into the database for duration of time specified in DOTS configuration file making the database to grow in size. In case of Network Server, the test cases continuously creates concurrent database connections as per specifications in DOTS configuration file. The duration of test cases, number of concurrent connections, and other parameters can be specified by user in the DOTS configuration files. 2.2 DOTS Database Schema DOTS test cases uses 9 tables with the following data types: CHAR VARCHAR FLOAT INTEGER TIME TIMESTAMP DATE CLOB BLOB More information about DOTS, DOTS test cases, Database schema, DOTS configuration file etc. can be found at: http://ltp.sourceforge.net/dotshowto.php 3 Running Dots To run Dots with Derby, main steps are as follows: 1. Install Dots, Derby and required softwares. 2. Create a Derby database to be used for test cases. 3. Set up configuration file needed during test run with various parameters. The brief description of each parameter is as follows: Derby System Test with DOTS 4

DURATION LOG_DIR Parameter CONCURRENT_CONNE CTIONS CPU_TARGET AUTO_MODE SUMMARY_INTERVAL UserID Password DriverClass URL SERVER_IP SERVER_PORT MAX_ROWS MAX_LOGFILESIZE CREATIONINTERVAL Description Duration a Dots test case will run in hours. The format is hh:mm Directory where a DOTS test case stores its output, such as log files, error files, and summary files Number of concurrent database access connections that will be created by DOTS test case. This parameter is applicable only if paramater AUTO_MODE is set to no. Target level of CPU Utilization of Database Server while DOTS is running Parameter to run the test automatically to have enough work load to meet the CPU utilization target. If set to " yes", DOTS will automatically add database access workload trying to meet the CPU utilization target. If set to " no", then DOTS starts the specified number of Connections. Interval time between two writes of summary report to test summary file User ID for database connection Password for database connection DriverClass for database connection URL for database connection Database server IP address Port that performance monitor uses Maximum rows a table can have Maximum file size a log file can occupy Thread creation interval Default value 24:00 /usr/local/d OTS/Output 20 90 30 10,000 100M 3 During Dots testing, the configuration file was set up with the following parameters: DURATION = 120:00 LOG_DIR = /home/derby//dots/results_120hrs CONCURRENT_CONNECTIONS= 30 CPU_TARGET = 95 AUTO_MODE = yes SUMMARY_INTERVAL = 10 UserID = u1 Password = p1 SERVER_IP = 12.34.225.456 SERVER_PORT = 8001 MAX_ROWS= 500000 MAX_LOGFILESIZE = 10485760 Derby System Test with DOTS 5

CREATIONINTERVAL = 1 For Network server, the parameters DriverClass and URL were set as follows: DriverClass = com.ibm.db2.jcc.db2driver URL = jdbc:derby:net://12.34.225.456/testdb For embedded database, the parameters DriverClass and URL were set as follows: DriverClass = org.apache.derby.jdbc.embeddeddriver URL = jdbc:derby:testdb Note: A dummy ip address is been used for parameters SERVER_IP and URL (Network Server). 4. Run Dots performance monitor and Dots test case as following: >java dots.perfmon.perfmon -port portnumber >java dots.framework.dots -config config_filename -case testcase_name 5. Review the results in log directory specified in configuration file. More detailed information about Dots environment, installing Dots and Derby, creating Derby database, setting up Dots configuration file, and executing DOTS test cases, and reviewing the results can be found at: http://incubator.apache.org/derby/dots_derby.html 4 Issues/Tips/Hints As part of initial testing, DOTS test cases were executed with Derby. Each test case or combination of test cases were executed for about 5 days. While running DOTS, some issues such as DOTS incompatibility with linux kernel, out of memory errors, and exceptions were found. This sections provides information about and/or solutions to those issues. 4.1 DOTS Code DOTS is currently supported on Linux platform. As DOTS reports system level information such as CPU usage and memory usage, it accesses the system level files (/proc/meminfo, /proc/stat etc.) and gets CPU and memory usage information by parsing the system level files. As the format of system level files may vary depending on kernel version, the information in system files is not parsed properly by DOTS if linux kernel on your machine does not match with kernel version supported by DOTS code. Therefore the reported information such as CPU usage and memory usage is incorrect or is not reported at all. I ran DOTS test cases on Linux kernel version 2.6.5-7.111.5-bigsmp. During testing, I found that summary file was printing memory usage as 0. After debugging the problem, I found that the format of file /proc/meminfo on my machine was not as expected by DOTS source code. To Derby System Test with DOTS 6

support format of file /proc/meminfo from my machine, I modified DOTS source code (src/dots/perfmon/perfreader.java) and re-ran build to create new DOTS jar files with my changes. The original and modified code is as follows: Original code: public static int getmemory() { String memstring; long totalmemory,usedmemory; try { /* Get memory usage */ BufferedReader memreader = new BufferedReader(new FileReader(MEMINFO)); memstring = memreader.readline(); while (memstring!= null) { if (memstring.startswith("mem:")) { StringTokenizer stk = new StringTokenizer(memString); if (stk.hasmoretokens()) { memstring = stk.nexttoken(); totalmemory = Long.parseLong(stk.nextToken()); usedmemory = Long.parseLong(stk.nextToken()); usedmemory = usedmemory/(1024*1024); return (int)usedmemory; memstring = memreader.readline(); memreader.close(); catch (IOException e) { System.out.println("PerfMon.PerfReader:" + e); return 0; Modified code: public static int getmemory() { String memstring; long totalmemory=0; long freememory=0; long usedmemory=0; try { /* Get memory usage */ BufferedReader memreader = new BufferedReader(new FileReader(MEMINFO)); memstring = memreader.readline(); while (memstring!= null) { if (memstring.startswith("memtotal:")) { StringTokenizer stk = new StringTokenizer(memString); if (stk.hasmoretokens()) { memstring = stk.nexttoken(); totalmemory = Long.parseLong(stk.nextToken()); if (memstring.startswith("memfree:")) { StringTokenizer stk1 = new StringTokenizer(memString); if (stk1.hasmoretokens()) { Derby System Test with DOTS 7

memstring = stk1.nexttoken(); freememory = Long.parseLong(stk1.nextToken()); memstring = memreader.readline(); usedmemory = totalmemory-freememory; usedmemory = usedmemory/1024; memreader.close(); return (int)usedmemory; catch (IOException e) { System.out.println("PerfMon.PerfReader:" + e); return 0; The highlighted lines in original code were modified to highlighted lines in modified code. After deploying modified jar files, I was able to get correct memory informaiton. 4.2 Test Cases Duration The duration of DOTS test cases can be specified in DOTS configuration file with parameter - DURATION. The limitation on duration of DOTS test cases is mainly machine memory. DOTS test cases keep on inserting data into the database which makes database keep on getting bigger during the test cases execution. If the memory on the machine is not enough to store the size of growing database, the test cases will fail with an out of memory error. 4.3 Java OutOfMemory Error While running DOTS test cases with Derby, some instances of java.lang.outofmemoryerror were found in the log file for DOTS Client. This is due to the fact that the jvm default memory was not big enough for the given test case. This problem was fixed by increasing the jvm memory by changing jvm configuration. Example: java -Xms400m -Xmx400m dots.framework.dots -config config.ini -case BTCJ1 The same problems were found on network server side when test cases were executed with Derby network server. Tip: The jvm memory size will depend on how long the test cases will be executed for. For example, to run DOTS basic and advanced test cases with Derby network server for 120 hours, jvm memory for DOTS client was increased to 400M and for Derby network server was increased to 720M. I gave memory of 400M and 720M to ensure that there is no memory problem after running it for few days. It is possible that the problem could be solved by setting jvm memory lower than 400M for client and 720M for Network Server. Derby System Test with DOTS 8

4.4 Expected Exceptions While running DOTS with Derby, the following exceptions were caught which after investigation were found to be expected exceptions. If you find any of the following exceptions while doing DOTS testing, you may ignore them. The exceptions information is as follows: 4.4.1 Duplicate Key Exception with Embeded Database Exception Output: SQL Exception: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index This exception was caught while running DOTS with embedded derby database. This exception was found when DOTS test case was trying to write the same entry to the table of database where one of the datatype was declared as primary key. 4.4.2 Duplicate Key Exception with Network Server Exception Output: com.ibm.db2.jcc.c.sqlexception: DB2 SQL error: SQLCODE: -1, SQLSTATE: 23505. The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index. This exception was caught while running DOTS with derby database Network Server. This exception was found when DOTS test case was trying to write the same entry to the table of database where one of the datatype was declared as primary key. 4.4.3 Lock Timeout Exception Exception Output: com.ibm.db2.jcc.c.sqlexception: DB2 SQL error: SQLCODE: -1, SQLSTATE: 40XL1, SQLERRMC: 40XL1. A lock could not be obtained within the time requested. This exception was caught because Dots test case could not obtain lock within the time requested. This exception was thrown when cases (basic) were running at a time. 4.4.4 Deadlock Exception Exception Output: "com.ibm.db2.jcc.c.sqlexception: DB2 SQL error: SQLCODE: -1, SQLSTATE: 40001, SQLERRMC: Lock : ROW. A lock could not be obtained due to a deadlock, cycle of locks. This exception was caught because DOTS test case could not obtain lock due to a deadlock, cycle of locks & waiters. This exception was thrown when multiple cases (basic) were running at time. Derby System Test with DOTS 9

4.4.5 Batch Failure Exception Exception Output: com.ibm.db2.jcc.c.vd: Non-atomic batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch. Use getnextexception() to retrieve the exceptions for specific batched elements. This exception was caught when Dots test case sent SQL statements as a batch/unit. One or more of the statement was with duplicate primary key. 5 Summary In this document, a brief overview of DOTS has been given to get started with DOTS. Most of the information can be found from the DOTS web site (http://ltp.sourceforge.net/dotshowto.php#sec11) and DOT and Derby paper (http://incubator.apache.org/derby/dots_derby.html). This paper mainly described some of the issues/problems that were found during initial system testing of Derby with DOTS. 6 References [1] Sunitha Kambhampati, Running DOTS with Derby http://incubator.apache.org/derby/dots_derby.html [2] David Barrera, Database Opensource Test Suite User s Guide http://ltp.sourceforge.net/dotshowto.php#sec11 Derby System Test with DOTS 10