转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 数据库 >> SyBase >> 正文
EAServer Performance Tuning Techniques         ★★★★

EAServer Performance Tuning Techniques

作者:闵涛 文章来源:闵涛的学习笔记 点击数:14274 更新时间:2009/4/22 23:10:00
> "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.

Timeout Category Server-level default Component-level setting Transactions server.tx_timeout component.tx_timeout Instances server.timeout component.timeout Methods component.maxwait (*)

(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.

 

  1. Concurrency allows multiple method invocations to occur simultaneously, which can decrease client response time. Also, if your component has a run() method that executes indefinitely, you must enable the Concurrency option or no clients will be able to invoke methods.

     

  2. Disabling the Bind Thread option allows EAServer to run the component on any available thread. (This option should only be enabled for ActiveX components and components that use thread-local storage.)
"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 java.sun.com/developer/onlineTraining/Programming/JDCBook/perf3.html#os">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

EJBs

For EJBs, follow these suggestions in addition to the ones provided for Java components, and for components in general.

Category Performance Considerations More Information Intercomponent Calls The EJB 2.0 architecture introduces local interfaces for calls to an EJB component from within the same Java Virtual Machine. In EAServer, you can use local interfaces for intercomponent calls, and for component invocations made from Servlets and JSPs hosted by the same server as the component.

Using local interfaces can improve performance, but in coding you must be aware that parameters are passed by reference rather than by copy, so object instances passed through a local invocation can be shared by the client and component, and that the called component must be hosted in the same server process as the calling component since Local interfaces are not location transparent.

"About Enterprise JavaBeans components", "EJB local references" in EAServer Programmer's Guide Load Options The com.sybase.jaguar.component.load property tells the server when to call ejbLoad. It can be one of these values:
  • BeforeInvoke: before calling each business method
  • BeforeRemove: before calling ejbRemove
  • AfterBegin: (default) at the beginning of a transaction. This option may provide the best performance.
"Repository Properties Reference" in EAServer System Administration Guide Reduce ejbStore invocations

For best performance, set the Read Only property for all methods that do not modify data. As a result, he components ejbStore or ctsStore method is not invoked after the business method returns.

In addition, if you are updating multiple fields, call the entity bean from session bean with the transaction open, then do multiple sets in entity bean, so only one ejbStore will occur instead of being called for each set.

"Component-managed entity persistence" in EAServer Programmer's Guide Entity object and query caching

EAServer supports object and query caching for EJB entity beans and entity components that use automatic persistence. Caching can improve performance by minimizing the number of database select queries required for load, finder, and select operations. Performance gains may range from 1.5 to 2 times faster for applications where most transactions are updates, and from 3 to 30 times faster for applications where most transactions are read-only.

Object Caching is off by default and can be turned on for all Components and their finder methods that use Automatic Persistence.

To further optimize performance, you can;

  • turn on Query Caching if there are Entity Beans that have finder and ejbSelect methods
  • set up database change notification so that updates and deletes do not invalidate the cache
  • use named caches to tailor the cache sizes for individual components or a group of components.

    Object Caching is implemented in C++ by the CtsComponents/ObjectCache component.
    If for any reason you want to change the operating characteristics of the ObjectCache component, you can implement the CtsComponents/ObjectCache interface and employ that as your object caching mechanism instead. Ideally, cache managers should be coded in C++ to avoid the overhead of Java garbage collection.

  • "Managing Persistent Component State" in the EAServer Programmer's Guide Timestamps in Automatic persistence

    For entity components that use automatic persistence, using timestamps for concurrency control yields the best performance in most cases.

    In optimistic concurrency control, use of the timestamp reduces unnecessary database read operations for tables with many columns or large column values (such as Sybase text or image columns).

    "Entity object and query caching", "Configure concurrency control" in EAServer Programmer's Guide Entity Bean Relationships EAServer uses relationship components to manage relationships between EJB 2.0 CMP entity beans. The tables represented by related components must be related in the database. To maintain the relationships, foreign keys offer better performance than

    上一页  [1] [2] [3] [4] [5] [6] [7] [8]  下一页


    [SyBase]用Sybase EAServer建立电子影院售票系统  [SyBase]Index & Performance
    [SyBase]Optimizing SQL Anywhere performance over a WAN  [ORACLE]ORACLE PERFORMANCE SQL TUNING
    [ORACLE]Oracle Tuning (Oracle 性能调整)的一些总结  
    教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Sql Server  · MySql
    · Access  · ORACLE
    · SyBase  · 其他
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台