Ir para a página of
Manuais similares
-
Server
Sun Microsystems X2100
78 páginas 2.01 mb -
Server
Sun Microsystems X4140
80 páginas 1.23 mb -
Server
Sun Microsystems Netra T1 AC200
8 páginas 0.13 mb -
Server
Sun Microsystems CP3250
134 páginas 5.83 mb -
Server
Sun Microsystems X4600 M2
63 páginas 4.64 mb -
Server
Sun Microsystems 5
283 páginas 5.65 mb -
Server
Sun Microsystems XVR-100
52 páginas 0.93 mb -
Server
Sun Microsystems 8190994
148 páginas 1.63 mb
Bom manual de uso
As regras impõem ao revendedor a obrigação de fornecer ao comprador o manual com o produto Sun Microsystems 820434310. A falta de manual ou informações incorretas fornecidas ao consumidor são a base de uma queixa por não conformidade do produto com o contrato. De acordo com a lei, pode anexar o manual em uma outra forma de que em papel, o que é frequentemente utilizado, anexando uma forma gráfica ou manual electrónicoSun Microsystems 820434310 vídeos instrutivos para os usuários. A condição é uma forma legível e compreensível.
O que é a instrução?
A palavra vem do latim "Instructio" ou instruir. Portanto, no manual Sun Microsystems 820434310 você pode encontrar uma descrição das fases do processo. O objetivo do manual é instruir, facilitar o arranque, a utilização do equipamento ou a execução de determinadas tarefas. O manual é uma coleção de informações sobre o objeto / serviço, um guia.
Infelizmente, pequenos usuários tomam o tempo para ler o manual Sun Microsystems 820434310, e um bom manual não só permite conhecer uma série de funcionalidades adicionais do dispositivo, mas evita a formação da maioria das falhas.
Então, o que deve conter o manual perfeito?
Primeiro, o manual Sun Microsystems 820434310 deve conte:
- dados técnicos do dispositivo Sun Microsystems 820434310
- nome do fabricante e ano de fabricação do dispositivo Sun Microsystems 820434310
- instruções de utilização, regulação e manutenção do dispositivo Sun Microsystems 820434310
- sinais de segurança e certificados que comprovam a conformidade com as normas pertinentes
Por que você não ler manuais?
Normalmente, isso é devido à falta de tempo e à certeza quanto à funcionalidade específica do dispositivo adquirido. Infelizmente, a mesma ligação e o arranque Sun Microsystems 820434310 não são suficientes. O manual contém uma série de orientações sobre funcionalidades específicas, a segurança, os métodos de manutenção (mesmo sobre produtos que devem ser usados), possíveis defeitos Sun Microsystems 820434310 e formas de resolver problemas comuns durante o uso. No final, no manual podemos encontrar as coordenadas do serviço Sun Microsystems na ausência da eficácia das soluções propostas. Atualmente, muito apreciados são manuais na forma de animações interessantes e vídeos de instrução que de uma forma melhor do que o o folheto falam ao usuário. Este tipo de manual é a chance que o usuário percorrer todo o vídeo instrutivo, sem ignorar especificações e descrições técnicas complicadas Sun Microsystems 820434310, como para a versão papel.
Por que ler manuais?
Primeiro de tudo, contem a resposta sobre a construção, as possibilidades do dispositivo Sun Microsystems 820434310, uso dos acessórios individuais e uma gama de informações para desfrutar plenamente todos os recursos e facilidades.
Após a compra bem sucedida de um equipamento / dispositivo, é bom ter um momento para se familiarizar com cada parte do manual Sun Microsystems 820434310. Atualmente, são cuidadosamente preparados e traduzidos para sejam não só compreensíveis para os usuários, mas para cumprir a sua função básica de informação
Índice do manual
-
Página 1
Sun GlassF ish Enterprise Ser v er 2.1 P er f ormance T uning Guide Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part N o: 820–4343–10 January 2009[...]
-
Página 2
Copyright 2009 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. All rights reserved. Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. I n particular, and without limitation, these intellectual property rights may include one or more U.S[...]
-
Página 3
Cont ents Preface ...................................................................................................................................................13 1 Overview of Enterprise Ser v er Performance T uning ..................................................................... 17 Process Overview ......................................[...]
-
Página 4
Tuning Tips for Specic Types of EJB Components ............................................................... 42 JDBC and Database Access ......................................................................................................... 46 Tuning M essage-Driven Beans ......................................................................[...]
-
Página 5
Improving ORB P erformance with J ava Serialization ............................................................. 75 Thread P ool Settings ........................................................................................................................... 76 Tuning Thread P ools (Unix /L inux only) ...........................................[...]
-
Página 6
Disk I/O Settings ................................................................................................................ ........ 102 TCP/IP Settings .......................................................................................................................... 102 Tuning UltraSP ARC T1–B ased Systems ........................[...]
-
Página 7
F igures FIGURE 1–1 J ava EE A pplication Model ....................................................................................... 20 7[...]
-
Página 8
8[...]
-
Página 9
T ables T ABLE 1–1 P erformance Tuning Roadmap ............................................................................... 17 T ABLE 1–2 Factors That Aect P erformance ............................................................................. 24 T ABLE 3–1 B ean Type P ooling or Caching ..............................................[...]
-
Página 10
10[...]
-
Página 11
Examples EXAMPLE 4–1 Heap Conguration on Solaris ................................................................................ 89 EXAMPLE 4–2 Heap Conguration on Windows ........................................................................... 90 11[...]
-
Página 12
12[...]
-
Página 13
P refac e The P erformance Tuning Guide describes how to get the best performance with Enterprise Server. This preface contains information about and conventions for the entire Sun GlassFish TM Enterprise Server documentation set. Sun GlassFish Ent erprise S erver Documentation Set T ABLE P–1 Books in the Enterprise Server Documentation Set Book [...]
-
Página 14
T ABLE P–1 Books in the Enterprise Server D ocumentation Set (Continued) Book Title Description H igh A vailability Administration Guide Setting up clusters, working with node agents, and using load balancers. A dministration Reference Editing the Enterprise Server conguration le, domain.xml . Performance Tuning G uide Tuning the Enterprise[...]
-
Página 15
T ypogr aphic Con ventions The following table describes the typographic changes that are used in this book. T ABLE P–3 Typographic Conventions T ypeface Meaning Example AaBbCc123 The names of commands, les, and directories, and onscreen computer output Edit your .login le. Use ls -a to list all les. machine_name% you have mail. AaBbCc12[...]
-
Página 16
T ABLE P–4 Symbol Conventions (Continued) Symbol Description Example Meaning → Indicates menu item selection in a graphical user interface. File → New → Templates From the File menu, choose N ew. From the N ew submenu, choose Templates. Documentation, Support, and T r aining The Sun web site provides information about the following addition[...]
-
Página 17
O v er view of Enterprise Ser ver P er formanc e T uning You can signicantly improve performance of the Sun GlassFish Enterprise Server and of applications deployed to it by adjusting a few deployment and server conguration settings. However, it is important to understand the environment and performance goals. An optimal conguration for a [...]
-
Página 18
T ABLE 1–1 Performance Tuning Roadmap (Continued) Step Description of T ask Location of Instructions 3 Installation: I f you are using H ADB for session persistence, ensure that the H ADB software is installed. I nstallation Guide 4 Deployment: Install and run your applications. Familiarize yourself with how to congure and administer the Enter[...]
-
Página 19
Understanding Opera tional Requirements Before you begin to deploy and tune your application on the Application Server, it is important to clearly dene the operational environment. The operational environment is determined by high-level constraints and requirements such as: ■ “A pplication Architecture” on page 19 ■ “Security Requireme[...]
-
Página 20
M oderately complex enterprise applications can be developed entirely using servlets and JSP technology. M ore complex business applications often use Enterprise JavaBeans (EJB) components. The A pplication Server integrates the web and EJB containers in a single process. Local access to EJB components from servlets is very ecient. However, some[...]
-
Página 21
Security Requirements M ost business applications require security. This section discusses security considerations and decisions. User A uthentication and Authoriza tion A pplication users must be authenticated. The A pplication Server provides three dierent choices for user authentication: le-based, LD AP , and Solaris. The default le bas[...]
-
Página 22
■ What is the nature of the applications with respect to security? Do they encrypt all or only a part of the application inputs and output? What percentage of the information needs to be securely transmitted? ■ Are the applications going to be deployed on an application server that is directly connected to the Internet? Will a web server exist [...]
-
Página 23
Administr ation A single A pplication Server installation on a server can encompass multiple instances. A group of one or more instances that are administered by a single A dministration Server is called a domain . Grouping server instances into domains permits dierent people to independently administer the groups. You can use a single-instance [...]
-
Página 24
T ABLE 1–2 Factors That Aect P erformance Concept In practice Measurement Value sourc es User Load Concurrent sessions at peak load Transactions P er Minute (TPM) Web Interactions P er Second (WIPS) (Max. number of concurrent users) * (expected response time) / (time between clicks) Example: (100 user s*2s e c )/1 0s e c=2 0 A pplication Scala[...]
-
Página 25
▼ T o Determine Capacity Determine performance on a single CPU. First determine the largest load that a single processor can sustain. You can obtain this gure by measuring the performance of the application on a single-processor machine. Either leverage the performance numbers of an existing application with similar processing characteristics [...]
-
Página 26
fraction of them are logged in and performing business transactions. A common mistake during capacity planning is to use the total size of customer population as the basis and not the average and peak numbers for concurrent users. The number of concurrent users also may exhibit patterns over time. ■ What is the average and peak amount of data tra[...]
-
Página 27
T uning Y our Application This chapter provides information on tuning applications for maximum performance. A complete guide to writing high performance J ava and J ava EE applications is beyond the scope of this document. This chapter discusses the following topics: ■ “J ava Programming Guidelines” on page 27 ■ “J ava Server Page and Ser[...]
-
Página 28
String str = " testing " ; str = str + " abc " ; The compiler translates this code as: String str = " testing " ; StringBuffer tmp = new StringBuffer(str); tmp.append( " abc " ); str = tmp.toString(); Therefore, copying is inherently expensive and overusing it can reduce performance signicantly. Assign nul[...]
-
Página 29
Declare Method Arguments nal Declare method arguments final if they are not modied in the method. In general, declare all variables final if they are not modied after being initialized or set to some value. Synchr onize Only When Necessary Do not synchronize code blocks or methods unless synchronization is required. Keep synchronized block[...]
-
Página 30
Suggested C oding Practices This section provides some tips on coding practices that improve servlet and JSP application performance. General Guidelines Follow these general guidelines to increase performance of the presentation tier: ■ Minimize J ava synchronization in servlets. ■ Don’ t use the single thread model for servlets. ■ Use the [...]
-
Página 31
Congur ation and Deployment Tips Follow these conguration tips to improve performance. These tips are intended for production environments, not development environments. ■ To improve class loading time, avoid having excessive directories in the server CLASSPATH . Put application-related classes into J AR les. ■ HTTP response times are [...]
-
Página 32
E JB Per f ormance T uning The Enterprise Server’ s high-performance EJB container has numerous parameters that aect performance. Individual EJB components also have parameters that aect performance. The value of individual EJB component’ s parameter overrides the value of the same parameter for the EJB container. The default values are d[...]
-
Página 33
asadmin get --user admin --host e4800-241-a --port 4848 -m specjcmp.application.SPECjAppServer.ejb-module. supplier_jar.stateful-session-bean.BuyerSes.bean-cache.* The following is a sample of the monitoring output: resize-quantity = -1 cache-misses = 0 idle-timeout-in-seconds = 0 num-passivations = 0 cache-hits = 59 num-passivation-errors = 0 tota[...]
-
Página 34
collection is happening too frequently, and the pool size is growing, but the cache hit rate is small, then the pool-idle-timeout-in-seconds can be reduced to destroy the instances. Note – Specifying a max-pool-size of zero (0) means that the pool is unbounded. The pooled beans remain in memory unless they are removed by specifying a small interv[...]
-
Página 35
To nd the possible objects (applications, modules, beans, and methods) and object attributes that can be monitored, use the A dmin Console. For more information, see Chapter 18, “M onitoring Components and Services, ” in Sun GlassFish Enterprise Server 2.1 A dministration Guide . Alternatively, use the asadmin list command. For more informat[...]
-
Página 36
■ Cache EJB resources : Use setSessionContext() or ejbCreate() to cache bean resources. This is again an example of using bean lifecycle methods to perform application actions only once where possible. Remember to release acquired resources in the ejbRemove() method. Use the Appropria te Stubs The stub classes needed by EJB applications are gener[...]
-
Página 37
Pref er Local Inter faces An EJB component can have remote and local interfaces. Clients not located in the same application server instance as the bean (remote clients) use the remote interface to access the bean. Calls to the remote interface require marshalling arguments, transportation of the marshalled data over the network, un-marshaling the [...]
-
Página 38
semantics. See “Value A dded Features” in Sun GlassF ish Enterprise Server 2.1 Developer’ s Guide for more details about the pass-by-reference ag. To specify that an EJB component will use pass by reference semantics, use the following tag in the sun-ejb-jar.xml deployment descriptor: <pass-by-reference>true</pass-by-reference>[...]
-
Página 39
source are going to be involved in a transaction. If a database participates in some distributed transactions, but mostly in local or single database transactions, it is advisable to register two separate JDBC resources and use the appropriate resource in the application. Congur e JDBC Resources as One-Phase Commit Resources To improve performan[...]
-
Página 40
Use version consistency to improve performance while protecting the integrity of data in the database. Since the application server can use multiple copies of an EJB component simultaneously, an EJB component’ s state can potentially become corrupted through simultaneous access. The standard way of preventing corruption is to lock the database ro[...]
-
Página 41
... </cmp-field-mapping> <consistency> <check-version-of-accessed-instances> <column-name>OrderTable.VC_VERSION_NUMBER</column-name> </check-version-of-accessed-instances> </consistency> </entity-mapping> In addition, you must establish a trigger on the database to automatically update the version col[...]
-
Página 42
For example, enable threadpools named priority-1 and priority-2 to the <orb> element as follows: <orb max-connections= " 1024 " message-fragment-size= " 1024 " use-thread-pool-ids= " thread-pool-1,priority-1,priority-2 " > Include the threadpool ID in the use-thread-pool-id element of the EJB component’ s[...]
-
Página 43
to the steady load of users), beans would be frequently passivated and activated, causing a negative impact on the response times, due to CPU intensive serialization and deserialization as well as disk I/O . Another important variable for tuning is cache-idle-timeout-in-seconds where at periodic intervals of cache-idle-timeout-in-seconds , all the [...]
-
Página 44
■ Database rows represented by the bean do not change. ■ The application can tolerate using out-of-date values for the bean. For example, an application might use a read-only bean to represent a list of best-seller books. Although the list might change occasionally in the database (say, from another bean entirely), the change need not be ree[...]
-
Página 45
For example, you have this relationship dened in the ejb-jar.xml le: <relationships> <ejb-relation> <description>Order-OrderLine</description> <ejb-relation-name>Order-OrderLine</ejb-relation-name> <ejb-relationship-role> <ejb-relationship-role-name> Order-has-N-OrderLines </ejb-relationship-[...]
-
Página 46
Pre-fetching generally improves performance because it reduces the number of database accesses. However, if the business logic often uses Orders without referencing their OrderLines, then this can have a performance penalty, that is, the system has spent the eort to pre-fetch the OrderLines that are not actually needed. A void pre-fetching for s[...]
-
Página 47
Reduce the database transaction isolation level when appropriate. Reduced isolation levels reduce work in the database tier, and could lead to better application performance. H owever, this must be done after carefully analyzing the database table usage patterns. Set the database transaction isolation level with the A dmin Console on the Resources [...]
-
Página 48
Cache Bean-Specic Resourc es Use the setMessageDrivenContext() or ejbCreate() method to cache bean specic resources, and release those resources from the ejbRemove() method. Limit Use of JMS C onnec tions When designing an application that uses JMS connections make sure you use a methodology that sparingly uses connections, by either pooling [...]
-
Página 49
T uning the Enterprise Ser ver This chapter describes some ways to tune the Enterprise Server for optimum performance, including the following topics: ■ “Deployment Settings” on page 49 ■ “Logger Settings” on page 50 ■ “Web Container Settings” on page 51 ■ “EJB Container Settings” on page 53 ■ “J ava M essage Service Set[...]
-
Página 50
Disable Aut o -deployment Enabling auto-deployment will adversely aect deployment, though it is a convenience in a development environment. For a production system, disable auto-deploy to optimize performance. If auto-deployment is enabled, then the Reload P oll Interval setting can have a signicant performance impact. Disable auto-deployment[...]
-
Página 51
General Settings In general, writing to the system log slows down performance slightly; and increased disk access (increasing the log level, decreasing the le rotation limit or time limit) also slows down the application. Also, make sure that any custom log handler doesn’ t log to a slow device like a network le system since this can advers[...]
-
Página 52
Manager Properties: Reap Inter val M odifying the reap interval can improve performance, but setting it without considering the nature of your sessions and business logic can cause data inconsistency, especially for time-based persistence-frequency. For example, if you set the reap interval to 60 seconds, the value of session data will be recorded [...]
-
Página 53
E JB C ontainer Settings The EJB Container has many settings that aect performance. As with other areas, use monitor the EJB Container to track its execution and performance. Monitoring the E JB C ontainer M onitoring the EJB container is disabled by default. Enable monitoring with the Admin Console under C ongurations > cong-name > [...]
-
Página 54
Note – If you develop and deploy your EJB components using Sun J ava Studio, then you need to edit the individual bean descriptor settings for bean pool and bean cache. These settings might not be suitable for production-level deployment. T uning the EJB Pool A bean in the pool represents the pooled state in the EJB lifecycle. This means that the[...]
-
Página 55
■ P ool Idle Timeout : the maximum time that a stateless session bean, entity bean, or message-driven bean is allowed to be idle in the pool. After this time, the bean is destroyed if the bean in case is a stateless session bean or a message driver bean. This is a hint to server. The default value is 600 seconds. The corresponding EJB deployment [...]
-
Página 56
Max Cache Size Maximum number of beans in the cache. M ake this setting greater than one. The default value is 512. A value of zero indicates the cache is unbounded, which means the size of the cache is governed by Cache Idle Timeout and Cache Resize Quantity. The corresponding EJB deployment descriptor attribute is max-cache-size . Cache Resize Qu[...]
-
Página 57
T ABLE 3–2 EJB Cache and Pool Settings (Continued) Cache Settings Pool Settings T ype of Bean cache- resize- quantity max- cache- size cache- idle- timeout- in- seconds removal- timeout- in- seconds victim- selection- policy refresh- period- in- seconds steady- pool-size pool- resize- quantity max- pool- size pool-idle- timeout-in- seconds Entity[...]
-
Página 58
than cache misses, then option B is an appropriate choice. You might still have to change the max-cache-size and cache-resize-quantity to get the best result. If the cache hits are too low and cache misses are very high, then the application is not reusing the bean instances and hence increasing the cache size (using max-cache-size ) will not help [...]
-
Página 59
asadmin get -m serverInstance.transaction-service.* The following statistics are gathered on the transaction service: ■ total-tx-completed Completed transactions. ■ total-tx-rolled-back Total rolled back transactions. ■ total-tx-inflight Total inight (active) transactions. ■ isFrozen Whether transaction system is frozen (true or false) ?[...]
-
Página 60
Recov er On Restar t ( Automa tic Recovery) To set the Recover on Restart attribute with the A dmin Console, go to C ongurations > cong-name > Transaction Service. Click the Recover check box to set it to true (checked, the default) or false (un-checked). You can also set automatic recovery with asadmin , for example: asadmin set server[...]
-
Página 61
With asadmin , use the following command to list the monitoring parameters available: list --user admin --port 4848 -m server-instance-name .http-service.* where server-instance-name is the name of the server instance. Use the following command to get the values: get --user admin --port 4848 -m server.http-service. parameter-name .* where parameter[...]
-
Página 62
HitRatio The hit ratio is the number of cache hits divided by the number of cache lookups. This setting is not tunable. Note – If you turn o DNS lookups on your server, host name restrictions will not work and IP addresses will appear instead of host names in log les. Caching DNS Entries I t is possible to also specify whether to cache the [...]
-
Página 63
File C ache Information (le- cache) The le cache caches static content so that the server handles requests for static content quickly. The le-cache section provides statistics on how your le cache is being used. For information on tuning the le cache, see “HTTP F ile C ache” on page 67 . ■ N umber of Hits on Cached File Content[...]
-
Página 64
C onnec tion Queue ■ Total Connections Queued: Total connections queued is the total number of times a connection has been queued. This includes newly accepted connections and connections from the keep-alive system. ■ A verage Queuing Delay: A verage queueing delay is the average amount of time a connection spends in the connection queue. This [...]
-
Página 65
■ Request Timeout ■ Buer Length Thread C ount The Thread Count parameter species the maximum number of simultaneous requests the server can handle. The default value is 5. When the server has reached the limit or request threads, it defers processing new requests until the number of active requests drops below the maximum amount. Increasi[...]
-
Página 66
Buer Length The size (in bytes) of the buer used by each of the request processing threads for reading the request data from the client. A djust the value based on the actual request size and observe the impact on performance. In most cases the default should suce. If the request size is large, increase this parameter. Keep Aliv e Both HTT[...]
-
Página 67
Time Out Time Out determines the maximum time (in seconds) that the server holds open an HTTP keep alive connection. A client can keep a connection to the server open so that multiple requests to one server can be serviced by a single network connection. Since the number of open connections that the server can handle is limited, a high number of op[...]
-
Página 68
Max Files C ount Max F iles C ount determines how many les are in the cache. If the value is too big, the server caches little-needed les, which wastes memory. If the value is too small, the benet of caching is lost. Try dierent values of this attribute to nd the optimal solution for specic applications—generally, the eects w[...]
-
Página 69
T uning HT TP Listener Settings Change HTTP listener settings in the A dmin Console under C ongurations > cong-name > HTTP Service > HTTP Listeners > listener-name . Network A ddress For machines with only one network interface card (NI C), set the network address to the IP address of the machine (for example, 192.18.80.23 instead[...]
-
Página 70
ORB Settings The Enterprise Server includes a high performance and scalable CORB A Object Request Broker (ORB). The ORB is the foundation of the EJB Container on the server. Overview The ORB is primarily used by EJB components via: ■ RMI/IIOP path from an application client (or rich client) using the application client container. ■ RMI/IIOP pat[...]
-
Página 71
set serverInstance.iiop-service.orb.system.monitoringEnabled=true reconfig serverInstance Connection Statistics The following statistics are gathered on ORB connections: ■ total-inbound-connections Total inbound connections to ORB . ■ total-outbound-connections Total outbound connections from ORB . Use this command to get ORB connection statist[...]
-
Página 72
T ABLE 3–3 Tunable ORB Settings (Continued) RMI/ IIOP from ORB to Enterprise Server communication infrastructure, thread pool steady-thread-pool-size, max-thread-pool-size, idle-thread-timeout-in-seconds RMI/ IIOP from a vendor ORB parts of communication infrastructure, thread pool steady-thread-pool-size, max-thread-pool-size, idle-thread-timeou[...]
-
Página 73
■ Minimum P ool Size: The minimum number of threads in the ORB thread pool. Set to the average number of threads needed at a steady (RMI/ IIOP) load. ■ Maximum P ool Size: The maximum number of threads in the ORB thread pool. ■ Idle Timeout: N umber of seconds to wait before removing an idle thread from pool. Allows shrinking of the thread po[...]
-
Página 74
Load Balancing For information on how to congure RMI/II OP for multiple application server instances in a cluster, Chapter 9, “RMI-IIOP Load Balancing and Failover, ” in Sun GlassFish E nterprise Server 2.1 H igh A vailability A dministration Guide . When tuning the client ORB for load-balancing and connections, consider the number of connec[...]
-
Página 75
++++++++++++++++++++++++++++++ Message(Thread[ORB Client-side Reader, conn to 192.18.80.118:1050,5,main]): createFromStream: type is 4 < MessageBase(Thread[ORB Client-side Reader, conn to 192.18.80.118:1050,5,main]): Message GIOP version: 1.2 MessageBase(Thread[ORB Client-side Reader, conn to 192.18.80.118:1050,5,main]): ORB Max GIOP Version: 1.[...]
-
Página 76
▼ T o Enable Java Serialization You must set this property on all servers that you want to use JSG. In the tree component, e xpand the Congurations node. Expand the desired node. Select the JVM S ettings node In the JVM Settings page, choose the JVM Options tab . Click Add JVM Option, and enter the f ollowing value: -Dcom.sun.CORBA.encoding.OR[...]
-
Página 77
is not oered in a Unix/Linux user interface. However, it is possible to edit the OS-scheduled thread pools and add new thread pools, if needed, using the A dmin Console. Resourc es ■ “JDBC C onnection P ool Settings” on page 77 ■ “Connector C onnection P ool Settings” on page 80 JDBC C onnec tion P ool Settings For optimum performanc[...]
-
Página 78
■ “Timeout Settings” on page 78 ■ “Isolation Level Settings” on page 79 ■ “Connection Validation Settings” on page 79 P ool Size Settings The following settings control the size of the connection pool: Initial and Mimimum P ool Size Size of the pool when created, and its minimum allowable size. Maximum P ool Size Upper limit of si[...]
-
Página 79
■ Idle Timeout : M aximum time in seconds that a connection can remain idle in the pool. After this time, the pool can close this connection. This property does not control connection timeouts on the database server. Keep this timeout shorter than the database server timeout (if such timeouts are congured on the database), to prevent accumulat[...]
-
Página 80
Connection Validation Required If true, the pool validates connections (checks to nd out if they are usable) before providing them to an application. If possible, keep the default value, false. Requiring connection validation forces the server to apply the validation algorithm every time the pool returns a connection, which adds overhead to the [...]
-
Página 81
asadmin> create-connector-connection-pool --raname jdbcra --connectiondefinition javax.sql.DataSource -transactionsupport LocalTransaction TESTPOOL Close All Connections On Any F ailure Chapter 3 • T uning the Enterprise Ser ver 81[...]
-
Página 82
82[...]
-
Página 83
T uning the Java Runtime S ystem This chapter discusses the following topics: ■ “J ava Virtual Machine Settings” on page 83 ■ “Managing M emory and Garbage C ollection” on page 84 ■ “Further I nformation” on page 91 Jav a V ir tual Machine Settings J2SE 5.0 provides two implementations of the H otSpot Java virtual machine (JVM): ?[...]
-
Página 84
Managing Memor y and Garbage Collection The eciency of any application depends on how well memory and garbage collection are managed. The following sections provide information on optimizing memory and allocation functions: ■ “Goals” on page 32 ■ “Tracing Garbage Collection” on page 86 ■ “Other Garbage Collector Settings” on pa[...]
-
Página 85
When the new generation lls up, it triggers a minor collection in which the surviving objects are moved to the old generation. When the old generation lls up, it triggers a major collection which involves the entire object heap. Both HotSpot and Solaris JDK use thread local object allocation pools for lock-free, fast, and scalable object allo[...]
-
Página 86
T racing Garbage Collec tion The two primary measures of garbage collection performance are throughput and pauses . Throughput is the percentage of the total time spent on other activities apart from GC. Pauses are times when an application appears unresponsive due to GC. Two other considerations are footprint and promptness . Footprint is the work[...]
-
Página 87
Although applications can explicitly invoke GC with the System.gc() method, doing so is a bad idea since this forces major collections, and inhibits scalability on large systems. I t is best to disable explicit GC by using the ag -XX:+DisableExplicitGC . The Enterprise Server uses RMI in the A dministration module for monitoring. Garbage cannot [...]
-
Página 88
memory structures. The dierence between the maximum address space and the total of those values is the amount of memory that can be allocated to the heap. You can improve performance by increasing your heap size or using a dierent garbage collector. In general, for long-running server applications, use the J2SE throughput collector on machine[...]
-
Página 89
■ Decide the total amount of memory you can aord for the JVM. Accordingly, graph your own performance metric against young generation sizes to nd the best setting. ■ Make plenty of memory available to the young generation. The default is calculated from NewRatio and the -Xmx setting. ■ Larger eden or younger generation spaces increase t[...]
-
Página 90
To prevent load address collisions, set preferred base addresses with the rebase utilty that comes with Visual Studio and the Platform SDK. Use the rebase utility to reassign the base addresses of the A pplication Server DLLs to prevent relocations at load time and increase the available process memory for the J ava heap. There are a few A pplicati[...]
-
Página 91
F ur ther Information For more information on tuning the JVM, see: ■ J ava HotSpot VM Options ■ Frequently A sked Questions About the J ava HotSpot Virtual Machine ■ P erformance D ocumentation for the J ava HotSpot VM ■ J ava performance web page ■ M onitoring and Management for the J ava Platform ( J2SE 5.0) ■ The jvmstat monitoring u[...]
-
Página 92
92[...]
-
Página 93
T uning the Operating S ystem and Pla tform This chapter discusses tuning the operating system (OS) for optimum performance. I t discusses the following topics: ■ “Server Scaling” on page 93 ■ “Solaris 10 Platform-Specic Tuning Information” on page 95 ■ “Tuning for the Solaris OS” on page 95 ■ “Linux Conguration” on pa[...]
-
Página 94
the relative amount of time it spends in I/O versus CPU activity. Studies have shown that doubling the number of CPUs increases servlet performance by 50 to 80 percent. Memor y See the section Hardware and Software Requirements in the Sun J ava System A pplication Server Release Notes for specic memory recommendations for each supported operatin[...]
-
Página 95
Solaris 10 Platform-Specic T uning Informa tion Solaris TM Dynamic Tracing (DTrace) is a comprehensive dynamic tracing framework for the Solaris Operating System (OS). You can use the DTrace Toolkit to monitor the system. The DTrace Toolkit is available through the OpenSolaris TM project from the DTraceToolkit page ( http://www.opensolaris.org/o[...]
-
Página 96
T ABLE 5–1 Tuning Parameters for Solaris (Continued) Parameter Scope Default Tuned V alue Comments tcp_conn_req_max_q ndd /dev/tcp 128 1024 tcp_conn_req_max_q0 ndd /dev/tcp 1024 4096 tcp_ip_abort_interval ndd /dev/tcp 480000 60000 tcp_keepalive_interval ndd /dev/tcp 7200000 900000 For high trac web sites, lower this value. tcp_rexmit_interval_[...]
-
Página 97
F ile Descriptor Setting On the Solaris OS, setting the maximum number of open les property using ulimit has the biggest impact on eorts to support the maximum number of RMI/IIOP clients. To increase the hard limit, add the following command to /etc/system and reboot it once: set rlim_fd_max = 8192 Verify this hard limit by using the followin[...]
-
Página 98
echo 262143 > /proc/sys/net/core/rmem_default #above configuration for 2.4.X kernels echo 4096 131072 262143 > /proc/sys/net/ipv4/tcp_rmem echo 4096 13107262143 > /proc/sys/net/ipv4/tcp_wmem #disable " RFC2018 TCP Selective Acknowledgements, " and " RFC1323 TCP timestamps " echo 0 > /proc/sys/net/ipv4/tcp_sack echo 0[...]
-
Página 99
Some of the values depend on the system resources available. After making any changes to /etc/system , reboot the machines. F ile Descriptors A dd (or edit) the following lines in the /etc/system le: set rlim_fd_max=65536 set rlim_fd_cur=65536 set sq_max_size=0 set tcp:tcp_conn_hash_size=8192 set autoup=60 set pcisch:pci_stream_buf_enable=0 Thes[...]
-
Página 100
T uning for Linux platf orms To tune for maximum performance on Linux, you need to make adjustments to the following: ■ “File Descriptors” on page 100 ■ “Virtual M emory” on page 101 ■ “Network I nterface” on page 102 ■ “Disk I/O Settings” on page 102 ■ “TCP/IP Settings” on page 102 F ile Descriptors You may need to in[...]
-
Página 101
cputime unlimited filesize unlimited datasize unlimited stacksize 8192 kbytes coredumpsize 0 kbytes memoryuse unlimited descriptors 1024 memorylocked unlimited maxproc 8146 openfiles 1024 The openfiles and descriptors show a limit of 1024. To increase the limit to 65535 for all users, edit /etc/security/limits.conf as root, and modify or add the no[...]
-
Página 102
Netw ork Inter face To ensure that the network interface is operating in full duplex mode, add the following entry into /etc/rc.local : mii-tool -F 100baseTx-FD eth0 where eth0 is the name of the network interface card (NIC). Disk I/O Settings ▼ T o tune disk I/O per formance f or non SCSI disks T est the disk speed. Use this command: /sbin/hdpar[...]
-
Página 103
Add the follo wing to /etc/sysctl.conf # Disables packet forwarding net.ipv4.ip_forward = 0 # Enables source route verification net.ipv4.conf.default.rp_filter = 1 # Disables the magic-sysrq key kernel.sysrq = 0 net.ipv4.ip_local_port_range = 1204 65000 net.core.rmem_max = 262140 net.core.rmem_default = 262140 net.ipv4.tcp_rmem = 4096 131072 262140[...]
-
Página 104
T ABLE 5–2 Tuning 64–bit Systems for Performance Benchmarking Parameter Scope Default Value T uned Value Comments rlim_fd_max /etc/system 65536 260000 Process open le descriptors limit; should account for the expected load (for the associated sockets, les, pipes if any). hires_tick /etc/system 1 sq_max_size /etc/system 2 0 Controls stream[...]
-
Página 105
Disk C ongura tion If HTTP access is logged, follow these guidelines for the disk: ■ Write access logs on faster disks or attached storage. ■ If running multiple instances, move the logs for each instance onto separate disks as much as possible. ■ Enable the disk read/write cache. N ote that if you enable write cache on the disk, some writ[...]
-
Página 106
■ To start the 32–bit Enterprise Server with 4–Mbyte pages, use the following options: LD_PRELOAD_32=/usr/lib/mpss.so.1 ; export LD_PRELOAD_32; export MPSSHEAP=4M; ./bin/startserv; unset LD_PRELOAD_32; unset MPSSHEAP ■ To start the 64–bit Enterprise Server with 4–Mbyte pages, use the following options: LD_PRELOAD_64=/usr/lib/64/mpss.so.[...]
-
Página 107
T uning for High-A vailability This chapter discusses the following topics: ■ “Tuning H ADB” on page 107 ■ “Tuning the Enterprise Server for High-A vailability” on page 116 ■ “Conguring the Load B alancer” on page 120 T uning HADB The A pplication Server uses the high-availability database (HAD B) to store persistent session st[...]
-
Página 108
If the database runs out of device space, the H ADB returns error codes 4593 or 4592 to the Enterprise Server. Note – See Sun J ava System A pplication Server Error Message Reference for more information on these error messages. H ADB also writes these error messages to history les. In this case, H ADB blocks any client requests to insert, or [...]
-
Página 109
Note – hadbm does not add data devices to a running database instance. Placing HADB les on Phy sic al Disks For best performance, data devices should be allocated on separate physical disks. This applies if there are nodes with more than one data device, or if there are multiple nodes on the same host. Place devices belonging to dierent nod[...]
-
Página 110
P er formance For best performance, all H ADB processes ( clu_xxx_srv ) must t in physical memory. They should not be paged or swapped. The same applies for shared memory segments in use. You can congure the size of some of the shared memory segments. If these segments are too small, performance suers, and user transactions are delayed or [...]
-
Página 111
■ FreeSize: free size in MB . ■ Usage: percent used. Use the hadbm resourceinfo command to monitor resource usage, for example the following command displays data buer pool information: %hadbm resourceinfo --databuf NodeNo Avail Free Access Misses Copy-on-write 0 32 0 205910260 8342738 400330 1 32 0 218908192 8642222 403466 The columns in th[...]
-
Página 112
The log records remain in the buer until they are processed locally and shipped to the mirror node. The log records are kept until the outcome (commit or abort) of the transaction is certain. If the H ADB node runs low on tuple log, the user transactions are delayed, and possibly timed out. T uning LogBuerSize Begin with the default value. L [...]
-
Página 113
Large BLOBs necessarily allocate many disk blocks, and thus create a high load on the node internal log. This is normally not a problem, since each entry in the nilog is small. T uning InternalLogbuerSiz e Begin with the default value. L ook out for HIGH LOAD informational messages in the history les. The relevant messages contain nilog , and[...]
-
Página 114
Calculating the number of locks To calculate the number of locks needed, estimate the following parameters: ■ N umber of concurrent users that request session data to be stored in HAD B (one session record per user) ■ Maximum size of the BLO B session ■ P ersistence scope (max session data size in case of session/modied session and maximum[...]
-
Página 115
For example, the output displayed by this command might look something like this: Node No. Avail Free Waits 0 50000 50000 na 1 50000 50000 na ■ A vail: N umber of locks available. ■ Free: N umber of locks in use. ■ Waits: N umber of transactions that have waited for a lock.“na” (not applicable) if all locks are available. To change the nu[...]
-
Página 116
For more information on conguring the load balancer plug-in, see “Conguring the HTTP Load Balancer” in Sun GlassFish Enterprise Server 2.1 H igh A vailability Administration G uide . HADB timeouts The sql_client time out value may aect performance. Opera ting Sy stem C ongura tion If the number of semaphores is too low, H ADB can fa[...]
-
Página 117
T uning S ession P ersistence F requenc y The Enterprise Server provides HTTP session persistence and failover by writing session data to H ADB. You can control the frequency at which the server writes to H ADB by specifying the persistence frequency. Specify the persistence frequency in the A dmin Console under C ongurations > cong-name &[...]
-
Página 118
Session P ersistence Scope You can specify the scope of the persistence in addition to persistence frequency on the same page in the A dmin Console where you specify persistence frequency, C ongurations > cong-name > A vailability Service (Web Container A vailability). For detailed description of dierent persistence scopes, see Chapt[...]
-
Página 119
I t is important to pay attention while determining the HTTP session size. If you are creating large HTTP session objects, calculate the H ADB nodes as discussed in “Tuning H ADB ” on page 107 . Checkpointing Stateful Session Beans Checkpointing saves a stateful session bean (SFSB) state to the H ADB so that if the server instance fails, the SF[...]
-
Página 120
For optimal performance, use a pool with eight to 16 connections per node. F or example, if you have four nodes congured, then the steady-pool size must be set to 32 and the maximum pool size must be 64. A djust the Idle Timeout and P ool Resize Quantity values based on monitoring statistics. For the best performance, use the following settings:[...]
-
Página 121
■ interval-in-seconds : Species the interval at which health checks of instances occur. The default is 30 seconds. ■ timeout-in-seconds : Species the timeout interval within which a response must be obtained for a listener to be considered healthy. The default is 10 seconds. If the typical response from the server takes n seconds and unde[...]
-
Página 122
122[...]
-
Página 123
Index A A cceptor Threads, 69 access log, 64 A ddrLookups, 62 application architecture, 19 scalability, 24 tuning, 27 arrays, 27 authentication, 21 authorization, 21 automatic recovery, 60 A verage Queuing Delay, 64 B B commit option, 57 bandwidth, 94 benchmarking, tuning Solaris for, 104 best practices, 27 Buer Length, HTTP Service, 66 C C comm[...]
-
Página 124
deployment settings, 49 tips, 31 deserialization, 27-29 disabling network interrupts, 105 disk conguration, 105 disk I/O performance, 102 disk space, 94 distributed transaction logging, disabling, 59 DNS cache, 61-62 DNS lookups, 62, 67 dynamic reloading, disabling, 50 E EJB components cache tuning, 35-36, 36, 55-56 commit options, 57-58 monitor[...]
-
Página 125
HTTP Service (Continued) tuning, 64 HTTP sessions, 30 I idle timeout EJB cache, 56 EJB pool, 55 IIOP Client A uthentication Required, 72 IIOP messages, 74-75 Initial Thread Count, HTTP Service, 65 InternalLogbuerSize, 112-113 ip:ip_squeue_bind, 104 ip:ip_squeue_fanout, 104 IP stack, 99 ipge:ipge_bcopy_thresh, 104 ipge:ipge_srv_fo_depth, 104 i[...]
-
Página 126
monitoring (Continued) transaction service, 58 N N ameLookups, 62 Network A ddress, 69 network conguration, 105 network interface, 102 network interrupts, disabling, 105 NewRatio, 88 NewSize, 88 Node Supervisor P rocess (NSUP), 109 null, assigning, 28 N umberOfL ocks, 113-115 O open les, 97, 101 operating system, tuning, 93-106 operational re[...]
-
Página 127
session (Continued) timeout, 51 Small/M edium File Size, HTTP le cache, 68 SO AP attachments, 29 Solaris JDK, 85 TCP/IP settings, 95 tuning for performance benchmarking, 104 version 9, 31 sq_max_size, 95, 104 SSL, 21 start options, 105-106 stateful session beans, 42-43, 119 stateless session beans, 43 storing persistent session state, 107 String[...]
-
Página 128
X x86, 98 XA -capable data sources, 38-39 -Xms, 88 -Xmx, 88 -XX +DisableExplicitGC, 87 MaxH eapFreeRatio, 88 MaxP ermSize, 86 MinH eapFreeRatio, 88 Index Sun GlassFish Enterprise Server 2.1 P er f ormance Tuning Guide • Januar y 2009 128[...]