SlideShare a Scribd company logo
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

More Related Content

What's hot (19)

PDF
Weblogic introduction
Aditya Bhuyan
 
PDF
Weblogic plug in
Aditya Bhuyan
 
PPT
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
Jeffrey West
 
PPT
Oracle WebLogic Server Basic Concepts
James Bayer
 
PPTX
Weblogic
sudeeporcl
 
PDF
Oracle WorkManager
Giampiero Cerroni
 
PPT
JPA and Coherence with TopLink Grid
James Bayer
 
PDF
Learn Oracle WebLogic Server 12c Administration
Revelation Technologies
 
PPTX
Weblogic application server
Anuj Tomar
 
PDF
Weblogic performance tuning1
Aditya Bhuyan
 
PPT
App Grid Dev With Coherence
James Bayer
 
PPT
WLS
Bebo Yu
 
PDF
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
 
PPTX
Weblogic server cluster
Anandraj Kulkarni
 
PDF
WebLogic 12c & WebLogic Mgmt Pack
DLT Solutions
 
PPT
WebLogic Scripting Tool Overview
James Bayer
 
PDF
Weblogic configuration
Aditya Bhuyan
 
PPT
Weblogic - clustering failover, and load balancing
Vibrant Technologies & Computers
 
PDF
WebLogic JMX for DevOps
Frank Munz
 
Weblogic introduction
Aditya Bhuyan
 
Weblogic plug in
Aditya Bhuyan
 
WebLogic Developer Webcast 5: Troubleshooting and Testing with WebLogic, Soap...
Jeffrey West
 
Oracle WebLogic Server Basic Concepts
James Bayer
 
Weblogic
sudeeporcl
 
Oracle WorkManager
Giampiero Cerroni
 
JPA and Coherence with TopLink Grid
James Bayer
 
Learn Oracle WebLogic Server 12c Administration
Revelation Technologies
 
Weblogic application server
Anuj Tomar
 
Weblogic performance tuning1
Aditya Bhuyan
 
App Grid Dev With Coherence
James Bayer
 
WLS
Bebo Yu
 
Oracle WebLogic Diagnostics & Perfomance tuning
Michel Schildmeijer
 
Weblogic server cluster
Anandraj Kulkarni
 
WebLogic 12c & WebLogic Mgmt Pack
DLT Solutions
 
WebLogic Scripting Tool Overview
James Bayer
 
Weblogic configuration
Aditya Bhuyan
 
Weblogic - clustering failover, and load balancing
Vibrant Technologies & Computers
 
WebLogic JMX for DevOps
Frank Munz
 

Similar to Weblogic Cluster advanced performance tuning (20)

PDF
Weblogic Cluster performance tuning
Aditya Bhuyan
 
PDF
ID114 - Wrestling the Snake: Performance Tuning 101
Wes Morgan
 
PDF
Webcenter application performance tuning guide
Vinay Kumar
 
PDF
Bottlenecks exposed
Vikas Singh
 
PPTX
Jee performance tuning existing applications
Shivnarayan Varma
 
PDF
Introduction to weblogic
Vishal Srivastava
 
PDF
Performance Tuning for Pirates!
John Sterrett
 
DOC
Database performance management
scottaver
 
PPTX
Performance eng prakash.sahu
Dr. Prakash Sahu
 
PPT
T3 Consortium's Performance Center of Excellence
veehikle
 
PPTX
Performance Tuning
Jannet Peetz
 
PDF
Bottlenecks exposed web app db servers
Upender Dravidum
 
DOC
Web sphere application server performance tuning workshop
Rohit Kelapure
 
PDF
Tips and Tricks for SAP Sybase ASE
Don Brizendine
 
PPTX
Tuning Java Servers
Srinath Perera
 
PPT
Hptf 2240 Final
prosullivan
 
PDF
DiscoveredByte - Java Performance Monitoring, Tuning and Optimization - Key P...
DiscoveredByte
 
PPTX
Performance Assurance for Packaged Applications
Alexander Podelko
 
PPT
Collaborate 2011-tuning-ebusiness-416502
kaziul Islam Bulbul
 
PDF
Application Profiling for Memory and Performance
WSO2
 
Weblogic Cluster performance tuning
Aditya Bhuyan
 
ID114 - Wrestling the Snake: Performance Tuning 101
Wes Morgan
 
Webcenter application performance tuning guide
Vinay Kumar
 
Bottlenecks exposed
Vikas Singh
 
Jee performance tuning existing applications
Shivnarayan Varma
 
Introduction to weblogic
Vishal Srivastava
 
Performance Tuning for Pirates!
John Sterrett
 
Database performance management
scottaver
 
Performance eng prakash.sahu
Dr. Prakash Sahu
 
T3 Consortium's Performance Center of Excellence
veehikle
 
Performance Tuning
Jannet Peetz
 
Bottlenecks exposed web app db servers
Upender Dravidum
 
Web sphere application server performance tuning workshop
Rohit Kelapure
 
Tips and Tricks for SAP Sybase ASE
Don Brizendine
 
Tuning Java Servers
Srinath Perera
 
Hptf 2240 Final
prosullivan
 
DiscoveredByte - Java Performance Monitoring, Tuning and Optimization - Key P...
DiscoveredByte
 
Performance Assurance for Packaged Applications
Alexander Podelko
 
Collaborate 2011-tuning-ebusiness-416502
kaziul Islam Bulbul
 
Application Profiling for Memory and Performance
WSO2
 
Ad

More from Aditya Bhuyan (20)

PDF
Weblogic Cluster Security
Aditya Bhuyan
 
PDF
Weblogic Plugin
Aditya Bhuyan
 
PDF
Weblogic Server Plugin
Aditya Bhuyan
 
PDF
Weblogic Cluster Introduction
Aditya Bhuyan
 
PDF
Weblogic Cluster Installation
Aditya Bhuyan
 
PDF
Weblogic Cluster Domain
Aditya Bhuyan
 
PDF
Weblogic Cluster Console
Aditya Bhuyan
 
PDF
Weblogic Cluster monitoring
Aditya Bhuyan
 
PDF
Weblogic Cluster Installation and Upgradation
Aditya Bhuyan
 
PDF
Weblogic cluster console
Aditya Bhuyan
 
PDF
Weblogic Cluster Application deployment
Aditya Bhuyan
 
PDF
Weblogic Cluster command line
Aditya Bhuyan
 
PDF
Weblogic Cluster configuration
Aditya Bhuyan
 
PDF
Weblogic snmp
Aditya Bhuyan
 
PDF
Weblogic cluster
Aditya Bhuyan
 
PDF
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
PDF
September 2013 lok kalyan setu
Aditya Bhuyan
 
PDF
October 2013 lok kalyan setu
Aditya Bhuyan
 
PDF
November 2013 lok kalyan setu
Aditya Bhuyan
 
PDF
May 2014 lok kalyan setu
Aditya Bhuyan
 
Weblogic Cluster Security
Aditya Bhuyan
 
Weblogic Plugin
Aditya Bhuyan
 
Weblogic Server Plugin
Aditya Bhuyan
 
Weblogic Cluster Introduction
Aditya Bhuyan
 
Weblogic Cluster Installation
Aditya Bhuyan
 
Weblogic Cluster Domain
Aditya Bhuyan
 
Weblogic Cluster Console
Aditya Bhuyan
 
Weblogic Cluster monitoring
Aditya Bhuyan
 
Weblogic Cluster Installation and Upgradation
Aditya Bhuyan
 
Weblogic cluster console
Aditya Bhuyan
 
Weblogic Cluster Application deployment
Aditya Bhuyan
 
Weblogic Cluster command line
Aditya Bhuyan
 
Weblogic Cluster configuration
Aditya Bhuyan
 
Weblogic snmp
Aditya Bhuyan
 
Weblogic cluster
Aditya Bhuyan
 
Code-Review-Principles-Process-and-Tools (1)
Aditya Bhuyan
 
September 2013 lok kalyan setu
Aditya Bhuyan
 
October 2013 lok kalyan setu
Aditya Bhuyan
 
November 2013 lok kalyan setu
Aditya Bhuyan
 
May 2014 lok kalyan setu
Aditya Bhuyan
 
Ad

Recently uploaded (20)

PDF
Advancing WebDriver BiDi support in WebKit
Igalia
 
PDF
July Patch Tuesday
Ivanti
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Biography of Daniel Podor.pdf
Daniel Podor
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Designing Production-Ready AI Agents
Kunal Rai
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
PDF
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PPTX
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
Advancing WebDriver BiDi support in WebKit
Igalia
 
July Patch Tuesday
Ivanti
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Biography of Daniel Podor.pdf
Daniel Podor
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Designing Production-Ready AI Agents
Kunal Rai
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
"AI Transformation: Directions and Challenges", Pavlo Shaternik
Fwdays
 
LOOPS in C Programming Language - Technology
RishabhDwivedi43
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Future Tech Innovations 2025 – A TechLists Insight
TechLists
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 

Weblogic Cluster advanced performance tuning

  • 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