Performance Considerations for Web Applications



Similar documents
Social Engineering in IT Security: Tools, Tactics, and Techniques Author: Sharon Conheady ISBN-13:

SQL Server Performance Intelligence

1 File Processing Systems

Tips and Tricks for Using Oracle TimesTen In-Memory Database in the Application Tier

Optimizing Your Database Performance the Easy Way

What is a database? COSC 304 Introduction to Database Systems. Database Introduction. Example Problem. Databases in the Real-World

Cloud Based Application Architectures using Smart Computing

SQL Server Query Tuning

Track and Keynote/Session Title 9:00:00 AM Keynote 11g Database Development Java Track Database Apex Track.Net Track. 09:30:00 AM with Oracle and

Big data big talk or big results?

Oracle9i Data Warehouse Review. Robert F. Edwards Dulcian, Inc.

A Comparison of Software Architectures for E-Business Applications

Database Scalability and Oracle 12c

Real-time Data Replication

ESSBASE ASO TUNING AND OPTIMIZATION FOR MERE MORTALS

Performance Tuning for the JDBC TM API

White Paper. Java versus Ruby Frameworks in Practice STATE OF THE ART SOFTWARE DEVELOPMENT 1

Toad for Oracle 8.6 SQL Tuning

ERserver. iseries. Work management

<Insert Picture Here>

ILMT Central Team. Performance tuning. IBM License Metric Tool 9.0 Questions & Answers IBM Corporation

Monitoring IBM HMC Server. eg Enterprise v6

Proactive database performance management

Phire Architect Hardware and Software Requirements

An Esri White Paper June 2010 Tracking Server 10

<Insert Picture Here> Michael Hichwa VP Database Development Tools Stuttgart September 18, 2007 Hamburg September 20, 2007

Oracle USF

A Comparison of Oracle Performance on Physical and VMware Servers

Holistic Performance Analysis of J2EE Applications

High-Performance Oracle: Proven Methods for Achieving Optimum Performance and Availability

Introduction. AppDynamics for Databases Version Page 1

Optimizing the Performance of the Oracle BI Applications using Oracle Datawarehousing Features and Oracle DAC

SAP HANA PLATFORM Top Ten Questions for Choosing In-Memory Databases. Start Here

Configuring Apache Derby for Performance and Durability Olav Sandstå

<Insert Picture Here> Oracle Mobile Enterprise Application Platform Overview

ADF. Joe Huang Joe Huang Senior Principal Product Manager, Mobile Development Platform, Oracle Application Development Tools

#9011 GeoMedia WebMap Performance Analysis and Tuning (a quick guide to improving system performance)

A Comparison of Oracle Performance on Physical and VMware Servers

Evaluation of Open Source Data Cleaning Tools: Open Refine and Data Wrangler

Oracle Database In-Memory The Next Big Thing

PERFORMANCE TUNING FOR PEOPLESOFT APPLICATIONS

WAIT-TIME ANALYSIS METHOD: NEW BEST PRACTICE FOR APPLICATION PERFORMANCE MANAGEMENT

Tuning Tableau Server for High Performance

ADF Mobile Overview and Frequently Asked Questions

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Category: Business Process and Integration Solution for Small Business and the Enterprise

PERFORMANCE TUNING IN MICROSOFT SQL SERVER DBMS

Architecting For Failure Why Cloud Architecture is Different! Michael Stiefel

Application Performance Testing Basics

I N T E R S Y S T E M S W H I T E P A P E R INTERSYSTEMS CACHÉ AS AN ALTERNATIVE TO IN-MEMORY DATABASES. David Kaaret InterSystems Corporation

Understanding Client/Server Computing

Aaron Werman.

Building Java Servlets with Oracle JDeveloper

Build a Mobile App in 60 Minutes with MAF

Data Integrator Performance Optimization Guide

Oracle Database Cloud Service Rick Greenwald, Director, Product Management, Database Cloud

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

RTI v3.3 Lightweight Deep Diagnostics for LoadRunner

Data processing goes big

CHAPTER 3 PROBLEM STATEMENT AND RESEARCH METHODOLOGY

Response Time Analysis

Have you ever done something the long way and then

Oracle Database 11 g Performance Tuning. Recipes. Sam R. Alapati Darl Kuhn Bill Padfield. Apress*


Building Scalable Applications Using Microsoft Technologies

ORACLE DATABASE 10G ENTERPRISE EDITION

IJCSI International Journal of Computer Science Issues, Vol. 8, Issue 6, No 3, November 2011 ISSN (Online):

Monitoring and Diagnosing Production Applications Using Oracle Application Diagnostics for Java. An Oracle White Paper December 2007

In-Memory Analytics: A comparison between Oracle TimesTen and Oracle Essbase

System Copy GT Manual 1.8 Last update: 2015/07/13 Basis Technologies

An Oracle White Paper July Oracle Primavera Contract Management, Business Intelligence Publisher Edition-Sizing Guide

Microsoft SQL Server 2008 Step by Step

SQL Server Performance Tuning for DBAs

How To Store Data On An Ocora Nosql Database On A Flash Memory Device On A Microsoft Flash Memory 2 (Iomemory)

SAP HANA SAP s In-Memory Database. Dr. Martin Kittel, SAP HANA Development January 16, 2013

PERFORMANCE TIPS FOR BATCH JOBS

Planning the Installation and Installing SQL Server

sql server best practice

Performance Tuning for Oracle WebCenter Content 11g: Strategies & Tactics CHRIS ROTHWELL & PAUL HEUPEL FISHBOWL SOLUTIONS, INC.

Crystal Reports Server 2008

How To Load Data Into An Org Database Cloud Service - Multitenant Edition

Optimize Oracle Business Intelligence Analytics with Oracle 12c In-Memory Database Option

Wait-Time Analysis Method: New Best Practice for Performance Management

TUTORIAL WHITE PAPER. Application Performance Management. Investigating Oracle Wait Events With VERITAS Instance Watch

Database Performance with In-Memory Solutions

How To Develop A Mobile Application On An Android Device

DreamFactory & Modus Create Case Study

How To Retire A Legacy System From Healthcare With A Flatirons Eas Application Retirement Solution

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Fall 2007 Lecture 1 - Class Introduction

Response Time Analysis

SQL, PL/SQL FALL Semester 2013

Advantage Database Server or Microsoft SQL Server which one is right for you?

Tableau Server 7.0 scalability

Integrating Apache Spark with an Enterprise Data Warehouse

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

SQL Server. SQL Server 100 Most Asked Questions: Best Practices guide to managing, mining, building and developing SQL Server databases

Introduction 1 Performance on Hosted Server 1. Benchmarks 2. System Requirements 7 Load Balancing 7

Liferay Portal Performance. Benchmark Study of Liferay Portal Enterprise Edition

Test Run Analysis Interpretation (AI) Made Easy with OpenLoad

Enterprise Performance Tuning: Best Practices with SQL Server 2008 Analysis Services. By Ajay Goyal Consultant Scalability Experts, Inc.

Transcription:

Performance Considerations for Web Applications By Dr. Paul Dorsey & Michael Rosenblum, Dulcian, Inc. Many of the performance tuning techniques applied to client/server applications that consisted of rewriting poorly written SQL code and tuning the database itself are not helpful when dealing with Web applications that are frequently unaffected by these performance improvement approaches. This tip describes some of the most common problem areas when dealing with Web application performance issues. Typical Web Application Process Flow Improving the performance of a slow Web application requires examination of the entire system, not just the database. A typical 3-tier Web application structure is shown in Figure 1. 1. Client 2. Send data from 3. Application 4. Send data from 5. Database client to App Server Server App Server to DB 9. Data in 8. Return data from 7. Data in 6. Return data from Client App Server to client Application Server DB to App Server Figure 1: Web Application Process Flow 36 independent oracle users group www.ioug.org

As shown in Figure 1, there are numerous possible places for Web applications to experience bottlenecks or performance killers as described in the following nine-step process: Step 1: Step 2: Step 3: Step 4: Step 5: Step 6: Step 7: Step 8: Step 9: Code and operations executed on the client machine Transmission of client request to the application server Code in the application server executed as a formulation of the client request to retrieve information from the database Transmission of request from application server to the database Database reception, processing and preparation of return information to the application server Transmission over internal network of information from database to the application server Application server processing of database response and preparation of response transmission to the client machine Transmission of data from the application server to the client machine Client machine processing of returned request and rendering of application page in browser Web Application Performance Problem Areas Traditional tuning techniques only help with Step 5 and ignore all of the other eight places where performance can degrade. This section describes how problems can occur at each step of the process. Oracle Technology Best Practices 37

Step 1. Client Machine Performance Problems The formulation of a request in the client is usually the least likely source of system performance problems. However, it should not be dismissed entirely. Using many modern AJAX architectures, it is possible to place so much code in the client that a significant amount of time is required before the request is transmitted to the application server. This is particularly true for underpowered client machines with inadequate memory and slow processors. Step 2. Client-to-Application Server Transmission Problems Like the client machine itself, the transmission time between the client machine and the application server is a less common cause of slowly performing Web applications. However, if attempting to transmit a large amount of information, the time required to do so over the Internet may be affected. For example, uploading large files or transmitting a large block of data may slow down performance. Step 3. Application Server Performance Problems The application server itself rarely causes significant performance degradation. For computationally intensive applications such as large matrix inversions for linear programming problems, some performance slowdowns can occur, but this is less likely to be a significant factor in poorly performing applications. Step 4. Application Server to Database Transmission Problems Transmission of data from the application server to the database with 1 GB or better transmission speeds might lead you to ignore this step in the process. It is not the time needed to move data from the application server to the database that causes performance degradation, but the high number of transmission requests. The trend in current Web development is to make applications database-independent. This sometimes results in a single request from a client requiring many requests from the application server to the 38 independent oracle users group www.ioug.org

database in order to fulfill. What needs to be examined and measured is the number of roundtrips made from the application server to the database. Inexpert developers may create routines that execute so many roundtrips that there is little tuning that a DBA can do to yield reasonable performance results. It is not unusual for a single request from the client to generate hundreds (if not thousands) of round trips from the application server to the database before the transmission is complete. Java developers who think of the database as nothing more than a place to store persistent copies of their classes use Getters and Setters to retrieve and/or update individual attributes of objects. This type of development can generate a round trip for every attribute of every object in the database, which means that inserting a row into a table with 100 columns results in a single Insert followed by 99 Update statements. Retrieving this record from the database then requires 100 independent queries. In the application server, identifying performance problems involves counting the number of transmissions made. The accumulation of time spent making round trips is one of the most common places where Web application performance can suffer. Step 5. Database Performance Problems In the database itself, it is important to look for the same things that cause client/server applications to run slowly. However, additional Web application features can cause other performance problems in the database. Most Web applications are stateless, meaning that each client request is independent. Developers do not have the ability to use package variables that persist over time. Consequently, when a user logs into an application, he or she will be making multiple requests within the context of the signon operation. The information pertaining to that session must be retrieved at the beginning of every request and persistently stored at the end of every request. Depending upon how this persistence is handled in the database, a single table may generate massive I/O demands resulting in redo logs Oracle Technology Best Practices 39

full of information that may cause contention on tables where session information is stored. Step 6. Database-to-Application Server Transmission Problems Transferring information from the database back to the application server (similar to Step 4) is usually not problematic from a performance standpoint. However, performance can suffer when a Java program requests a single record from a table. If the entire table contents are brought into the middle tier and then filtered to find the appropriate record, performance will be slow. The application can perform well as long as data volumes are small. As data accumulates, the amount of information transferred to the application server becomes too large, thus affecting performance. Step 7. Application Server Processing Performance Problems Processing the data from the database can be resource-intensive. Many database-independent Java programmers minimize work done in the database and execute much of the application logic in the middle tier. In general, complex data manipulation can be handled much more efficiently with database code. Java programmers should minimize information returned to the application server and, where convenient, use the database to handle computations. Step 8. Application Server-to-Client Machine Transmission Problems This area is one of the most important for addressing performance problems and often receives the least attention. Industry standards often assume that everyone has access to high performance client machines so that the amount of data transmitted from the application server to the client is irrelevant. As the industry moves to Web 2.0 and AJAX, very rich UI applications create more and more bloated screens of 1 MB or more. Some of the AJAX partial page refresh capabilities mitigate this problem somewhat (100-200K). Since most Web pages only need to logically transmit an amount of information requiring 5K or less, the logical round trips on an open page should be measured in tens or hundreds of characters rather than megabytes. Transmission between the application server and the 40 independent oracle users group www.ioug.org

client machine can be the most significant cause of poor Web application performance. If a Web page takes 30 seconds to load, even if it is prepared in five rather than 10 seconds, users will not experience much of a benefit. The amount of information being sent must be decreased. Step 9. Client Performance Problems How much work does the client need to do to render a Web application page? This area is usually not a performance killer, but it can contribute to poor performance. Very processing-intensive page rendering can result in poor application performance. Conclusions There is much more to tuning a Web application than simply identifying slow database queries. Changing database and operating system parameters will only go so far. The most common causes of slow performance are as follows. Excessive round trips from the application server to the database - Ideally, each UI operation should require exactly one round trip to the database. Sometimes, the framework (such as ADF) will require additional round trips to retrieve and persist session data. Any UI operation requiring more than a few round trips should be carefully investigated. Large pages sent to the client - Developers often assume that all of the system users have high-speed Internet connections. Everyone has encountered slow loading Web pages taking multiple seconds to load. Once in a while, these delays are not significant. However, this type of performance degradation (waiting three seconds for each page refresh) in an application such as a data entry intensive payroll application is unacceptable. Applications should be architected to take into account the slowest possible network to support when testing the system architecture for suitability in slower environments. Oracle Technology Best Practices 41

Performing operations in the application server that should be done in the database - For large, complex systems with sufficient data volumes, complete database independence is very difficult to achieve. The more complex and data-intensive a routine, the more likely it is that it will perform much better in the database. For example, the authors encountered a middle tier Java routine that required 20 minutes to run. This same routine ran in 2/10 of a second when refactored in PL/SQL and moved to the database. Poorly written SQL and PL/SQL routines - In some organizations, this may be the No. 1 cause of slowly performing Web applications. This situation often occurs when Java programmers are also expected to write a lot of SQL code. In most cases, the performance degradation is not caused by a single slow running routine but a tendency to fire off more queries than are needed. Keeping all nine of the potential areas for encountering performance problems in mind and investigating each one carefully can help to identify the cause of a slowly performing Web application and point to ways in which that performance can be improved. 42 independent oracle users group www.ioug.org

n n n About the Author Dr. Paul Dorsey is the founder and president of Dulcian, Inc. an Oracle consulting firm specializing in business rules and Web-based application development. He is the chief architect of Dulcian s Business Rules Information Manager (BRIM ) tool. Dr. Dorsey is the co-author of seven Oracle Press books on Designer, Database Design, Developer, and JDeveloper, which have been translated into nine languages as well as the Wiley Press book PL/SQL for Dummies. Dr. Dorsey is an Oracle ACE Director. He is president emeritus of NYOUG and the associate editor of the International Oracle User Group s SELECT Journal. In 2003, Dr. Dorsey was honored by ODTUG as volunteer of the year and as Best Speaker (Topic & Content) for the 2007 conference, in 2001 by IOUG as volunteer of the year and by Oracle as one of the six initial honorary Oracle 9i Certified Masters. He is also the founder and chairperson of the ODTUG Symposium, currently in its ninth year. Dr. Dorsey s submission of a Survey Generator built to collect data for The Preeclampsia Foundation was the winner of the 2007 Oracle Fusion Middleware Developer Challenge and Oracle selected him as the 2007 PL/SQL Developer of the Year. Michael Rosenblum is a development DBA at Dulcian, Inc. He is responsible for system tuning and application architecture. He supports Dulcian developers by writing complex PL/SQL routines and researching new features. Rosenblum is the co-author of PL/SQL for Dummies (Wiley Press, 2006). He is a frequent presenter at various regional and national Oracle user group conferences. In his native Ukraine, he received the scholarship of the President of Ukraine, a master s degree in Information Systems, and a diploma with honors from the Kiev National University of Economics. Oracle Technology Best Practices 43