Streszczenie treści zawartej na stronie nr. 1
SunGlassFishEnterpriseServer
2.1PerformanceTuningGuide
SunMicrosystems,Inc.
4150NetworkCircle
SantaClara,CA95054
U.S.A.
PartNo:820–4343–10
January2009
Streszczenie treści zawartej na stronie nr. 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
Streszczenie treści zawartej na stronie nr. 3
Contents Preface...................................................................................................................................................13 1 OverviewofEnterpriseServerPerformanceTuning.....................................................................17 ProcessOverview ................................................................................................................................17 ▼PerformanceTuningSequence ...........................................
Streszczenie treści zawartej na stronie nr. 4
Contents TuningTipsforSpecificTypesofEJBComponents ...............................................................42 JDBCandDatabaseAccess .........................................................................................................46 TuningMessage-DrivenBeans ..................................................................................................47 3 TuningtheEnterpriseServer...................................................................................................
Streszczenie treści zawartej na stronie nr. 5
Contents ImprovingORBPerformancewithJavaSerialization .............................................................75 ThreadPoolSettings ...........................................................................................................................76 TuningThreadPools(Unix/Linuxonly) .................................................................................76 Resources..............................................................................................................
Streszczenie treści zawartej na stronie nr. 6
Contents DiskI/OSettings ........................................................................................................................102 TCP/IPSettings ..........................................................................................................................102 TuningUltraSPARCT1–BasedSystems ........................................................................................103 TuningOperatingSystemandTCPSettings ..................................................
Streszczenie treści zawartej na stronie nr. 7
Figures FIGURE1–1 JavaEEApplicationModel.......................................................................................20 7
Streszczenie treści zawartej na stronie nr. 8
8
Streszczenie treści zawartej na stronie nr. 9
Tables TABLE1–1 PerformanceTuningRoadmap ...............................................................................17 TABLE1–2 FactorsThatAffectPerformance.............................................................................24 TABLE3–1 BeanTypePoolingorCaching ................................................................................53 TABLE3–2 EJBCacheandPoolSettings ....................................................................................56 TABLE3–3 TunableORBSett
Streszczenie treści zawartej na stronie nr. 10
10
Streszczenie treści zawartej na stronie nr. 11
Examples EXAMPLE4–1 HeapConfigurationonSolaris ................................................................................89 EXAMPLE4–2 HeapConfigurationonWindows ...........................................................................90 11
Streszczenie treści zawartej na stronie nr. 12
12
Streszczenie treści zawartej na stronie nr. 13
Preface ThePerformanceTuningGuidedescribeshowtogetthebestperformancewithEnterprise Server. TM ThisprefacecontainsinformationaboutandconventionsfortheentireSunGlassFish EnterpriseServerdocumentationset. SunGlassFishEnterpriseServerDocumentationSet TABLEP–1 BooksintheEnterpriseServerDocumentationSet BookTitle Description DocumentationCenter EnterpriseServerdocumentationtopicsorganizedbytaskandsubject. ReleaseNotes Late-breakinginformationaboutthesoftwareandthedocumentation.Includesa TM comprehensi
Streszczenie treści zawartej na stronie nr. 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
Streszczenie treści zawartej na stronie nr. 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
Streszczenie treści zawartej na stronie nr. 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
Streszczenie treści zawartej na stronie nr. 17
CHAPTER 1 1 OverviewofEnterpriseServerPerformance Tuning YoucansignificantlyimproveperformanceoftheSunGlassFishEnterpriseServerandof applicationsdeployedtoitbyadjustingafewdeploymentandserverconfigurationsettings. However,itisimportanttounderstandtheenvironmentandperformancegoals.Anoptimal configurationforaproductionenvironmentmightnotbeoptimalforadevelopment environment. Thischapterdiscussesthefollowingtopics: ■ “ProcessOverview”onpage17 ■ “UnderstandingOperationalRequirements”onpage19 ■ “Gener
Streszczenie treści zawartej na stronie nr. 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
Streszczenie treści zawartej na stronie nr. 19
UnderstandingOperationalRequirements UnderstandingOperationalRequirements BeforeyoubegintodeployandtuneyourapplicationontheApplicationServer,itisimportant toclearlydefinetheoperationalenvironment.Theoperationalenvironmentisdeterminedby high-levelconstraintsandrequirementssuchas: ■ “ApplicationArchitecture”onpage19 ■ “SecurityRequirements”onpage21 ■ “HardwareResources”onpage22 ApplicationArchitecture TheJavaEEApplicationmodel,asshowninthefollowingfigure,isveryflexible;allowingthe applicationarchi
Streszczenie treści zawartej na stronie nr. 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