SlideShare uma empresa Scribd logo
1 de 22
Baixar para ler offline
Performance Tuning in Weblogic Server
Performance Tuning Topics
● Tuning EJB
● Tuning JMS
● Tuning Web Application
● Tuning Web Services
● Tuning JDBC
● Tuning Server
Understand Your Performance
Objectives
To determine your performance objectives, you need to understand the application
deployed and the environmental constraints placed on the system. Gather information
about the levels of activity that components of the application are expected to meet, such
as:
• The anticipated number of users.
• The number and size of requests.
• The amount of data and its consistency.
• Determining your target CPU utilization.
Your target CPU usage should not be 100%, you should determine a target CPU
utilization based on your application needs, including CPU cycles for peak usage. If
your CPU utilization is optimized at 100% during normal load hours, you have no
capacity to handle a peak load. In applications that are latency sensitive and
maintaining the ability for a fast response time is important, high CPU usage
(approaching 100% utilization) can reduce response times while throughput stays
constant or even increases because of work queuing up in the server. For such
applications, a 70% - 80% CPU utilization recommended. A good target for non-
Understand Performance Objective
• The configuration of hardware and software such as CPU type, disk size
vs. disk speed, sufficient memory.
There is no single formula for determining your hardware requirements. The
process of determining what type of hardware and software configuration is
required to meet application needs adequately is called capacity planning.
Capacity planning requires assessment of your system performance goals
and an understanding of your application. Capacity planning for server
hardware should focus on maximum performance requirements.
• The ability to interoperate between domains, use legacy systems,
support legacy data.
• Development, implementation, and maintenance costs.
Monitor Utilization
– Monitor Disk and CPU Utilization
Run your application under a high load while monitoring the:
• Application server (disk and CPU utilization)
• Database server (disk and CPU utilization)
The goal is to get to a point where the application server achieves your target CPU
utilization. If you find that the application server CPU is under utilized, confirm whether
the database is bottle necked. If the database CPU is 100 percent utilized, then check
your application SQL calls query plans. For example, are your SQL calls using indexes
or doing linear searches? Also, confirm whether there are too many ORDER BY clauses
used in your application that are affecting the database CPU.
If you discover that the database disk is the bottleneck (for example, if the disk is 100
percent utilized), try moving to faster disks or to a RAID (redundant array of
independent disks) configuration, assuming the application is not doing more writes then
required.
Monitor Utilization
– Monitor Disk and CPU Utilization
.
Once you know the database server is not the bottleneck, determine whether the
application server disk is the bottleneck. Some of the disk bottlenecks for application
server disks are:
• Persistent Store writes
• Transaction logging (tlogs)
• HTTP logging
• Server logging
The disk I/O on an application server can be optimized using faster disks or RAID,
disabling synchronous JMS writes, using JTA direct writes for tlogs, or increasing the
HTTP log buffer.
Monitor Data Transfers Across the
Network
– Locate Bottlenecks in Your System
If you determine that neither the network nor the database server is the bottleneck, start
looking at your operating system, JVM, and WebLogic Server configurations. Most
importantly, is the machine running WebLogic Server able to get your target CPU
utilization with a high client load? If the answer is no, then check if there is any locking
taking place in the application. You should profile your application using a
commercially available tool (for example, JProbe or OptimizeIt) to pinpoint bottlenecks
and improve application performance.
– Minimize Impact of Bottlenecks
In this step, you tune your environment to minimize the impact of bottlenecks on your
performance objectives. It is important to realize that in this step you are minimizing the
impact of bottlenecks, not eliminating them. Tuning allows you to adjust resources to
achieve your performance objectives.
EJB Tuning
■Deploymentdescriptorsareschema-based. Descriptorsthatarenew inthisreleaseof
WebLogicServer arenotavailableasDTD-baseddescriptors. ■Avoidusingthe
RequiresNew transactionparameter. UsingRequiresNew causestheEJB container to
startanew transactionafter suspendingany currenttransactions. Thismeansadditional
resources, includingaseparatedatabaseconnectionareallocated.
■Uselocal-interfacesor setcall-by-referencetotruetoavoidtheoverheadof
serializationwhenoneEJB callsanother or anEJB iscalledby aservlet/JSP inthesame
application. Notethefollowing:
– Inreleaseprior toWebLogicServer 8.1, call-by-referenceisturnedonby default. For
releasesof WebLogicServer 8.1andhigher, call-by-referenceisturnedoff by default.
Older applicationsmigratingtoWebLogicServer 8.1andhigher thatdonotexplicitly
turnoncall-by-referencemay experienceadropinperformance.
– Thisoptimizationdoesnotapply tocallsacrossdifferentapplications.
EJB Tuning
■UseStatelesssessionbeansover Stateful sessionbeanswhenever possible. Stateless
sessionbeansscalebetter thanstateful sessionbeansbecausethereisnostate
informationtobemaintained.
■WebLogicServer providesadditional transactionperformancebenefitsfor EJBsthat
resideinaWebLogicServer cluster. WhenasingletransactionusesmultipleEJBs,
WebLogicServer attemptstouseEJB instancesfromasingleWebLogicServer
instance, rather thanusingEJBsfromdifferentservers. Thisapproachminimizes
network trafficfor thetransaction. Insomecases, atransactioncanuseEJBsthatreside
onmultipleWebLogicServer instancesinacluster. Thiscanoccur inheterogeneous
clusters, whereall EJBshavenotbeendeployedtoall WebLogicServer instances. In
thesecases, WebLogicServer usesamultitier connectiontoaccessthedatastore, rather
thanmultipledirectconnections. Thisapproachusesfewer resources, andyieldsbetter
performancefor thetransaction. However, for bestperformance, thecluster shouldbe
homogeneous
— all EJBsshouldresideonall availableWebLogicServer instances.
Tuning Stateful Session Bean Cache
TheEJB Container cachesstateful sessionbeansinmemory uptoacount
specifiedby themax-beans-in-cache parameter specifiedin
weblogic-ejb-jar.xml. Thisparameter shouldbesetequal tothenumber
of concurrentusers. Thisensuresminimumpassivationof stateful sessionbeans
todisk andsubsequentactivationfromdisk whichyieldsbetter performance.
Tuning Entity Bean Cache
Transaction-Level Caching
Onceanentity beanhasbeenloadedfromthedatabase, itisalwaysretrievedfromthecache
whenever itisrequestedwhenusingthefindByPrimaryKey or invokedfromacached
referenceinthattransaction. Gettinganentity beanusinganon-primary key finder always
retrievesthepersistentstateof thebeanfromthedatabase.
Caching between Transactions
Entity beaninstancesarealsocachedbetweentransactions. However, by default, thepersistent
stateof theentity beansarenotcachedbetweentransactions. Toenablecachingbetween
transactions, setthevalueof thecache-between-transactions parameter totrue.
Ready Bean Caching
For entity beanswithahighcachemissratio, maintainingready beaninstancescanadversely
affectperformance.
If youcansetdisable-ready-instances intheentity-cache element of an
entity-descriptor, thecontainer doesnotmaintaintheready instancesincache. If the
feature is enabled in the deployment descriptor, the cache only keeps the active
instances. Once the involved transaction is committed or rolled back, the bean instance is
moved from active cache to the pool immediately
MDB Pool Tuning
Thelifecycleof MDBsisvery similar tostatelesssessionbeans. TheMDB pool
hasthesametuningparametersasstatelesssessionbeansandthesamefactors
apply whentuningthem. Ingeneral, mostuserswill findthatthedefaultvalues
areadequatefor mostapplications.
Tuning Stateless Session Bean Pool
TheEJB container maintainsapool of statelesssessionbeanstoavoidcreatingand
destroyinginstances. Thoughgenerally useful, thispoolingisevenmoreimportantfor
performancewhentheejbCreate() andthesetSessionContext() methods
areexpensive. Thepool hasalower aswell asanupper bound. Theupper boundisthe
moreimportantof thetwo.
Theupper boundisspecifiedby themax-beans-in-free-pool parameter. It
shouldbesetequal tothenumber of threadsexpectedtoinvoketheEJB concurrently.
Usingtoosmall of avalueimpactsconcurrency.
Thelower boundisspecifiedby theinitial-beans-in-free-pool
parameter. Increasingthevalueof initial-beans-in-free-pool increasesthe
timeittakestodeploy theapplicationcontainingtheEJB andcontributestostartuptime
for theserver. Theadvantageisthecostof creatingEJB instancesisnotincurredatrun
time. Settingthisvaluetoohighwastesmemory.
Tuning Entity Bean Pool
Theentity beanpool servestwopurposes:
A targetobjectsfor invocationof findersviareflection.
A pool of beaninstancesthecontainer canrecruitif itcannotfindaninstance
for aparticular primary key inthecache.
Theentity pool containsanonymousinstances(instancesthatdonothavea
primary key). Thesebeansarenotyetactive(meaningejbActivate() has
notbeeninvokedonthemyet), thoughtheEJB contexthasbeenset. Entity bean
instancesevictedfromtheentity cachearepassivatedandputintothepool. The
tunablesaretheinitial-beans-in-free-pool andmax-beans-in-
free-pool. UnlikestatelesssessionbeansandMDBs, themax-beans-in-
free-pool hasnorelationwiththethreadcount. Youshouldincreasethe
valueof max-beans-in-free-pool if theentity beanconstructor or
setEnityContext() methodsareexpensive.
JMS Tuning
● Alwaysconfigurequotas
● Verify thatdefaultpagingsettingsapply toyour needs. Paginglowersperformance
butmay berequiredif JVM memory isinsufficient.
● Avoidlargemessagebacklogs.
● Createandusecustomconnectionfactorieswithall applicationsinsteadof using
defaultconnectionfactories, includingwhenusingMDBs. Defaultconnection
factoriesarenottunable, whilecustomconnectionfactoriesprovidemany options
for performancetuning.
● Writeapplicationssothatthey cacheandre-useJMS clientresources, including
JNDI contextsandlookups, andJMS connections, sessions, consumers, or
producers. Theseresourcesarerelatively expensivetocreate. For informationon
detectingwhencachingisneeded, aswell asonbuilt-inpoolingfeatures
●
JMS Tuning
● For asynchronousconsumersandMDBs, tuneMessagesMaximum onthe
connectionfactory. IncreasingMessagesMaximum canimproveperformance,
decreasingMessagesMaximum toitsminimumvaluecanlower performance, but
helpsensurethatmessagesdonotendupwaitingfor aconsumer that'salready
processingamessage.
● Avoidsinglethreadedprocessingwhenpossible. Usemultipleconcurrentproducers
andconsumersandensurethatenoughthreadsareavailabletoservicethem.
● Tuneserver-sideapplicationssothatthey haveenoughinstances. Consider creating
dedicatedthreadpoolsfor theseapplications.
● For client-sideapplicationswithasynchronousconsumers, tuneclient-sidethread
pools
● Inparticular, it'snormally bestfor multipleJMS servers, destinations, andother
servicestosharethesamestoresothatthestorecanaggregateconcurrentrequests
intosinglephysical I/O requests, andtoreducethechancethataJTA transaction
spansmorethanonestore. Multiplestoresshouldonly beconsideredonceit'sbeen
establishedthattheasinglestoreisnotscalingtohandlethecurrentload.
Tuning Web Application
Disable Page Checks
Youcanimproveperformanceby disablingservletandJDP pagechecks. Seteachof the
followingparametersto-1:
pageCheckSeconds
servlet-reload-check-secs
servlet Reload Check
Thesearedefaultvaluesfor productionmode.
Use Custom JSP Tags
OracleprovidesthreespecializedJSP tagsthatyoucanuseinyour JSP pages: cache,
repeat, andprocess. Thesetagsarepackagedinataglibrary jar filecalledweblogic-
tags.jar. Thisjar filecontainsclassesfor thetagsandataglibrary descriptor (TLD).
Tousethesetags, youcopy thisjar filetotheWebapplicationthatcontainsyour JSPs
andreferencethetaglibrary inyour JSP
Tuning Web Application
Precompile JSPs
YoucanconfigureWebLogicServer toprecompileyour JSPswhenaWebApplicationisdeployedor re-
deployedor whenWebLogicServer startsupby settingtheprecompileparameter totrueinthejsp-
descriptor elementof theweblogic.xml deploymentdescriptor. Toavoidrecompilingyour JSPs
eachtimetheserver restartsandwhenyoutargetadditional servers, precompilethemusingweblogic.jspc
andplacethemintheWEB-INF/classesfolder andarchivethemina.war file. Keepingyour sourcefilesina
separatedirectory fromthearchived.war fileeliminatesthepossibility of errorscausedbyaJSP havinga
dependency ononeof theclassfiles.
Disable Access Logging
Settingtheaccess-logging-disabled elementcaneliminateaccessloggingof theunderlying Web
application, which can improve server throughput by reducing the loggingoverhead. Seecontainer-
descriptor inDevelopingWebApplications, Servlets, and JSPs for Oracle WebLogic Server.
Use HTML Template Compression
Usingthecompress-html-template elementcompressestheHTML intheJSP template blocks
which can improve runtime performance. If the JSP's HTML template block containsthe<pre>
HTML tag, donotenablethisfeature. Seejsp-descriptor inDevelopingWebApplications, Servlets,
andJSPsfor OracleWebLogic Server.
Tuning Web Services
DesignWebServiceapplicationsfor course-grainedservicewithmoderate
sizepayloads.
■Choosecorrectservice-style& encodingfor your wepserviceapplication.
■Control serializer overheadsandnamespacesdeclarationstoachievebetter
performance.
■UseMTOM/XOP or FastInfosettooptimizingtheformatof aSOAP
message.
■Carefully designSOAP attachmentsandsecurity implementationsfor
minimumperformanceoverheads.
Tuning Web Services
■Consider usinganasynchronousmessagingmodel for applicationswith:
– Slow andunreliabletransport.
– Complex andlong-runningprocess.
■For transactional ServiceOrientedArchitectures(SOA) consider usingtheLastLogging
Resourcetransactionoptimization(LLR) toimproveperformance.
■Usereplicationandcachingof dataandschemadefinitionstoimproveperformanceby
minimizingnetwork overhead.
■Consider any XML compressiontechniqueonly whenXML compression/decompression
overheadsarelessthannetwork overheadsinvolved.
■Applicationsthatareheavy usersof XML functionality (parsers) may encounter performance
issuesor runoutof filedescriptors. Thismay occur becauseXML parser instancesare
bootstrappedby doingalookupinthejaxp.propertiesfile(JAXP API). Oraclerecommendssetting
thepropertiesonthecommandlinetoavoidunnecessary fileoperationsatruntimeandimprove
performanceandresourceusage.
Tuning Heavily Loaded Systems to Improve
Web Service Performance
Setting the Buffering Sessions
ThereliablemessagingandbufferingfeaturesuseJMS queuesessionstosend
messagestothereliability/buffer queues. By default, WebLogicServer allocates
10sessionsfor bufferingwhichenables10clientstoenqueuemessages
simultaneously ontothereliability/buffer queue.
For asynchronousrequest-response, therequestandresponseportionof the
communicationexchangecountseparately, astwoclients. Inthiscase, the
defaultpool of sessionscansupportfivesimultaneousasynchronousrequest-
responseclients. Toaccommodatethenumber of concurrentclientsyouexpect
inyour application, setthefollowingparameter totwicethenumber of expected
clientthreads:
-Dweblogic.wsee.buffer.QueueSessionPoolSize=size
Tuning Heavily Loaded Systems to Improve
Web Service Performance
Releasing Asynchronous Resources
Whenusingtheasynchronousrequest-responsefeature, WebLogicServer persistently
storesinformationabouttherequestuntil theasynchronousresponseisreturnedtothe
client. Theseresourcesremaininthepersistentstoreuntil they arereleasedby a
backgroundthread, calledthestore cleaner.
Often, theseresourcescanbereleasedsooner. Executingthestorecleaner more
frequently canhelptoreducethesizeof thepersistentstoreandminimizethetime
requiredtocleanit. By default, thestorecleaner runsevery twominutes(120000ms).
Oraclerecommendsthatyousetthestorecleaner interval tooneminute(60000ms)
usingthefollowing
Javasystemproperty:
-Dweblogic.wsee.StateCleanInterval=60000

Mais conteúdo relacionado

Mais procurados

JPA and Coherence with TopLink Grid
JPA and Coherence with TopLink GridJPA and Coherence with TopLink Grid
JPA and Coherence with TopLink GridJames Bayer
 
Weblogic server administration
Weblogic server administrationWeblogic server administration
Weblogic server administrationbispsolutions
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB
 
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...Jeffrey West
 
SharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOnSharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOnZeddy Iskandar
 
App Grid Dev With Coherence
App Grid Dev With CoherenceApp Grid Dev With Coherence
App Grid Dev With CoherenceJames Bayer
 
Weblogic configuration
Weblogic configurationWeblogic configuration
Weblogic configurationAditya Bhuyan
 
resource governor
resource governorresource governor
resource governorAaron Shilo
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresJakkrapat S.
 
New Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL LanguageNew Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL LanguageSteven Feuerstein
 

Mais procurados (14)

Oracle Web Logic server
Oracle Web Logic serverOracle Web Logic server
Oracle Web Logic server
 
JPA and Coherence with TopLink Grid
JPA and Coherence with TopLink GridJPA and Coherence with TopLink Grid
JPA and Coherence with TopLink Grid
 
SQL Developer for DBAs
SQL Developer for DBAsSQL Developer for DBAs
SQL Developer for DBAs
 
Weblogic server administration
Weblogic server administrationWeblogic server administration
Weblogic server administration
 
EDB Postgres DBA Best Practices
EDB Postgres DBA Best PracticesEDB Postgres DBA Best Practices
EDB Postgres DBA Best Practices
 
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
 
AlwaysON Basics
AlwaysON BasicsAlwaysON Basics
AlwaysON Basics
 
SharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOnSharePoint Disaster Recovery with SQL AlwaysOn
SharePoint Disaster Recovery with SQL AlwaysOn
 
App Grid Dev With Coherence
App Grid Dev With CoherenceApp Grid Dev With Coherence
App Grid Dev With Coherence
 
Weblogic configuration
Weblogic configurationWeblogic configuration
Weblogic configuration
 
resource governor
resource governorresource governor
resource governor
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
Les 09 diag
Les 09 diagLes 09 diag
Les 09 diag
 
New Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL LanguageNew Stuff in the Oracle PL/SQL Language
New Stuff in the Oracle PL/SQL Language
 

Semelhante a Weblogic performance tuning2

Weblogic Cluster performance tuning
Weblogic Cluster performance tuningWeblogic Cluster performance tuning
Weblogic Cluster performance tuningAditya Bhuyan
 
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business SuiteOOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business Suitevasuballa
 
Jee performance tuning existing applications
Jee performance tuning existing applicationsJee performance tuning existing applications
Jee performance tuning existing applicationsShivnarayan Varma
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingMavenWire
 
Performance Testing
Performance TestingPerformance Testing
Performance TestingAnu Shaji
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephenSteve Feldman
 
Database performance management
Database performance managementDatabase performance management
Database performance managementscottaver
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...Alireza Kamrani
 
ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14andrejusb
 
Optimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareOptimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareIndicThreads
 
Performance tuning intro
Performance tuning introPerformance tuning intro
Performance tuning introaioughydchapter
 
performancetestinganoverview-110206071921-phpapp02.pdf
performancetestinganoverview-110206071921-phpapp02.pdfperformancetestinganoverview-110206071921-phpapp02.pdf
performancetestinganoverview-110206071921-phpapp02.pdfMAshok10
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Aaron Shilo
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]vasuballa
 
Adding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestRodolfo Kohn
 
Bottlenecks exposed
Bottlenecks exposedBottlenecks exposed
Bottlenecks exposedVikas Singh
 

Semelhante a Weblogic performance tuning2 (20)

Weblogic Cluster performance tuning
Weblogic Cluster performance tuningWeblogic Cluster performance tuning
Weblogic Cluster performance tuning
 
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business SuiteOOW15 - Getting Optimal Performance from Oracle E-Business Suite
OOW15 - Getting Optimal Performance from Oracle E-Business Suite
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
Jee performance tuning existing applications
Jee performance tuning existing applicationsJee performance tuning existing applications
Jee performance tuning existing applications
 
OTM Performance Review and Benchmarking
OTM Performance Review and BenchmarkingOTM Performance Review and Benchmarking
OTM Performance Review and Benchmarking
 
Optimizing proxy
Optimizing proxyOptimizing proxy
Optimizing proxy
 
Performance Testing
Performance TestingPerformance Testing
Performance Testing
 
Optimiszing proxy
Optimiszing proxyOptimiszing proxy
Optimiszing proxy
 
071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen071410 sun a_1515_feldman_stephen
071410 sun a_1515_feldman_stephen
 
Database performance management
Database performance managementDatabase performance management
Database performance management
 
Performance Tuning intro
Performance Tuning introPerformance Tuning intro
Performance Tuning intro
 
🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...🏗️Improve database performance with connection pooling and load balancing tec...
🏗️Improve database performance with connection pooling and load balancing tec...
 
ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14ADF Mythbusters UKOUG'14
ADF Mythbusters UKOUG'14
 
Optimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardwareOptimizing your java applications for multi core hardware
Optimizing your java applications for multi core hardware
 
Performance tuning intro
Performance tuning introPerformance tuning intro
Performance tuning intro
 
performancetestinganoverview-110206071921-phpapp02.pdf
performancetestinganoverview-110206071921-phpapp02.pdfperformancetestinganoverview-110206071921-phpapp02.pdf
performancetestinganoverview-110206071921-phpapp02.pdf
 
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
Exploring Oracle Database Performance Tuning Best Practices for DBAs and Deve...
 
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
OOW16 - Getting Optimal Performance from Oracle E-Business Suite [CON6711]
 
Adding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance TestAdding Value in the Cloud with Performance Test
Adding Value in the Cloud with Performance Test
 
Bottlenecks exposed
Bottlenecks exposedBottlenecks exposed
Bottlenecks exposed
 

Mais de Aditya Bhuyan

Weblogic installation
Weblogic installationWeblogic installation
Weblogic installationAditya Bhuyan
 
Weblogic command line
Weblogic command lineWeblogic command line
Weblogic command lineAditya Bhuyan
 
Design patterns through java
Design patterns through javaDesign patterns through java
Design patterns through javaAditya Bhuyan
 
September 2013 Lok Kalyan Setu
September 2013  Lok Kalyan SetuSeptember 2013  Lok Kalyan Setu
September 2013 Lok Kalyan SetuAditya Bhuyan
 
October 2013 Lok Kalyan Setu
October 2013 Lok Kalyan SetuOctober 2013 Lok Kalyan Setu
October 2013 Lok Kalyan SetuAditya Bhuyan
 
November 2013 Lok Kalyan Setu
November 2013 Lok Kalyan SetuNovember 2013 Lok Kalyan Setu
November 2013 Lok Kalyan SetuAditya Bhuyan
 
May 2014 Lok Kalyan Setu
May 2014 Lok Kalyan SetuMay 2014 Lok Kalyan Setu
May 2014 Lok Kalyan SetuAditya Bhuyan
 
March 2014 Lok Kalyan Setu
March 2014 Lok Kalyan SetuMarch 2014 Lok Kalyan Setu
March 2014 Lok Kalyan SetuAditya Bhuyan
 
June 2104 Lok Kalyan Setu
June 2104  Lok Kalyan SetuJune 2104  Lok Kalyan Setu
June 2104 Lok Kalyan SetuAditya Bhuyan
 
July 2014 Lok Kalyan Setu
July 2014 Lok Kalyan SetuJuly 2014 Lok Kalyan Setu
July 2014 Lok Kalyan SetuAditya Bhuyan
 
January 2014 Lok Kalyan Setu
January 2014 Lok Kalyan SetuJanuary 2014 Lok Kalyan Setu
January 2014 Lok Kalyan SetuAditya Bhuyan
 
February 2014 Lok Kalyan Setu
February 2014 Lok Kalyan SetuFebruary 2014 Lok Kalyan Setu
February 2014 Lok Kalyan SetuAditya Bhuyan
 
December 2013 Lok Kalyan Setu
December 2013 Lok Kalyan SetuDecember 2013 Lok Kalyan Setu
December 2013 Lok Kalyan SetuAditya Bhuyan
 
April 2014 Lok Kalyan Setu
April 2014 Lok Kalyan SetuApril 2014 Lok Kalyan Setu
April 2014 Lok Kalyan SetuAditya Bhuyan
 

Mais de Aditya Bhuyan (20)

Weblogic snmp
Weblogic snmpWeblogic snmp
Weblogic snmp
 
Weblogic monitoring
Weblogic monitoringWeblogic monitoring
Weblogic monitoring
 
Weblogic installation
Weblogic installationWeblogic installation
Weblogic installation
 
Weblogic domain
Weblogic domainWeblogic domain
Weblogic domain
 
Weblogic deployment
Weblogic deploymentWeblogic deployment
Weblogic deployment
 
Weblogic console
Weblogic consoleWeblogic console
Weblogic console
 
Weblogic command line
Weblogic command lineWeblogic command line
Weblogic command line
 
Weblogic cluster
Weblogic clusterWeblogic cluster
Weblogic cluster
 
Design patterns through java
Design patterns through javaDesign patterns through java
Design patterns through java
 
September 2013 Lok Kalyan Setu
September 2013  Lok Kalyan SetuSeptember 2013  Lok Kalyan Setu
September 2013 Lok Kalyan Setu
 
October 2013 Lok Kalyan Setu
October 2013 Lok Kalyan SetuOctober 2013 Lok Kalyan Setu
October 2013 Lok Kalyan Setu
 
November 2013 Lok Kalyan Setu
November 2013 Lok Kalyan SetuNovember 2013 Lok Kalyan Setu
November 2013 Lok Kalyan Setu
 
May 2014 Lok Kalyan Setu
May 2014 Lok Kalyan SetuMay 2014 Lok Kalyan Setu
May 2014 Lok Kalyan Setu
 
March 2014 Lok Kalyan Setu
March 2014 Lok Kalyan SetuMarch 2014 Lok Kalyan Setu
March 2014 Lok Kalyan Setu
 
June 2104 Lok Kalyan Setu
June 2104  Lok Kalyan SetuJune 2104  Lok Kalyan Setu
June 2104 Lok Kalyan Setu
 
July 2014 Lok Kalyan Setu
July 2014 Lok Kalyan SetuJuly 2014 Lok Kalyan Setu
July 2014 Lok Kalyan Setu
 
January 2014 Lok Kalyan Setu
January 2014 Lok Kalyan SetuJanuary 2014 Lok Kalyan Setu
January 2014 Lok Kalyan Setu
 
February 2014 Lok Kalyan Setu
February 2014 Lok Kalyan SetuFebruary 2014 Lok Kalyan Setu
February 2014 Lok Kalyan Setu
 
December 2013 Lok Kalyan Setu
December 2013 Lok Kalyan SetuDecember 2013 Lok Kalyan Setu
December 2013 Lok Kalyan Setu
 
April 2014 Lok Kalyan Setu
April 2014 Lok Kalyan SetuApril 2014 Lok Kalyan Setu
April 2014 Lok Kalyan Setu
 

Último

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfmaor17
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 

Último (20)

Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Zer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdfZer0con 2024 final share short version.pdf
Zer0con 2024 final share short version.pdf
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 

Weblogic performance tuning2

  • 1. Performance Tuning in Weblogic Server
  • 2. Performance Tuning Topics ● Tuning EJB ● Tuning JMS ● Tuning Web Application ● Tuning Web Services ● Tuning JDBC ● Tuning Server
  • 3. Understand Your Performance Objectives To determine your performance objectives, you need to understand the application deployed and the environmental constraints placed on the system. Gather information about the levels of activity that components of the application are expected to meet, such as: • The anticipated number of users. • The number and size of requests. • The amount of data and its consistency. • Determining your target CPU utilization. Your target CPU usage should not be 100%, you should determine a target CPU utilization based on your application needs, including CPU cycles for peak usage. If your CPU utilization is optimized at 100% during normal load hours, you have no capacity to handle a peak load. In applications that are latency sensitive and maintaining the ability for a fast response time is important, high CPU usage (approaching 100% utilization) can reduce response times while throughput stays constant or even increases because of work queuing up in the server. For such applications, a 70% - 80% CPU utilization recommended. A good target for non-
  • 4. Understand Performance Objective • The configuration of hardware and software such as CPU type, disk size vs. disk speed, sufficient memory. There is no single formula for determining your hardware requirements. The process of determining what type of hardware and software configuration is required to meet application needs adequately is called capacity planning. Capacity planning requires assessment of your system performance goals and an understanding of your application. Capacity planning for server hardware should focus on maximum performance requirements. • The ability to interoperate between domains, use legacy systems, support legacy data. • Development, implementation, and maintenance costs.
  • 5. Monitor Utilization – Monitor Disk and CPU Utilization Run your application under a high load while monitoring the: • Application server (disk and CPU utilization) • Database server (disk and CPU utilization) The goal is to get to a point where the application server achieves your target CPU utilization. If you find that the application server CPU is under utilized, confirm whether the database is bottle necked. If the database CPU is 100 percent utilized, then check your application SQL calls query plans. For example, are your SQL calls using indexes or doing linear searches? Also, confirm whether there are too many ORDER BY clauses used in your application that are affecting the database CPU. If you discover that the database disk is the bottleneck (for example, if the disk is 100 percent utilized), try moving to faster disks or to a RAID (redundant array of independent disks) configuration, assuming the application is not doing more writes then required.
  • 6. Monitor Utilization – Monitor Disk and CPU Utilization . Once you know the database server is not the bottleneck, determine whether the application server disk is the bottleneck. Some of the disk bottlenecks for application server disks are: • Persistent Store writes • Transaction logging (tlogs) • HTTP logging • Server logging The disk I/O on an application server can be optimized using faster disks or RAID, disabling synchronous JMS writes, using JTA direct writes for tlogs, or increasing the HTTP log buffer.
  • 7. Monitor Data Transfers Across the Network – Locate Bottlenecks in Your System If you determine that neither the network nor the database server is the bottleneck, start looking at your operating system, JVM, and WebLogic Server configurations. Most importantly, is the machine running WebLogic Server able to get your target CPU utilization with a high client load? If the answer is no, then check if there is any locking taking place in the application. You should profile your application using a commercially available tool (for example, JProbe or OptimizeIt) to pinpoint bottlenecks and improve application performance. – Minimize Impact of Bottlenecks In this step, you tune your environment to minimize the impact of bottlenecks on your performance objectives. It is important to realize that in this step you are minimizing the impact of bottlenecks, not eliminating them. Tuning allows you to adjust resources to achieve your performance objectives.
  • 8. EJB Tuning ■Deploymentdescriptorsareschema-based. Descriptorsthatarenew inthisreleaseof WebLogicServer arenotavailableasDTD-baseddescriptors. ■Avoidusingthe RequiresNew transactionparameter. UsingRequiresNew causestheEJB container to startanew transactionafter suspendingany currenttransactions. Thismeansadditional resources, includingaseparatedatabaseconnectionareallocated. ■Uselocal-interfacesor setcall-by-referencetotruetoavoidtheoverheadof serializationwhenoneEJB callsanother or anEJB iscalledby aservlet/JSP inthesame application. Notethefollowing: – Inreleaseprior toWebLogicServer 8.1, call-by-referenceisturnedonby default. For releasesof WebLogicServer 8.1andhigher, call-by-referenceisturnedoff by default. Older applicationsmigratingtoWebLogicServer 8.1andhigher thatdonotexplicitly turnoncall-by-referencemay experienceadropinperformance. – Thisoptimizationdoesnotapply tocallsacrossdifferentapplications.
  • 9. EJB Tuning ■UseStatelesssessionbeansover Stateful sessionbeanswhenever possible. Stateless sessionbeansscalebetter thanstateful sessionbeansbecausethereisnostate informationtobemaintained. ■WebLogicServer providesadditional transactionperformancebenefitsfor EJBsthat resideinaWebLogicServer cluster. WhenasingletransactionusesmultipleEJBs, WebLogicServer attemptstouseEJB instancesfromasingleWebLogicServer instance, rather thanusingEJBsfromdifferentservers. Thisapproachminimizes network trafficfor thetransaction. Insomecases, atransactioncanuseEJBsthatreside onmultipleWebLogicServer instancesinacluster. Thiscanoccur inheterogeneous clusters, whereall EJBshavenotbeendeployedtoall WebLogicServer instances. In thesecases, WebLogicServer usesamultitier connectiontoaccessthedatastore, rather thanmultipledirectconnections. Thisapproachusesfewer resources, andyieldsbetter performancefor thetransaction. However, for bestperformance, thecluster shouldbe homogeneous — all EJBsshouldresideonall availableWebLogicServer instances.
  • 10. Tuning Stateful Session Bean Cache TheEJB Container cachesstateful sessionbeansinmemory uptoacount specifiedby themax-beans-in-cache parameter specifiedin weblogic-ejb-jar.xml. Thisparameter shouldbesetequal tothenumber of concurrentusers. Thisensuresminimumpassivationof stateful sessionbeans todisk andsubsequentactivationfromdisk whichyieldsbetter performance.
  • 11. Tuning Entity Bean Cache Transaction-Level Caching Onceanentity beanhasbeenloadedfromthedatabase, itisalwaysretrievedfromthecache whenever itisrequestedwhenusingthefindByPrimaryKey or invokedfromacached referenceinthattransaction. Gettinganentity beanusinganon-primary key finder always retrievesthepersistentstateof thebeanfromthedatabase. Caching between Transactions Entity beaninstancesarealsocachedbetweentransactions. However, by default, thepersistent stateof theentity beansarenotcachedbetweentransactions. Toenablecachingbetween transactions, setthevalueof thecache-between-transactions parameter totrue. Ready Bean Caching For entity beanswithahighcachemissratio, maintainingready beaninstancescanadversely affectperformance. If youcansetdisable-ready-instances intheentity-cache element of an entity-descriptor, thecontainer doesnotmaintaintheready instancesincache. If the feature is enabled in the deployment descriptor, the cache only keeps the active instances. Once the involved transaction is committed or rolled back, the bean instance is moved from active cache to the pool immediately
  • 12. MDB Pool Tuning Thelifecycleof MDBsisvery similar tostatelesssessionbeans. TheMDB pool hasthesametuningparametersasstatelesssessionbeansandthesamefactors apply whentuningthem. Ingeneral, mostuserswill findthatthedefaultvalues areadequatefor mostapplications.
  • 13. Tuning Stateless Session Bean Pool TheEJB container maintainsapool of statelesssessionbeanstoavoidcreatingand destroyinginstances. Thoughgenerally useful, thispoolingisevenmoreimportantfor performancewhentheejbCreate() andthesetSessionContext() methods areexpensive. Thepool hasalower aswell asanupper bound. Theupper boundisthe moreimportantof thetwo. Theupper boundisspecifiedby themax-beans-in-free-pool parameter. It shouldbesetequal tothenumber of threadsexpectedtoinvoketheEJB concurrently. Usingtoosmall of avalueimpactsconcurrency. Thelower boundisspecifiedby theinitial-beans-in-free-pool parameter. Increasingthevalueof initial-beans-in-free-pool increasesthe timeittakestodeploy theapplicationcontainingtheEJB andcontributestostartuptime for theserver. Theadvantageisthecostof creatingEJB instancesisnotincurredatrun time. Settingthisvaluetoohighwastesmemory.
  • 14. Tuning Entity Bean Pool Theentity beanpool servestwopurposes: A targetobjectsfor invocationof findersviareflection. A pool of beaninstancesthecontainer canrecruitif itcannotfindaninstance for aparticular primary key inthecache. Theentity pool containsanonymousinstances(instancesthatdonothavea primary key). Thesebeansarenotyetactive(meaningejbActivate() has notbeeninvokedonthemyet), thoughtheEJB contexthasbeenset. Entity bean instancesevictedfromtheentity cachearepassivatedandputintothepool. The tunablesaretheinitial-beans-in-free-pool andmax-beans-in- free-pool. UnlikestatelesssessionbeansandMDBs, themax-beans-in- free-pool hasnorelationwiththethreadcount. Youshouldincreasethe valueof max-beans-in-free-pool if theentity beanconstructor or setEnityContext() methodsareexpensive.
  • 15. JMS Tuning ● Alwaysconfigurequotas ● Verify thatdefaultpagingsettingsapply toyour needs. Paginglowersperformance butmay berequiredif JVM memory isinsufficient. ● Avoidlargemessagebacklogs. ● Createandusecustomconnectionfactorieswithall applicationsinsteadof using defaultconnectionfactories, includingwhenusingMDBs. Defaultconnection factoriesarenottunable, whilecustomconnectionfactoriesprovidemany options for performancetuning. ● Writeapplicationssothatthey cacheandre-useJMS clientresources, including JNDI contextsandlookups, andJMS connections, sessions, consumers, or producers. Theseresourcesarerelatively expensivetocreate. For informationon detectingwhencachingisneeded, aswell asonbuilt-inpoolingfeatures ●
  • 16. JMS Tuning ● For asynchronousconsumersandMDBs, tuneMessagesMaximum onthe connectionfactory. IncreasingMessagesMaximum canimproveperformance, decreasingMessagesMaximum toitsminimumvaluecanlower performance, but helpsensurethatmessagesdonotendupwaitingfor aconsumer that'salready processingamessage. ● Avoidsinglethreadedprocessingwhenpossible. Usemultipleconcurrentproducers andconsumersandensurethatenoughthreadsareavailabletoservicethem. ● Tuneserver-sideapplicationssothatthey haveenoughinstances. Consider creating dedicatedthreadpoolsfor theseapplications. ● For client-sideapplicationswithasynchronousconsumers, tuneclient-sidethread pools ● Inparticular, it'snormally bestfor multipleJMS servers, destinations, andother servicestosharethesamestoresothatthestorecanaggregateconcurrentrequests intosinglephysical I/O requests, andtoreducethechancethataJTA transaction spansmorethanonestore. Multiplestoresshouldonly beconsideredonceit'sbeen establishedthattheasinglestoreisnotscalingtohandlethecurrentload.
  • 17. Tuning Web Application Disable Page Checks Youcanimproveperformanceby disablingservletandJDP pagechecks. Seteachof the followingparametersto-1: pageCheckSeconds servlet-reload-check-secs servlet Reload Check Thesearedefaultvaluesfor productionmode. Use Custom JSP Tags OracleprovidesthreespecializedJSP tagsthatyoucanuseinyour JSP pages: cache, repeat, andprocess. Thesetagsarepackagedinataglibrary jar filecalledweblogic- tags.jar. Thisjar filecontainsclassesfor thetagsandataglibrary descriptor (TLD). Tousethesetags, youcopy thisjar filetotheWebapplicationthatcontainsyour JSPs andreferencethetaglibrary inyour JSP
  • 18. Tuning Web Application Precompile JSPs YoucanconfigureWebLogicServer toprecompileyour JSPswhenaWebApplicationisdeployedor re- deployedor whenWebLogicServer startsupby settingtheprecompileparameter totrueinthejsp- descriptor elementof theweblogic.xml deploymentdescriptor. Toavoidrecompilingyour JSPs eachtimetheserver restartsandwhenyoutargetadditional servers, precompilethemusingweblogic.jspc andplacethemintheWEB-INF/classesfolder andarchivethemina.war file. Keepingyour sourcefilesina separatedirectory fromthearchived.war fileeliminatesthepossibility of errorscausedbyaJSP havinga dependency ononeof theclassfiles. Disable Access Logging Settingtheaccess-logging-disabled elementcaneliminateaccessloggingof theunderlying Web application, which can improve server throughput by reducing the loggingoverhead. Seecontainer- descriptor inDevelopingWebApplications, Servlets, and JSPs for Oracle WebLogic Server. Use HTML Template Compression Usingthecompress-html-template elementcompressestheHTML intheJSP template blocks which can improve runtime performance. If the JSP's HTML template block containsthe<pre> HTML tag, donotenablethisfeature. Seejsp-descriptor inDevelopingWebApplications, Servlets, andJSPsfor OracleWebLogic Server.
  • 19. Tuning Web Services DesignWebServiceapplicationsfor course-grainedservicewithmoderate sizepayloads. ■Choosecorrectservice-style& encodingfor your wepserviceapplication. ■Control serializer overheadsandnamespacesdeclarationstoachievebetter performance. ■UseMTOM/XOP or FastInfosettooptimizingtheformatof aSOAP message. ■Carefully designSOAP attachmentsandsecurity implementationsfor minimumperformanceoverheads.
  • 20. Tuning Web Services ■Consider usinganasynchronousmessagingmodel for applicationswith: – Slow andunreliabletransport. – Complex andlong-runningprocess. ■For transactional ServiceOrientedArchitectures(SOA) consider usingtheLastLogging Resourcetransactionoptimization(LLR) toimproveperformance. ■Usereplicationandcachingof dataandschemadefinitionstoimproveperformanceby minimizingnetwork overhead. ■Consider any XML compressiontechniqueonly whenXML compression/decompression overheadsarelessthannetwork overheadsinvolved. ■Applicationsthatareheavy usersof XML functionality (parsers) may encounter performance issuesor runoutof filedescriptors. Thismay occur becauseXML parser instancesare bootstrappedby doingalookupinthejaxp.propertiesfile(JAXP API). Oraclerecommendssetting thepropertiesonthecommandlinetoavoidunnecessary fileoperationsatruntimeandimprove performanceandresourceusage.
  • 21. Tuning Heavily Loaded Systems to Improve Web Service Performance Setting the Buffering Sessions ThereliablemessagingandbufferingfeaturesuseJMS queuesessionstosend messagestothereliability/buffer queues. By default, WebLogicServer allocates 10sessionsfor bufferingwhichenables10clientstoenqueuemessages simultaneously ontothereliability/buffer queue. For asynchronousrequest-response, therequestandresponseportionof the communicationexchangecountseparately, astwoclients. Inthiscase, the defaultpool of sessionscansupportfivesimultaneousasynchronousrequest- responseclients. Toaccommodatethenumber of concurrentclientsyouexpect inyour application, setthefollowingparameter totwicethenumber of expected clientthreads: -Dweblogic.wsee.buffer.QueueSessionPoolSize=size
  • 22. Tuning Heavily Loaded Systems to Improve Web Service Performance Releasing Asynchronous Resources Whenusingtheasynchronousrequest-responsefeature, WebLogicServer persistently storesinformationabouttherequestuntil theasynchronousresponseisreturnedtothe client. Theseresourcesremaininthepersistentstoreuntil they arereleasedby a backgroundthread, calledthestore cleaner. Often, theseresourcescanbereleasedsooner. Executingthestorecleaner more frequently canhelptoreducethesizeof thepersistentstoreandminimizethetime requiredtocleanit. By default, thestorecleaner runsevery twominutes(120000ms). Oraclerecommendsthatyousetthestorecleaner interval tooneminute(60000ms) usingthefollowing Javasystemproperty: -Dweblogic.wsee.StateCleanInterval=60000