ページ1に含まれる内容の要旨
SunGlassFishEnterpriseServer
2.1PerformanceTuningGuide
SunMicrosystems,Inc.
4150NetworkCircle
SantaClara,CA95054
U.S.A.
PartNo:820–4343–10
January2009
ページ2に含まれる内容の要旨
Copyright2009SunMicrosystems,Inc. 4150NetworkCircle,SantaClara,CA95054U.S.A. Allrightsreserved. SunMicrosystems,Inc.hasintellectualpropertyrightsrelatingtotechnologyembodiedintheproductthatisdescribedinthisdocument.Inparticular,andwithout limitation,theseintellectualpropertyrightsmayincludeoneormoreU.S.patentsorpendingpatentapplicationsintheU.S.andinothercountries. U.S.GovernmentRights–Commercialsoftware.GovernmentusersaresubjecttotheSunMicrosystems,Inc.standardlicenseagreementandapplicableprovi
ページ3に含まれる内容の要旨
Contents Preface...................................................................................................................................................13 1 OverviewofEnterpriseServerPerformanceTuning.....................................................................17 ProcessOverview ................................................................................................................................17 ▼PerformanceTuningSequence ...........................................
ページ4に含まれる内容の要旨
Contents TuningTipsforSpecificTypesofEJBComponents ...............................................................42 JDBCandDatabaseAccess .........................................................................................................46 TuningMessage-DrivenBeans ..................................................................................................47 3 TuningtheEnterpriseServer...................................................................................................
ページ5に含まれる内容の要旨
Contents ImprovingORBPerformancewithJavaSerialization .............................................................75 ThreadPoolSettings ...........................................................................................................................76 TuningThreadPools(Unix/Linuxonly) .................................................................................76 Resources..............................................................................................................
ページ6に含まれる内容の要旨
Contents DiskI/OSettings ........................................................................................................................102 TCP/IPSettings ..........................................................................................................................102 TuningUltraSPARCT1–BasedSystems ........................................................................................103 TuningOperatingSystemandTCPSettings ..................................................
ページ7に含まれる内容の要旨
Figures FIGURE1–1 JavaEEApplicationModel.......................................................................................20 7
ページ8に含まれる内容の要旨
8
ページ9に含まれる内容の要旨
Tables TABLE1–1 PerformanceTuningRoadmap ...............................................................................17 TABLE1–2 FactorsThatAffectPerformance.............................................................................24 TABLE3–1 BeanTypePoolingorCaching ................................................................................53 TABLE3–2 EJBCacheandPoolSettings ....................................................................................56 TABLE3–3 TunableORBSett
ページ10に含まれる内容の要旨
10
ページ11に含まれる内容の要旨
Examples EXAMPLE4–1 HeapConfigurationonSolaris ................................................................................89 EXAMPLE4–2 HeapConfigurationonWindows ...........................................................................90 11
ページ12に含まれる内容の要旨
12
ページ13に含まれる内容の要旨
Preface ThePerformanceTuningGuidedescribeshowtogetthebestperformancewithEnterprise Server. TM ThisprefacecontainsinformationaboutandconventionsfortheentireSunGlassFish EnterpriseServerdocumentationset. SunGlassFishEnterpriseServerDocumentationSet TABLEP–1 BooksintheEnterpriseServerDocumentationSet BookTitle Description DocumentationCenter EnterpriseServerdocumentationtopicsorganizedbytaskandsubject. ReleaseNotes Late-breakinginformationaboutthesoftwareandthedocumentation.Includesa TM comprehensi
ページ14に含まれる内容の要旨
Preface TABLEP–1 BooksintheEnterpriseServerDocumentationSet (Continued) BookTitle Description HighAvailabilityAdministration Settingupclusters,workingwithnodeagents,andusingloadbalancers. Guide AdministrationReference EditingtheEnterpriseServerconfigurationfile,domain.xml. PerformanceTuningGuide TuningtheEnterpriseServertoimproveperformance. ReferenceManual UtilitycommandsavailablewiththeEnterpriseServer;writteninmanpagestyle.Includes theasadmincommandlineinterface. DefaultPathsandFileNames Thef
ページ15に含まれる内容の要旨
Preface TypographicConventions Thefollowingtabledescribesthetypographicchangesthatareusedinthisbook. TABLEP–3 TypographicConventions Typeface Meaning Example AaBbCc123 Thenamesofcommands,files,and Edityour.loginfile. directories,andonscreencomputer Usels-atolistallfiles. output machine_name% you have mail. AaBbCc123 Whatyoutype,contrastedwithonscreen machine_name%su computeroutput Password: AaBbCc123 Aplaceholdertobereplacedwithareal Thecommandtoremoveafileisrmfilename. nameorvalue AaBbCc123 Boo
ページ16に含まれる内容の要旨
Preface TABLEP–4 SymbolConventions (Continued) Symbol Description Example Meaning → Indicatesmenuitem File→New→Templates FromtheFilemenu,chooseNew. selectioninagraphicaluser FromtheNewsubmenu,choose interface. Templates. Documentation,Support,andTraining TheSunwebsiteprovidesinformationaboutthefollowingadditionalresources: ■ Documentation(http://www.sun.com/documentation/) ■ Support(http://www.sun.com/support/) ■ Training(http://www.sun.com/training/) Third-PartyWebSiteReferences Third-partyURLs
ページ17に含まれる内容の要旨
CHAPTER 1 1 OverviewofEnterpriseServerPerformance Tuning YoucansignificantlyimproveperformanceoftheSunGlassFishEnterpriseServerandof applicationsdeployedtoitbyadjustingafewdeploymentandserverconfigurationsettings. However,itisimportanttounderstandtheenvironmentandperformancegoals.Anoptimal configurationforaproductionenvironmentmightnotbeoptimalforadevelopment environment. Thischapterdiscussesthefollowingtopics: ■ “ProcessOverview”onpage17 ■ “UnderstandingOperationalRequirements”onpage19 ■ “Gener
ページ18に含まれる内容の要旨
ProcessOverview TABLE1–1 PerformanceTuningRoadmap (Continued) Step DescriptionofTask LocationofInstructions 3 Installation:IfyouareusingHADBforsession InstallationGuide persistence,ensurethattheHADBsoftwareis installed. 4 Deployment:Installandrunyourapplications. ApplicationDeploymentGuide Familiarizeyourselfwithhowtoconfigureand AdministrationGuide administertheEnterpriseServer. 5 Tuning:Tunethefollowingitems: Thefollowingchapters: ■ ■ Applications Chapter2,“TuningYourApplication” ■ ■ Enterpris
ページ19に含まれる内容の要旨
UnderstandingOperationalRequirements UnderstandingOperationalRequirements BeforeyoubegintodeployandtuneyourapplicationontheApplicationServer,itisimportant toclearlydefinetheoperationalenvironment.Theoperationalenvironmentisdeterminedby high-levelconstraintsandrequirementssuchas: ■ “ApplicationArchitecture”onpage19 ■ “SecurityRequirements”onpage21 ■ “HardwareResources”onpage22 ApplicationArchitecture TheJavaEEApplicationmodel,asshowninthefollowingfigure,isveryflexible;allowingthe applicationarchi
ページ20に含まれる内容の要旨
UnderstandingOperationalRequirements Client-Side Server-Side Server-Side Enterprise Presentation Presentation Business Logic Information System Web EJB Browser Server Container Pure JSP EJB HTML Java JSP EJB Applet Desktop Java Java EJB Application Servlet Other Device J2EE J2EE J2EE Client Platform Platform FIGURE1–1 JavaEEApplicationModel ModeratelycomplexenterpriseapplicationscanbedevelopedentirelyusingservletsandJSP technology.MorecomplexbusinessapplicationsoftenuseEnterpriseJavaBeans(EJB) c