EAServer Performance Tuning Techniques
2006-02-23 21:42:38 来源:WEB开发网 闂傚倸鍊搁崐鎼佸磹閹间礁纾归柟闂寸绾惧綊鏌熼梻瀵割槮缁炬儳缍婇弻鐔兼⒒鐎靛壊妲紒鐐劤缂嶅﹪寮婚悢鍏尖拻閻庨潧澹婂Σ顔剧磼閻愵剙鍔ょ紓宥咃躬瀵鎮㈤崗灏栨嫽闁诲酣娼ф竟濠偽i鍓х<闁绘劦鍓欓崝銈囩磽瀹ュ拑韬€殿喖顭烽幃銏ゅ礂鐏忔牗瀚介梺璇查叄濞佳勭珶婵犲伣锝夘敊閸撗咃紲闂佺粯鍔﹂崜娆撳礉閵堝洨纾界€广儱鎷戦煬顒傗偓娈垮枛椤兘骞冮姀銈呯閻忓繑鐗楃€氫粙姊虹拠鏌ュ弰婵炰匠鍕彾濠电姴浼i敐澶樻晩闁告挆鍜冪床闂備胶绮崝锕傚礈濞嗘挸绀夐柕鍫濇川绾剧晫鈧箍鍎遍幏鎴︾叕椤掑倵鍋撳▓鍨灈妞ゎ厾鍏橀獮鍐閵堝懐顦ч柣蹇撶箲閻楁鈧矮绮欏铏规嫚閺屻儱寮板┑鐐板尃閸曨厾褰炬繝鐢靛Т娴硷綁鏁愭径妯绘櫓闂佸憡鎸嗛崪鍐簥闂傚倷娴囬鏍垂鎼淬劌绀冮柨婵嗘閻﹂亶姊婚崒娆掑厡妞ゃ垹锕ら埢宥夊即閵忕姷顔夐梺鎼炲労閸撴瑩鎮橀幎鑺ョ厸闁告劑鍔庢晶鏇犵磼閳ь剟宕橀埞澶哥盎闂婎偄娲ゅù鐑剿囬敃鈧湁婵犲﹤鐗忛悾娲煛鐏炶濡奸柍瑙勫灴瀹曞崬鈻庤箛鎾寸槗缂傚倸鍊烽梽宥夊礉鎼达絽鍨濇い鏍仜妗呴梺鍛婃处閸ㄦ壆绮婚幎鑺ュ€甸柨婵嗙凹缁ㄨ棄霉閻樿崵鐣烘慨濠冩そ濡啫鈽夊▎鎰€烽梺璇插閻噣宕¢幎鑺ュ仒妞ゆ洍鍋撶€规洖鐖奸、妤佸緞鐎n偅鐝┑鐘愁問閸n垳寰婇崜褉鍋撶粭娑樻搐缁犳煡鏌涢妷顔煎闁藉啰鍠栭弻锝夊棘閹稿孩鍠愰梺鑽ゅ枎缂嶅﹪寮诲☉鈶┾偓锕傚箣濠靛洨浜俊鐐€ら崜娆撴偋閸℃稈鈧棃宕橀鍢壯囧箹缁厜鍋撻懠顒€鍤紓鍌氬€风欢锟犲窗濡ゅ懎绠伴柟闂寸劍閸嬧晠鏌i幋锝嗩棄缁绢厸鍋撻梻浣虹帛閸旀洜绮旈棃娴虫盯宕橀鍏兼К闂侀€炲苯澧柕鍥у楠炴帡骞嬪┑鎰磻闁诲氦顫夐幐椋庣矆娓氣偓閸╃偤骞嬮敂钘変汗闂佸湱绮敮鈺傚閳ь剛绱撴担鐟板姢鐟滄壆鍋熼崚鎺戔枎閹惧疇鎽曞┑鐐村灦閻喖鈻介鍫熺厵閻熸瑥瀚慨鍥ㄣ亜閵夛妇绠炴慨濠冩そ閺屽懘鎮欓懠璺侯伃婵犫拃鍌氬祮闁哄瞼鍠栭幖褰掝敃閿濆懐锛撻梻浣瑰缁诲嫰宕戝☉銏犵厴闁瑰濮崑鎾绘晲鎼存ê浜炬い鎾寸⊕濞呭﹪鏌$仦鐣屝f繛纰变邯楠炲繒浠﹂挊澶婅厫闂傚倷鐒﹂惇褰掑磹閺囥垹绠犻柟閭﹀枟椤洟鏌熼幆褏鎽犲┑顖涙尦閺屾盯骞橀弶鎴犵シ闂佸憡鎸稿畷顒勨€旈崘顔嘉ч柛鈩冾殘娴犳悂姊洪懡銈呮毐闁哄懏鐩幃楣冩倻閽樺)銊ф喐婢舵劕纾婚柟鍓х帛閺呮煡骞栫划鐟板⒉闁诲繐绉瑰铏圭磼濡闉嶅┑鐐插级閿曘垺淇婇悽绋跨妞ゆ牗姘ㄩ悿鈧梻鍌氬€搁悧濠勭矙閹邦喛濮抽柤娴嬫櫇绾捐棄霉閿濆牊顥夐柣鎾村姈閹便劌螣缁嬪灝顬嬪┑鈥冲级閸旀瑩鐛Ο鍏煎珰闁肩⒈鍓﹀Σ浼存⒒娴gǹ鏆遍柟纰卞亰瀹曟劖绻濆В绋挎喘瀵埖鎯旈幘瀛樻澑婵$偑鍊栧濠氬Υ鐎n亶鍟呴柕澶涜礋娴滄粍銇勯幘璺轰粶婵℃彃顭烽弻锝夋晲閸パ冨箣濡ょ姷鍋炵敮锟犵嵁鐎n喖绫嶉柍褜鍓熼幃妤佺節濮橆厸鎷洪柣鐔哥懃鐎氼參宕曞Δ鍛厱婵☆垵銆€閸嬫捇鎮㈤幓鎺戠阀濠电姷鏁告慨鐑藉极閸涘﹥鍙忛柣鎴f閺嬩線鏌涘☉姗堟敾闁告瑥绻戦妵鍕箻閸楃偟浠肩紒鐐劤椤兘寮婚悢鐓庣鐟滃繒鏁☉銏$厓闂佸灝顑呴悘锕傛煏閸パ冾伃妤犵偞甯″畷鍗烆渻閹屾缂傚倸鍊搁崐椋庣矆娓氣偓钘濋梺顒€绉撮弸浣糕攽閻樿櫕鐨戠€规挷绶氶弻娑㈠焺閸愵亖濮囬梺绋匡功閸忔﹢寮诲☉妯锋斀闁糕剝顨忔导鈧俊鐐€栧褰掑礉閺囥垹鐓橀柟杈鹃檮閸婂鏌涢妷銏℃珖閺嶏繝姊绘担鍛婂暈闁圭ǹ顭烽幃鐑芥晜閻e备鏀虫繝鐢靛Т濞诧箓宕甸崘顔界厓闁告繂瀚弳鐔兼煥濞戞瑧鐭掓慨濠囩細閵囨劙骞掗幋婊冩瀳闂備礁鎲¢悷銉︻殽閹间礁鐓濋柟鐐灱閸亪鏌涢銈呮灁闁告ɑ鎮傞弻锝堢疀閺囩偘鎴风紒缁㈠幖閻栫厧鐣烽幋锕€绠婚悹鍥皺閻も偓濠电偠鎻徊浠嬪箟閿熺姴纾规い鏍仦閳锋垹鐥鐐村櫣濞存粌缍婇幃璺衡槈閺嵮冨Е闂佺硶鏂侀崑鎾愁渻閵堝棗绗掗柛鐕佸亰閹啫煤椤忓懐鍘告繛杈剧到濠€杈ㄦ櫠椤忓牊鐓冮悷娆忓閻忔挳鏌熼鐣屾噰鐎殿喖鐖奸獮瀣偐鏉堫煈鏁囬梻鍌氬€风粈浣革耿鏉堛劎浠氶梻浣侯攰婵倗鍒掓惔銊ョ闁圭儤顨呯猾宥夋煕椤愩倕鏋庡ù鐘烘缁辨挻鎷呴崜鎻掑壍濡炪倖娲樻繛濠囧极閸愵喖纾兼繛鎴炶壘楠炲牓姊绘担鍛婃儓婵炲眰鍨藉畷婵嗙暆閸曨剙鈧爼鏌eΟ鑲╁笡闁绘挻娲熼弻鐔兼嚋椤掆偓婵$厧霉濠婂嫬鍔ら柍瑙勫灴閺佸秹宕熼鈩冩線闂備胶枪閿曘儵鎮ч悩鑼殾婵犻潧顑嗛弲婵嬫煃瑜滈崜鐔煎灳閿曞倸閿ゆ俊銈傚亾闁绘帒鐏氶妵鍕箳瀹ュ牆鍘$紓浣哄Т婢т粙鍩€椤掆偓閸樻粓宕戦幘鏂ユ斀闁绘ǹ浜粣鏃堟煕鐎n偒娈旈柍瑙勫灴椤㈡瑧娑甸悜鐣屽弽婵犵數鍋涢幏鎴犲緤閸啣锝夊箛閺夎法顔婇梺鐟板暱绾绢參宕伴幘璇茬闁绘ḿ绮崵鎴︽煠缁嬭法浠涙慨锝嗗姍濮婂宕掑顑藉亾閻戣姤鍤勯柤鍝ユ暩娴犳碍绻濋悽闈涗粶妞ゆ洦鍙冨畷妤€螣娓氼垰娈ㄥ銈嗗姂閸婃牜鈧碍姘ㄩ埀顒傛嚀婢瑰﹪宕伴弽褉鏋旈柕濠忓缁♀偓闂佹眹鍨藉ḿ褎鐗庣紓浣哄亾濠㈡ḿ绮旈悷閭﹀殨闁哄被鍎辩粻鐢告煙閻戞ḿ绠橀柛鐐垫暬閺岋綁鎮╅悜姗嗕哗闁诲繐绻堥崝宀勵敊韫囨稑唯鐟滃宕戦幘鑸靛枂闁告洦鍓欑喊宥呪攽閳藉棗浜濈紒璇插€块敐鐐剁疀濞戞瑦鍎梺闈╁瘜閸橀箖鏁嶅⿰鍐f斀闁宠棄妫楅悘鐘绘煙绾板崬浜伴柨婵堝仜椤撳ジ宕堕埡鍐跨闯濠电偠鎻紞渚€藟閹捐绀夌€广儱顦伴悡娆戠磼鐎n亞浠㈤柡鍡涗憾閺岋綁鏁愰崶褍骞嬪Δ鐘靛仜椤戝寮崘顔肩劦妞ゆ帒鍊绘稉宥呪攽閻樺磭顣查柛瀣剁秮閺屾盯濡烽幋婵嗘殶濡ょ姴娲幃妤冩喆閸曨剙纰嶇紓浣割槹閹告娊鍨鹃弮鍫濈妞ゆ柨妲堣閺屾盯鍩勯崗鐙€浜Λ鍕吋閸モ晝锛濇繛杈剧到婢瑰﹪宕曢幇鐗堢厱闁靛ǹ鍎遍。宕囩磼椤旂⒈鍎忔い鎾冲悑瀵板嫮鈧綆浜栭崑鎾绘煥鐎c劋绨婚梺鐟版惈缁夊爼藝閿旈敮鍋撳▓鍨灈闁诲繑绻堥崺鐐哄箣閿曗偓閻擄繝鏌涢埄鍐炬畼濞寸媭鍨跺娲川婵犲海鍔堕梺鍛婃处閸欏骸煤閸涘﹣绻嗛柕鍫濈箳閸掍即鏌涢悤浣哥仸鐎规洘鍔欏畷褰掝敃閿濆懎浼庢繝纰樻閸ㄦ娊宕㈣缁傚秵銈i崘鈺佲偓鍨叏濡厧浜鹃悗姘炬嫹

This document provides an overview of ways to improve performance for EAServer applications. It includes suggestions for server-level and component properties, and for design and coding practices.
There are many variables involved for application throughput and response times. In addition to tweaking the code in your application for optimum performance, you can tune EAServer based on application specifics as well.
But where do you start? What parameters are available? How will changing them affect performance? This paper can serve as a guide to give you a point of reference to start from. As such, there is no silver bullet given, but rather a comprehensive look at what performance tuning is available in EAServer.
Some of the material presented here only applies to EAServer 4.1+, although much of it applies to older versions as well. Be sure to check the EAServer documentation for the version you are using for clarifications and additional details.
Section 1 General EAServer Tuning
Section 2 EAServer Clusters
Section 3 Components
- General
- Service
- java">Java
- EJBs
- Web (jsp(SUN企业级应用的首选)s and Servlets)
- C++
- C
- ActiveX
- PowerBuilder
Section 5 Client Applications
Section 6 Protocols
Section 7 Web server redirector plug-ins
Section 8 Database Access
Section 9 Web Services Toolkit
Section 10 System-Level Tuning and Sizing
Section 11 Runtime Monitoring
Section 12 PowerDynamo
Section 13 Localization
Section 14 Development Environment
With the exception on Section 14, these suggestions focus on improving performance in a production environment.
All of these recommendations are general guidelines. Results may vary depending on the design of your application, hardware and network configuration, and other factors. For best results, you should monitor and measure performance as you fine-tune the configuration and application.
Section 1: General EAServer Tuning |
This section contains suggestions to help improve overall performance of EAServer, regardless of the type of components, features implemented, or business logic used. Follow these suggestions for every EAServer installation.
Category | Performance Considerations | More Information |
HTTP Request Logging | By default, EAServer logs information about every HTTP request made. To improve the speed at which requests are served, you can disable the HTTP request log. | "HTTP Config", and "HTTP logging and statistics" in EAServer System Administration Guide |
HTTP Threads | The HTTP thread settings allow you to balance memory resources. A maximum value set too high needlessly uses memory resources. To tune this setting, monitor the total number of hits listed in the httpstat.dat file for indications of a heavily loaded server, and adjust the maximum thread setting as necessary. Setting this number too high will result in thrashing, with many threads waiting for a slice of CPU time. As a general guideline, consider a limit of 100 clients per CPU on Solaris, and 75 clients per CPU on Windows. · com.sybase.jaguar.server.http.maxthreads | Section 10 System-Level Tuning and Sizing "HTTP Config" in EAServer System Administration Guide |
IIOP Connections | The com.sybase.jaguar.server.maxconnections property should be set to accommodate the number of IIOP connections you expect. By default, this property is set to 30, which is probably too small for most production applications. | "Configuring a Server" in EAServer System Administration Guide |
Maximum Server threads | The com.sybase.jaguar.server.maxthreads property specifies the total number of combined HTTP and IIOP threads. As a general guideline, set this property as follows: Extra threads are needed for service components, thread manager and message service. If you are not calculating precisely, a guideline is to add another 50 threads. Important Note: See component Bind Thread property -- components with this setting require twice as many threads. | "Configuring a Server" in EAServer System Administration Guide |
Server stack size | Stack size determines how many client requests can be served simultaneously. If there are a large number of clients utilizing the server, you may want to reduce the default stack size, which is the amount of memory reserved for the call stack associated with each thread. For Unix, set the stack size using the com.sybase.jaguar.server.stacksize property. | "Configuring server stack size" in EAServer System Administration Guide |
JVM Heap Size | You can specify the minimum and maximum JVM heap size with com.sybase.jaguar.server.jvm.maxHeapSize and com.sybase.jaguar.server.jvm.minHeapSize (This property is valid for any version of the JVM) | "Repository Properties Reference" in EAServer System Administration Guide Memory Management within Java Processes |
JVM 1.3 Flags | These flags are specific to JDK 1.3, and are added using the EAServer property com.sybase.jaguar.server.jvm.options. NT & Solaris flags
Solaris-Only flags
| In-depth documentation of the flags is provided at java.sun.com/docs/hotspot/index.html">Performance Documentation for the Java HotSpot Virtual Machine |
JIT | Allow Just-In-Time compiling (JIT) by setting the com.sybase.jaguar.server.jvm.nojit property to false. JIT converts Java bytecode into native machine code, which generally runs much faster than when the bytecode is executed by the interpreter. | "Repository Properties Reference" in EAServer System Administration Guide java.sun.com/developer/onlineTraining/Programming/JDCBook/perf2.html#jit">Just-In-Time Compilers on Java Developer Connection |
HotSpot VM | For improved performance, EAServer 4.0+ can run with JDK 1.3 and the Java HotSpot virtual machine. On some platforms, EAServer can also use the Java HotSpot VM with JDK 1.2. | "Creating and Configuring Servers" in EAServer System Administration Guide java.sun.com/products/hotspot/whitepaper.html">Java HotSpot Performance Engine Architecture |
Tracing and Debugging | Be sure all unnecessary tracing is off. This includes the server-level trace options for Attentions, Network Driver APIs, Network Driver Requests, Protocol Data, Protocol Headers, Servlets, JAAS Debug, JCM Trace. | "Log/Trace", and "Repository Properties Reference" in EAServer System Administration Guide |
Static Page Caching | EAServer 4.1+ supports caching of static content. Static page caching can increase performance by caching static files in memory. You can configure the cache size, which files are cached, and how long the cached content is stored.
| "Static Page Caching", "Creating and Configuring Servers", and "Repository Properties Reference" in EAServer System Administration Guide |
Random Seed | EAServer requires a random seed to initialize the random number generation used in cryptographic algorithms. The data used as the seed for the random number generation depends on your platform. You can set the JAGUAR_RANDOMSEED variable to improve EAServer performance without diminishing the randomness of the seeding data. | "Operating system configuration" in EAServer System Administration Guide |
Classpath | Check the classpath and bootclasspath in the the system environment and/or server start script to ensure that it is clean and that the order is appropriate |
Section 2: EAServer Clusters |
Category | Performance Considerations | More Information | ||||||||
Load Balancing Policy | The Adaptive policy has more overhead than the other three policies, since it adjusts load based on metrics data. | "Adaptive policy" in EAServer System Administration Guide | ||||||||
Load Metrics | You can set the intervals for metrics collection and distribution;
| "Load metrics" and "Configuring load balancing" in EAServer System Administration Guide | ||||||||
Number of cluster members | Increased availability and load balancing can be achieved by adding more members and name severs into a cluster. However, the binding/rebinding and heartbeat detection times increase as the number of members/name servers in a cluster increases | "Heartbeat detection" in EAServer System Administration Guide | ||||||||
Heartbeat frequency | Performance decreases as the frequency setting is set shorter, since it causes servers to ping each other more frequently. Ensure Heartbeat Frequency is set reasonably. | "Heartbeat detection" in EAServer System Administration Guide | ||||||||
Transient versus persistent storage | Transient storage can help performance by reducing unnecessary client retries and failures in some scenarios. | "Heartbeat detection" in EAServer System Administration Guide | ||||||||
Cache synchronization options | If the cluster includes components that enable object caching automatic persistence, you can choose one of four synchronization options for the caches; None (default), Mirror, Replicate, Invalidate. The Replicate and Invalidate options provide two alternative ways to replicate with transaction consistency, if you need to do so. Between the two, the Invalidate option may yield better performance if the component's state is large, and the cluster has many members. | "Entity object and query caching", "Configure concurrency control" in EAServer Programmer's Guide | ||||||||
Automatic failover for components | You can mark selected components to support transparent automatic failover. If a client has an object reference for a component on a server in a cluster, the client's object reference will provide transparent failover, unless all the servers in the cluster fail. | "Automatic failover" in EAServer System Administration Guide |
Section 3: Components |
This section includes performance suggestions for all components in general, and for specific component types.
It is important to realize, however, that in addition to choosing the appropriate property settings, you should review and tune the code of the component itself for optimum efficiency.
- Components in general
- Service components
- java">Java components
- EJBs
- Web components (jsp(SUN企业级应用的首选)s and Servlets)
- C++ components
- C components
- ActiveX components
- PowerBuilder components
Components In General
These recommendations apply to all components, regardless of their type. Follow these suggestions for every component, in addition to the ones provided for specific component types.
Category | Performance Considerations | More Information | ||||||||||||
Instance pooling | Object instantiation is expensive. To improve overall performance, use instance pooling, which allows EAServer clients to reuse component instances, eliminating the resource drain caused by repeated creation of component instances. Instance pooling can decrease client response time, but can also increase memory usage in the Jaguar server. You can configure the maximum and minimum pool size to constrain the memory used to maintain an instance pool. By default, no minimum or maximum is set. You can increase memory efficiency by ensuring that heavily used components have higher minimum and maximum pool sizes than less commonly used components. If you specify a maximum, the pool size will grow as additional instances are required to satisfy client requests, up to the maximum specified size. Subsequently, EAServer destroys excess instances after deactivation. As a result, instance pooling benefits are lost when the maximum is configured too low. | "Supporting instance pooling in your component", and "Component properties: Instances" in EAServer Programmer's Guide | ||||||||||||
Named Instance Pools | Named instance pools are available in EAServer 3.6.1 ESD4, and 4.1.1+. This feature allows specific components to be grouped into specific pools, with minimum and maximum instances defined. This feature can be especially useful for components that have the Bind Thread property set. | EAServer 3.6.1 ESD4 Release Bulletin, and EAServer 4.1.1 Release Bulletin | ||||||||||||
Bind Thread | When this option is enabled, component instances are bound to the creating thread. Although components with this setting may be pooled, and multiple instances may still run concurrently on separate threads, scalability is decreased. In addition, extra resources are required since twice as many threads are needed -- the client thread plus another thread bound to the component. Enable this option only for ActiveX components, and components that use thread-local storage (see the PowerBuilder components section). Otherwise, disable this feature so EAServer can run the component on any available thread. | "Component properties: Instances" in EAServer Programmer's Guide | ||||||||||||
Bind Object | Avoid this model - it uses stateful components and does not use pooling, which greatly reduces scalability. Bind object causes an instance of a stateful component to be bound to a client's proxy reference until the client destroys or releases the reference, or the client times out. | "Component properties: Instances" in EAServer Programmer's Guide | ||||||||||||
Concurrency | Concurrency indicates whether multiple instances can be simultaneously active on different threads. Set to true by default, to offer the highest performance. Important: With concurrency set, you must protect any static instance variables by making them thread-safe. Exceptions to this rule are static variables that include the final modifier (meaning it is a constant that cannot be changed), and static variables defined as a primitive datatype that is 32 bits or less. This restriction is required in order to prevent thread race conditions, which cause random unpredictable results that can be very difficult to troubleshoot. | "Component properties: Instances" in EAServer Programmer's Guide java.sun.com/developer/Books/performance2/chap3.pdf">Race Conditions and Mutual Exclusion on the Sun java.sun.com/developer/Books/performance2/">Java Developer Connection | ||||||||||||
Sharing | Avoid this model. Since there is one instance per server, you must synchronize all instance and static variables, which creates a bottleneck each time a synchronization is done. Additionally, developers need to be aware that in a cluster, each server has it's own instance, so the component is not truly a singleton object. The shared flag should only be used in specific scenarios where the component is designed with the above considerations in mind, and the developer is aware of the potential server bottlenecks and cluster implications. | "Component properties: Instances" in EAServer Programmer's Guide | ||||||||||||
Stateless versus Stateful components | Use stateless components whenever possible. Rather than using a stateful component, consider one of these alternatives when you need to accumulate data across method invocations;
| "Stateful versus stateless components", "Component Life Cycles", "Creating ActiveX Components", "Share data between C or C++ components" in EAServer Programmer's Guide | ||||||||||||
Persistence for stateful components | State data can be stored either in memory or to a persistent data store. In-memory storage offers better performance than persistent storage. In-memory storage uses a mirror-pair model where data is replicated between pairs of servers running in the cluster. Each client session has two points of failure (the originating server, and its mirror-pair twin.) Persistent storage uses a remote database to store component state. A component instance can failover to any other server in the cluster where the component is installed. Persistent storage requires a highly available database, otherwise the database itself can become a single point of failure. | "Managing Persistent Component State" in EAServer Programmer's Guide | ||||||||||||
Releasing connections and other resources | For improved performance, connections should not be held any longer than necessary. Early deactivation prevents a client application from tying up connections and other resources that are associated with a component instance. There are two ways to support early deactivation:
| "Supporting early deactivation in your component", "Using transaction state primitives", "Component properties: Transactions" in EAServer Programmer's Guide | ||||||||||||
Efficient Coding for Transactions | For components that participate in a transaction, use isRollBackOnly to test if the transaction already doomed before the method executes more logic that would have to be rolled back. | "Defining transactional semantics" in EAServer Programmer's Guide | ||||||||||||
Tracing and Debugging | Be sure all tracing and debugging flags are turned off in the production environment. These properties include:
| "Repository Properties Reference" in EAServer System Administration Guide | ||||||||||||
Transaction Processing Model | If a component performs updates to a noncritical database (for example, logging usage statistics that are not considered as mission-critical data) you can choose Not Supported as the component's transaction attribute to eliminate the overhead of using two-phase commit. | "Transactional component attribute" in EAServer Programmer's Guide | ||||||||||||
Timeouts on method calls, instances, and transactions | By default, EAServer will wait indefinitely for component methods to complete, for instances to be released, and for open transactions to be completed. If desired, you can set a maximum number of seconds that EAServer should wait for these events. You can set defaults at the server-level, and override the defaults at the component-level. When a specified maximum is reached, EAServer will returning an exception to the client.
(All of the above properties are prefixed by com.sybase.jaguar.) (*) Note: Network latency between client and server is not included in the measured method execution time. Although for C++ components running in an external process, the measured time does include interprocess communication latency. | "Component properties: Resources" in EAServer Programmer's Guide |
Service Components
Category | Performance Considerations | More Information |
Concurrency and Bind Thread Options | For best performance, enable the Concurrency option and disable the Bind Thread option.
| "Creating Service components" in EAServer Programmer's Guide |
java">
Java Components
Follow these suggestions for all types of Java components and applications.
Category | Performance Considerations | More Information |
Result sets and JDBC Statements | If you use the Java Connection Manager (jcm) classes, you must explicitly clean up java.sql.Statement objects to avoid memory leaks. Before releasing a connection back into the cache, call Statement.close() and set the Statement reference to null. | "Using Java Connection Manager classes" in EAServer Programmer's Guide |
Java Performance Analysis | Several profiling tools are available to help identify bottlenecks, memory leaks, and other performance issues in a Java components, applications, and applets. Profiling can help you identify code that needs to be modified or removed for performance reasons. | Setting up OptimizeIt for Use with EAServer Memory Management within Java Processes Java 2 Performance Analysis on Java Developer Connection |
Log4j | Only set logging to verbose for debugging purposes, since it can potentially slow performance. | Java World article: log4j, a fast and flexible logging API for Java |
Tags:EAServer Performance Tuning
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接