Title: Tips and Tricks for Tuning
1Tips and Tricks for Tuning Your Web Environment
Shankaran Iyer Renaissance Worldwide
Inc. Bloomington, Minnesota siyer_at_rens.com www.ren
s.com
2Objectives
Review Oracle Web Application Architecture
Examine special tuning requirements for Oracle
web deployment Provide tuning
recommendations Suggest steps to sustain
application performance
3Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
4Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
5Web Applications Architecture
6Web Applications Architecture
7Web Applications Architecture
Tuning Methodology for Application Server is a
bit different compared to the Application or
Database Tuning
Similarities
Monitor and Tune memory, CPU and disk I/O
utilization General tuning of the database
server
8Web Applications Architecture
Differences
More detailed network bandwidth utilization
analysis Monitoring and Tuning the Web
listeners Tuning the Cartridge processes
Oracle Application Server Tuning adds a new layer
to the overall Database Performance Tuning
Methodology.
9Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
10Web Tuning Tips
Tuning the Oracle Application Server
Tip Closely monitor the size of the log files
- Watch for errors in the log files and regularly
fix them - Develop an archive-and-rollover
process. - Use logs to determine average and
maximum hits to your application.
11Web Tuning Tips
Tuning the Oracle Application Server
Tip For small applications use the same server
as Application Server and Database
Server
- To avoid SQLNet (Net8) traffic, keep the
application and database on the same server -
Consider this architecture for low number of hits
or for pilot projects.
12Web Tuning Tips
Tuning the Oracle Application Server
Tip Estimate the average number of concurrent
users
- Estimate the minimum and maximum users using
the application. - Use these numbers to setup
cartridge processes.
13Web Tuning Tips
Tuning the Oracle Application Server
Tip Make sure that the Application Server has
sufficient free memory
- Cartridges processes requires anywhere between
5 Meg to 14 Meg of memory per user. - Estimate
and plan for large amount of memory.
14Web Tuning Tips
Tuning the Oracle Application Server
Tip Use IP address instead of server name for
connecting to the Database Server
15Web Tuning Tips
Tuning the Oracle Application Server
Tip Set the PL/SQL Cartridge configuration
parameters
- For Version 3.0.1.8.1 set
OWS_ORAWEB_MINMAX 300 OWS_BROKER_BHFREQ
300 - This ensures that idle PL/SQL processes are
killed less often.
16Web Tuning Tips
Tuning the Oracle Application Server
Tip Monitor CPU utilization, memory, swapping
and paging
- The web listeners should always be TOP CPU
consuming processes. - On UNIX use utilities
like sar, top, glance etc. - Swap space should
not exceed 70 of allocated.
17Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
18Web Tuning Tips
Network Tuning
First look for network bandwidth
utilization. Tune certain TCP parameters
- On HP to get help on tunable tcp parameters
nettune -h tcp nettune tcpkeepfreq / shows
curr val / nettune -l tcpkeepfreq / show range
/ nettune -s tcpkeepfreq 2000 / sets value /
19Web Tuning Tips
Processor Utilization
Web listener processes should be top CPU
consumers Use flow chart to analyze CPU
bottlenecks and take corrective action
20Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
21Web Tuning Tips
Cartridge and Listener Tuning
Tip Pin web packages to SGA.
- Find sub-programs consuming maximum memory
SELECT owner, type, name, sharable_mem FROM
vdb_object_cache WHERE type in
(PROCEDURE,PACKAGE, PACKAGE
BODY) ORDER BY sharable_mem desc
22Web Tuning Tips
Cartridge and Listener Tuning
Tip Pin web packages to SGA (continued)
- Find sub-programs frequently used by your
users SELECT owner, type, name, executions
FROM vdb_object_cache WHERE type in
(PROCEDURE,PACKAGE, PACKAGE
BODY) ORDER BY executions desc
23Web Tuning Tips
Cartridge and Listener Tuning
Tip Pin web packages to SGA.
- Pin packages and procedures that are frequently
used. - For pinning use the command, EXECUTE
dbms_shared_pool.keep(ORACLEAPPS)
24Web Tuning Tips
Cartridge and Listener Tuning
Balance load by configuring multiple
listeners Keep the number of database
connections in owa.cfg to a minimum
Use multi-threaded server option to configure
database
25Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
26Web Tuning Tips
Database Server Tuning
Tip Perform general database server tuning
Database Reorganization, avoid row-chaining
Rollback Segment contention Avoid I/O
bottlenecks
27Web Tuning Tips
Database Server Tuning
Tip Increase SHARED_POOL_SIZE. Increase
the size of your SYSTEM tablespace
- should hold all procedures, triggers, functions
and PL/SQL blocks oversize leads to
fragmentation - starting size could be 40-50M -
can be determined based on a study of maximum
utilization and number of concurrent users.
28Web Tuning Tips
Database Server Tuning
Tip Cache frequently used tables
Use the command ALTER TABLE lttable-namegt CACHE
29Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
30Web Tuning Tips
Database Server Tuning
Monitor memory and swap space on Application
Server and Database Server
31Web Application Scalability
Capacity Planning Issues
1. How many more users can I add before I see a
dip in the performance 2. What are the
things to be considered when planning a
large web rollout 3. Identify need for stress
testing 4. Architecture related issues
32Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
33Web Application Scalability
Web Scalability Tips
Plan for adequate resources for concurrent
users
Determine - number of users using the
application - estimate time they will be
using the application - statistics on
parallel use
34Web Application Scalability
Web Scalability Tips
Monitor and Tune Network, CPU and Memory.
- Fixed and Variable Memory - Variable portion
scales linearly based on number of concurrent
hits
35Web Application Scalability
Web Scalability Tips
Scalability Options
Option 1 Add more memory,CPU to the same
server Option 2 Add additional application
server for increasing user loads
(Recommended) Option 3 Use load balancing
hardware/software
36Web Application Scalability
Web Scalability Tips
Stress Testing
- Recommended for large applications - Ensure
your application runs efficiently in your
environment. - Use Stress Testing Tools
37Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
38Web Application Scalability
Architecting for Scalability
Add additional Application Server for larger
volumes to sustain throughput.
39Web Application Scalability
Architecting for Scalability
Configuring multiple application server helps
load balancing Reduces contention between
application server and database server
40Web Application Scalability
Architecting for Scalability
Decide on number of listeners based on number
of cartridges and application load
41Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
42Top-5 Performance Recommendations
1. Accurately estimate and tune the MIN and MAX
connections for various cartridges based on
average number of users, concurrently using the
app. 2. Pin web packages to make them SGA
resident and also tune certain init.ora
parameters. 3. Write scripts to monitor resource
consumption by the web user processes. 4.
Monitor CPU usage, memory consumption, tune TCP
parameters, inspect the web listener log files
periodically. Keep log file size low. 5.
Perform general database tuning including
defragmentation.
43Agenda
Web Applications Architecture Web Tuning
Tips gtgt Tuning the Oracle Application
Server gtgt Network Tuning gtgt
Cartridge and Listener Tuning gtgt
Database Server Tuning Web Application
Scalability gtgt Capacity Planning Issues
gtgt Web Scalability Tips gtgt
Architecting for Scalability Top-5 Performance
Recommendations Conclusion
44To Summarize...
Oracle Application Server provides a good
platform for deploying scalable applications.
Thorough monitoring and tuning can improve
performance of Oracle web-based applications.
45Questions !
46About
Global IT and Management consulting 100
offices globally, 6500 consultants/experts
Headquarters _at_ Newton, Boston.
Minneapolis Branch
Consulting services in areas like E-commerce,
Test and QA, Database, Network Services and
Client Server Development Services 250 Staff
and Hourly consultants Laura Miller, Branch
Manager 612-851-3615 lmiller_at_rens.com
47About the Author
Shankaran Iyer has been working with Oracle
Server and Tools for over 11 years. He provides
consulting on Performance Audit, data warehousing
and technical DBA and web deployment
issues. Shankaran is working with Renaissance
Worldwide Inc. in Minneapolis as Technology
Manager. He can be reached at (612)851-3160.
His email is siyer_at_rens.com