Oracle ORACLE9I B10508-01 User manual

Category
Bridge cameras
Type
User manual

This manual is also suitable for

Oracle9
i
Application Server
Oracle HTTP Server powered by Apache Performance Guide
Release 1.0.2 for AIX-Based Systems, Compaq Tru64 UNIX, HP 9000 Series HP-UX,
Linux Intel, and Sun Solaris Intel
October 2000
Part No. A86828-01
Oracle9i Application Server Oracle HTTP Server powered by Apache Performance Guide, Release 1.0.2
Part No. A86828-01
Copyright © 2000, Oracle Corporation. All rights reserved.
Authors: Pallavi Bhowmik, and Julia Pond.
Contributors: Corinne Arne, Rupesh Das, Danielle Higgins, Prashanth Joshi, Rajesh
Konanganparambath, Saurabh Pandey, and Sriram V.R. Nagaraja Rao .
The Programs (which include both the software and documentation) contain proprietary information of Oracle
Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are
also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering,
disassembly, or decompilation of the Programs is prohibited.
The information contained in this document is subject to change without notice. If you find any problems in the
documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is
error free. Except as may be expressly permitted in your license agreement for these Programs, no part of these
Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any
purpose, without the express written permission of Oracle Corporation.
If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on behalf of the
U.S. Government, the following notice is applicable:
Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial computer
software" and use, duplication, and disclosure of the Programs, including documentation, shall be subject to the
licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject
to the Federal Acquisition Regulations are "restricted computer software" and use, duplication, and disclosure
of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software -
Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently
dangerous applications. It shall be the licensee’s responsibility to take all appropriate fail-safe, backup,
redundancy, and other measures to ensure the safe use of such applications if the Programs are used for such
purposes, and Oracle Corporation disclaims liability for any damages caused by such use of the Programs.
Oracle is a registered trademark, and the Oracle Logo, Internet Application Server, Oracle8i, Oracle Enterprise
Manager, Oracle Internet Directory, and PL/SQL are trademarks or registered trademarks of Oracle
Corporation. All other company or product names mentioned are used for identification purposes only and
may be trademarks of their respective owners.
This product includes software developed by the Apache Group for use in the Apache HTTP server project
(http://www.apache.org/).
This product includes software developed by the OpenSSL project for use in the OpenSSL Toolkit
(http://www.openssl.org/). This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com).
This product includes software developed by Ralf S. Engelschall (rse@engelschall.com) for use in the mod_ssl
project (http://www.modssl.org/).
iii
Contents
Send Us Your Comments.................................................................................................................. vii
Preface............................................................................................................................................................ ix
1 Performance Overview
Performance Terms............................................................................................................................. 1-2
What is Performance Tuning? .......................................................................................................... 1-2
Response Time.............................................................................................................................. 1-3
System Throughput...................................................................................................................... 1-4
Wait Time....................................................................................................................................... 1-4
Critical Resources......................................................................................................................... 1-5
Effects of Excessive Demand....................................................................................................... 1-6
Adjustments to Relieve Problems .............................................................................................. 1-6
Setting Performance Targets............................................................................................................. 1-7
Setting User Expectations.................................................................................................................. 1-7
Evaluating Performance .................................................................................................................... 1-7
Performance Methodology ............................................................................................................... 1-8
Factors in Improving Performance ............................................................................................ 1-9
Architecture........................................................................................................................................ 1-10
2 Monitoring Your Web Server
Monitoring Processor Use................................................................................................................. 2-2
Using the sar Utility (AIX, HP-UX, Intel Solaris)..................................................................... 2-2
Using the top Utility..................................................................................................................... 2-3
iv
Monitoring the Web Server............................................................................................................... 2-3
Using the mod_status Utility...................................................................................................... 2-4
Logging Server Statistics to a File............................................................................................... 2-6
Monitoring JServ Processes.............................................................................................................. 2-8
3 Sizing and Configuration
Sizing your Hardware and Resources............................................................................................. 3-1
Understanding Concurrent Users and User Population ............................................................. 3-1
Determining CPU Requirements.................................................................................................... 3-3
Secure Sockets Layer Impact on CPU Requirements .............................................................. 3-3
Determining Memory Requirements.............................................................................................. 3-3
Memory for Non-HTTP Server Software and Operating System ......................................... 3-4
HTTP Server Memory Requirements ........................................................................................ 3-4
JServ Memory Requirements...................................................................................................... 3-4
Determining Java Heap Size....................................................................................................... 3-4
Servlet and OracleJSP pages Memory Requirements.............................................................. 3-5
Number of JServ Processes.......................................................................................................... 3-6
4 Optimizing HTTP Server Performance
TCP Tuning .......................................................................................................................................... 4-2
Linux Tunables.............................................................................................................................. 4-4
MaxClients ........................................................................................................................................... 4-9
SSL Session Caching........................................................................................................................ 4-10
Impact of Logging............................................................................................................................. 4-10
HTTP/1.1............................................................................................................................................. 4-11
Persistent Connections............................................................................................................... 4-11
Apache Versions................................................................................................................................ 4-14
5 Optimizing Apache JServ
JServ Overview.................................................................................................................................... 5-2
Optimizing Servlet Performance..................................................................................................... 5-3
Loading Servlet Classes............................................................................................................... 5-3
Automatic Class Reloading......................................................................................................... 5-3
Load Balancing.............................................................................................................................. 5-4
v
Using Single Thread Model Servlets.......................................................................................... 5-7
What is OracleJSP?............................................................................................................................. 5-8
OracleJSP Page Performance Tuning.............................................................................................. 5-8
Impact of Session Management.................................................................................................. 5-8
Developer Mode ........................................................................................................................... 5-9
Buffering ........................................................................................................................................ 5-9
Enhancing OracleJSP Performance............................................................................................ 5-9
Index
vi
vii
Send Us Your Comments
Oracle9
i
Application Server, Oracle HTTP Server powered by Apache Performance Guide,
Release 1.0.2
Part No. A86828-01
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this
publication. Your input is an important part of the information used for revision.
Did you find any errors?
Is the information clearly presented?
Do you need more information? If so, where?
Are the examples correct? Do you need more examples?
What features did you like most about this manual?
If you find any errors or have any other suggestions for improvement, please indicate the chapter,
section, and page number (if available). You can send comments to us in the following ways:
E-mail - [email protected]
Postal service:
Oracle Corporation
500 Oracle Parkway, M/S 6op4
Redwood Shores, CA 94065
USA
If you would like a reply, please give your name, address, and telephone number below.
If you have problems with the software, please contact your local Oracle Support Services.
viii
ix
Preface
Audience
This guide is written for Oracle Internet Application Server 8i developers and
system administrators who are responsible for configuring and tuning the Oracle
HTTP Server powered by Apache.
Assumptions
There are many sources of information on configuring and tuning web servers,
Apache in particular. This guide refers to those sources when expedient, and, where
practical, quantifies the performance gains resulting from configuration actions
found in those sources. Any recommendations not validated by our in-house testing
are cited as such, with attribution to the original source.
All of our in-house tests were run on a dedicated 100 Mbps network, in order to
achieve repeatable test results. Your results will vary based on network
configuration and contention characteristics.
Conventions
This manual uses the following typographical conventions:
Convention Example Explanation
bold tnsnames.ora
runInstaller
www.oracle.com
Identifies file names,
utilities,
processes,
and URLs
x
The term, Oracle Server, refers to the database server product from Oracle
Corporation.
The term, oracle, refers to an executable or account by that name.
The term, oracle, refers to the owner of the Oracle software.
Oracle Services and Support
A wide range of information about Oracle products and global services is available
from:
http://www.oracle.com
The sections below provide URLs for selected services.
Oracle Support Services
Technical Support contact information worldwide is listed at:
http://www.oracle.com/support
Templates are provided to help you prepare information about your problem before
you call. You will also need your CSI number (if applicable) or complete contact
details, including any special project information.
italics file1 Identifies a variable in text; replace this place
holder with a specific value or string.
angle brackets <filename> Identifies a variable in code; replace this
place holder with a specific value or string.
courier owsctl start wrb Text to be entered exactly as it appears. Also
used for functions.
square brackets [-c string]
[on|off]
Identifies an optional item.
Identifies a choice of optional items, each
separated by a vertical bar (|), any one
option can be specified.
braces {yes|no} Identifies a choice of mandatory items, each
separated by a vertical bar (|).
ellipses n,... Indicates that the preceding item can be
repeated any number of times.
Convention Example Explanation
xi
Product and Documentation
For U.S.A customers, Oracle Store is at:
http://store.oracle.com
Links to Stores in other countries are provided from this site.
Product documentation can be found at:
http://docs.oracle.com
Customer Service
Global Customer Service contacts are listed at:
http://www.oracle.com/support
Education and Training
Training information and worldwide schedules are available from:
http://education.oracle.com
Oracle Technology Network
Register with the Oracle Technology Network (OTN) at:
http://technet.oracle.com
OTN delivers technical papers, code samples, product documentation, self-service
developer support, and Oracle key developer products to enable rapid
development and deployment of application built on Oracle technology.
xii
Performance Overview 1-1
1
Performance Overview
This chapter discusses performance and tuning concepts, and briefly describes
Oracle9i Application Server architecture.
Contents
Performance Terms
What is Performance Tuning?
Setting Performance Targets
Setting User Expectations
Evaluating Performance
Performance Methodology
Architecture
Performance Terms
1-2 Oracle HTTP Server powered by Apache Performance Guide
Performance Terms
Following are performance terms used in this book:
What is Performance Tuning?
Performance must be built in. You must anticipate performance requirements
during application analysis and design, and balance the costs and benefits of
optimal performance (see "Setting Performance Targets" on page 1-7). This section
introduces some fundamental concepts:
Response Time
System Throughput
concurrency The ability to handle multiple requests simultaneously.
Threads and processes are examples of concurrency
mechanisms.
latency The time that one system component spends waiting for
another component in order to complete the entire task.
Latency can be defined as wasted time. In networking
discussions, latency is defined as the travel time of a
packet from source to destination.
response time The time between the submission of a request and the
completion of the response.
scalability The ability of a system to provide throughput in
proportion to, and limited only by, available hardware
resources.
A scalable system is one that can handle increasing
numbers of requests without adversely affecting response
time and throughput.
service time The time between the initiation and completion of the
response to a request.
think time The time the user is not engaged in actual use of the
processor.
throughput The number of requests processed per unit of time.
wait time The time between the submission of the request and
initiation of the response.
What is Performance Tuning?
Performance Overview 1-3
Wait Time
Critical Resources
Effects of Excessive Demand
Adjustments to Relieve Problems
Response Time
Because response time equals service time plus wait time, you can increase
performance in this area by:
Reducing wait time
Reducing service time
Figure 1–1 illustrates ten independent tasks competing for a single resource.
Figure 1–1 Sequential processing of independent tasks
In this example, only task 1 runs without waiting. Task 2 must wait until task 1 has
completed; task 3 must wait until tasks 1 and 2 have completed, and so on.
(Although the figure shows the independent tasks as the same size, the size of the
tasks will vary.)
What is Performance Tuning?
1-4 Oracle HTTP Server powered by Apache Performance Guide
In parallel processing with multiple resources, more resources are available to the
tasks. Each independent task executes immediately using its own resource: no wait
time is involved.
System Throughput
System throughput is the amount of work accomplished in a given amount of time.
You can increase throughput by:
Reducing service time
Reducing overall response time by increasing the amount of scarce resources
available. For example, if the system is CPU bound, and you can add more
CPUs.
Wait Time
While the service time for a task may stay the same, wait time will lengthen with
increased contention. If many users are waiting for a service that takes one second,
the tenth user must wait 9 seconds. Figure 1–2 shows the relationship between wait
time and resource contention.
Figure 1–2 Wait time rising with increased contention for a resource
What is Performance Tuning?
Performance Overview 1-5
Critical Resources
Resources such as CPU, memory, I/O capacity, and network bandwidth are key to
reducing service time. Adding resources increases throughput and reduces response
time. Performance depends on these factors:
How many resources are available?
How many clients need the resource?
How long must they wait for the resource?
How long do they hold the resource?
Figure 1–3 shows that as the number of units requested rises, the time to service
completion rises.
Figure 1–3 Time to service completion vs. demand rate
To manage this situation, you have two options:
Limit demand rate to maintain acceptable response times
Add resources
What is Performance Tuning?
1-6 Oracle HTTP Server powered by Apache Performance Guide
Effects of Excessive Demand
Excessive demand increases response time and reduces throughput, as shown in
Figure 1–4. If there is any possibility of the demand rate exceeding the achievable
throughput, a demand limiter (such as MaxClients in the Oracle HTTP Server and
security.maxConnections in JServ) is essential. Look at the possible demands that
may be placed on the system and design the application or configure the system
with these constraints in mind.
Figure 1–4 Increased Demand/Reduced Throughput
Adjustments to Relieve Problems
Performance problems can be relieved by making adjustments in the following
areas:
unit consumption Reducing the resource (CPU, memory)
consumption of each request can improve
performance. This might be achieved by
pooling and caching.
functional demand Rescheduling or redistributing the work
will relieve some problems.
capacity Increasing or reallocating resources (e.g.,
CPUs) relieves some problems.
Evaluating Performance
Performance Overview 1-7
Setting Performance Targets
Whether you are designing or maintaining a system, you should set specific
performance goals so that you know how and what to optimize. If you alter
parameters without a specific goal in mind, you can waste time tuning your system
without significant gain.
An example of a specific performance goal is an order entry response time under
three seconds. If the application does not meet that goal, identify the cause (for
example, I/O contention), and take corrective action. During development, test the
application to determine if it meets the designed performance goals.
Tuning usually involves a series of trade-offs. Once you have determined the
bottlenecks, you may have to modify performance in some other areas to achieve
the desired results. For example, if I/O is a problem, you may need to purchase
more memory or more disks. If a purchase is not possible, you may have to limit the
concurrency of the system to achieve the desired performance. However, if you
have clearly defined goals for performance, the decision on what to trade for higher
performance is simpler because you have identified the most important areas.
Setting User Expectations
Application developers, database administrators, and system administrators must
be careful to set appropriate performance expectations for users. When the system
carries out a particularly complicated operation, response time may be slower than
when it is performing a simple operation. Users should be made aware of which
operations might take longer.
Evaluating Performance
With clearly defined performance goals, you can readily determine when
performance tuning has been successful. Success depends on the functional
objectives you have established with the user community, your ability to measure
whether or not the criteria are being met, and your ability to take corrective action
to overcome any exceptions.
Ongoing performance monitoring enables you to maintain a well tuned system.
Keeping a history of the application’s performance over time enables you to make
useful comparisons. With data about actual resource consumption for a range of
loads, you can conduct objective scalability studies and from these predict the
resource requirements for anticipated load volumes.
Performance Methodology
1-8 Oracle HTTP Server powered by Apache Performance Guide
Performance Methodology
Achieving optimal effectiveness in your system requires planning, monitoring, and
periodic adjustment. The first step in performance tuning is to determine the goals
you need to achieve and to design effective usage of available technology into your
applications. After implementing your system, it is necessary to periodically
monitor and adjust your system For example, you might want to ensure that 90% of
the users experience response times no greater than 5 seconds and the maximum
response time for all users is 20 seconds. Usually, it’s not that simple. Your
application may include a variety of operations with differing characteristics and
acceptable response times. You will need to set measurable goals for each of these.
Figure 1–5 Adjusting Capacity and Functional Demand
You will also need to determine variances in the load. For example, users might
access the system heavily between 9:00am and 10:00am and then again between
1:00pm and 2:00pm. If your peak load occurs on a regular basis, for example, daily
or weekly, the conventional wisdom is to configure and tune systems to meet your
peak load requirements. The lucky users who access the application in off-time will
typically achieve better response times than your peak-time users. If your peak load
is infrequent, you may be willing to tolerate higher response times at peak loads for
the cost savings of smaller hardware configurations.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68

Oracle ORACLE9I B10508-01 User manual

Category
Bridge cameras
Type
User manual
This manual is also suitable for

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI