WebLogic Server 性能监控与调优_第1页
WebLogic Server 性能监控与调优_第2页
WebLogic Server 性能监控与调优_第3页
WebLogic Server 性能监控与调优_第4页
WebLogic Server 性能监控与调优_第5页
已阅读5页,还剩23页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1

WebLogicServer性能监控与调优

Overview-1WebLogic的版本WebLogicServer8.1(Java1.4、J2EE1.3)WebLogicServer9.x(Java5、J2EE1.4)WebLogicServer10.0(Java5、JavaEE5)WebLogicServer10.3(Java6、JavaEE5)WebLogicServer11gR1(10.3.x)(Java6、JavaEE5)软件授权:自从oracle收购了bea之后,WebLogic的序列号全都开放了,没有必要再去进行破解了。2

WebLogic主要使用

的JVMSUNHotSpotJVMBEAJRockitJVM不同的JVM,其可设置的参数和监控的工具将是不同,后面将分别介绍这两种JVM的设置。在Intel架构和windows平台上,建议使用JRockitJVM,这样可以带来更优的性能。3

WebLogic实例主要设置内容启动参数设置主要是设置GC参数线程设置主要是设置线程的数量数据库连接池的设置主要是设置连接池的初始容量和最大容量4

WebLogic8.1启动文件%DOMAIN_HOME%/startWebLogic.cmd设置实例的运行模式:开发模式/生产模式设置JAVA_HOME设置JAVA_VM:client/server/jrockit设置MEM_ARGS%WL_HOME%\common\bin\commEnv.cmd设置所有实例都统一使用的参数5

WebLogic9.2启动文件%WL_HOME%\common\bin\commEnv.cmd设置所有实例统一的运行参数%DOMAIN_HOME%\bin\setDomainEnv.cmd设置本实例的运行参数%DOMAIN_HOME%\bin\startWebLogic.cmd运行启动脚本6

7

SunHotSpotHeap分布Heapisdividedbroadlyintothreeareas:Young(New)generationTenured(Old)generationPermanent(Perm)generationYounggenerationisfurtherdividedinto:EdenSurvivorspaces(2)Xmx8

TuningGCManually…Newself-tuningfeatureisnotavailablewhiletuningJVMspriortoversion1.5andmanualtuningisrequired.Thefollowingarethecommontuningparametersavailablewhiletuningthegarbagecollectionmanually:Sizeofthetheoverallheap-Xms[n]-Xmx[n]Sizeofthegenerationsintheheap-XX:NewSize=n-XX:MaxNewSize=n-XX:NewRatio=n9

…TuningGCManuallyCommontuningparameters(continued)Thesizeofthesurvivorspacesintheyounggeneration-XX:SurvivorRatio=nThesizeofthepermanentgeneration-XX:PermSize=n-XX:MaxPermSize=nThethresholdforpromotionfromtheyounggenerationtotheoldgeneration-XX:MaxTenuringThreshold=nTuninginvolveseitheraseriesofexperimentswithaspecializedtool(or)goodjudgmenttodecidethatGCwasperformingwell.TuningSunHotSpotJVM-3810

JRockitBenefitsWeblogicJRockitJVMisdesignedforserver-sideapplications.Itemploysadaptiveoptimizationtosignificantlyimproveruntimeperformance.Ithasadaptivegarbagecollectionandheapmanagement.Itoffersfullsupportfor32and64bitJRockitonIntelEM64T/AMD64andcompatibles.JRockitalsosupportsSolaris/Sparcarchitecture.Itofferssupportforverylargeheapson64bitplatforms.JRockitMissionControltoolssuiteoffersbettermanagement,tuningandtroubleshooting.11

GenerationalHeap-JRockitInthetwo-generationalmodel,heapisdividedintotwogenerationsYounggeneration(Nursery)OldgenerationInasingle-spacedmodel,alltheobjectsareallocatedinasinglespaceontheheap.NurseryOldSpaceXnsXmxXmxWebLogic8.1实例的线程设置...线程的设置主要是在weblogic控制台中完成12

.WebLogic8.1实例的线程设置..13

..WebLogic

8.1实例的线程设置.14

…WebLogic

8.1实例的线程设置15

WebLogic9.2实例的线程设置.线程管理与WebLogic8.1存在很大的不同,由WebLogic自动去管理。默认情况下,WebLogic提供的线程数量较小,并且在管理控制台上没有修改线程数量的链接。16

.WebLogic9.2实例的线程设置可以通过手动修改config.xml文件,使用与weblogic8.1相同的线程设置风格。主要是在<server>中添加以下代码:17

数据连接池、数据源的主要配置连接池的初始容量、最大容量、增长容量。是否启用连接泄露配置。是否测试数据库连接。数据库连接的时间设置。18

OracleRAC集群OracleRAC(OracleRealApplicationCluster),Oracle数据库的集群。基于共享存储的数据库,具有多个数据库运行实例。tnsnames.ora形式与常规模式不同。19

OracleRAC的数据源配置url采用oracletnsname配置的方式:配置WebLogic多池数据源方式:Multipool(WebLogic8.1)多数据源(WebLogic9.2)20

SunHotSpot-JConsole21

JConsoleisaJMX-compliantGUItoolthatconnectstoarunningJVM,whichisstartedwiththemanagementagent.JDK5.0includesthemonitoringandmanagementtool,JConsole.JConsoleallowsyoutoseeinsidetheJVMandtheapplicationwhileit'srunning.JConsoleprovidesrealtimeviewingoftheperformanceofapplicationsandshowstheirresourceconsumption.22

…JConsole…ThemanagementagentintheJVMshouldbestartedformonitoring.ItcanonlyconnecttooneJVMatanytime.TouseJConsoleforconnectingtoaJVMlocally,WebLogicServershouldbestartedwiththeoptiontoenablethemanagementagent.-Dcom.sun.management.jmxremote23

JconsoleRemoteMonitoringToenabletheJMXagent(JConsole)forremoteaccess,setthissystempropertywhenyoustartWebLogicServerorJVM:Dcom.sun.management.jmxremote.port=portNoConnectingremotelythroughJConsoleistherecommendedwaywhenmonitoringormanagingproductionenvironments.TuningSunHotSpotJVM-12SUNHotSpot-jvisualvmJava6里自带的一个监控jvm运行状况的工具。%JAVA_HOME%/bin/jvisualvm.exe24

OracleJRockitMissionControlWindows平台下,性能较优的JVM。提供的很好的监控工具,用于监控WebLogic的运行状况。针对不同的JDK版本,都有对应的安装程序。可以从Oracle网站免费下载/technetwork/middleware/jrockit/overview/index.html25

26

BEAJRockitMissionControlBEAJRockitshipswithBEAJRockitMissionControl.Theseareagroupofindependentmanagementandmonitoringtools.BEAJRockitManagementConsoleJMXComplaintmonitoringtoolBEAJRockitRuntimeAnalyzerRecordsandhelpsyouanalyzeJVMandrunningapplicationBEAJRockitMemoryLeakDetectorDetectsandfindsthecauseformemoryleaksThemainfocusofJRockitMissionControlistodothenecessaryinstrumentationwiththelowestpossibleimpactonthesystem.27

ManagementServerThemanagementserverintheJRockitVMisdisabledbydefault.Toenablethemanagementserver,addthefollowingcommand-lineargumenttotheJVMstartscript:java-Xmanagement…weblogic.ServerThedefaultportthatthemanagementserverus

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论