slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
EAS301 - EAServer Tips and Tricks PowerPoint Presentation
Download Presentation
EAS301 - EAServer Tips and Tricks

Loading in 2 Seconds...

play fullscreen
1 / 55

EAS301 - EAServer Tips and Tricks - PowerPoint PPT Presentation

  • Uploaded on

EAS301 - EAServer Tips and Tricks. Scott McReynolds OEM/Solutions Engineering Manager e-Business Agenda. Tuning Tricks Design Tricks Troubleshooting Tricks. OS Settings. Some settings must be made on the OS to improve performance.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'EAS301 - EAServer Tips and Tricks' - bertha-reid

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

EAS301 - EAServer Tips and Tricks

  • Scott McReynolds
    • OEM/Solutions Engineering Manager
    • e-Business
  • Tuning Tricks
  • Design Tricks
  • Troubleshooting Tricks
os settings
OS Settings
  • Some settings must be made on the OS to improve performance.
    • Avoid "connection refused" errors by clients
    • ndd command deals with tcp/ip internet protocals
      • ndd -get /dev/tcp tcp_conn_req_max_q
      • ndd -get /dev/tcp tcp_conn_req_max_q0
    • Should be set to at least 1024
      • ndd -set /dev/tcp tcp_conn_req_max_q 1024
      • ndd -set /dev/tcp tcp_conn_req_max_q0 1024
    • No reboot is required after setting the command
os settings1
OS Settings
  • Increase the number of allowable open files.
    • Can cause refused connections or increased wait time.
    • Edit the /etc/system file
      • set rlim_fd_cur=4096
      • set rlim_fd_max=4096
    • Reboot is required
flow control
Flow Control
  • Flow control means limiting the number of threads that can do real works at the same time.
  • Handler threads are competing with each other for resources and creating traffic jams and eventually the response time of each thread degrades to an unaccepted degree.


flow control1
Flow Control

  • Indicate if HTTP requests are subjected to flow control

  • A positive integer, to indicate the maximum number of concurrent execution threads allowed at one time.


  • Indicate if IIOP requests are subjected to flow control

NOTE: Deadlock situation under some client applications when IIOP is under flow control.

  • Log4J Integration
  • The built-in EAS subsystem:
    • The ability to configure log levels
    • Messages below a specified level of severity are discarded.
    • Support for different logging configurations in the debug and production servers.
    • Optional archiving and compression of previous log file versions.
    • More control over message formatting.
lightweight ejb container
Lightweight EJB Container
  • Improves Performance for EJB -> EJB Communications.
  • Default for Server.

  • Component level Property.

  • EAServer activates the lightweight container for EJB-to-EJB calls as long as all of the following are true:
    • The LWC is enabled for the server and the called (target) component.
    • The calling (source) component uses an EJB reference or EJB local reference to make the call.
    • The LWC is compatible with the transaction and security properties of the calling (source) and called (target) components.
    • The LWC cannot be forced to activate.
  • Significant performance improvement with "Required" or "Requires New".
  • Object references cannot be marshalled.
connection cache settings
Connection Cache Settings

  • maximum number of connections kept open in the cache.

  • minimum number of connections kept open in the cache.

  • connections that can be allocated before determining whether to wait for a connection.
  • A value of 0 indicates that new connections should be opened whenever they are required.
  • If the number of open connections is greater than the value of poolsize.maxthe excess connections are not returned to the pool.

  • Specifies whether to wait for a connection.
ejb cmp cache
  • Drivers to improve overall performance of CMP EJBs
    • Allowing updates to be deferred to the end of each transaction and sent together as a command batch..
    • Reducing network round trips between the database server and EAServer.
    • Supports automatic creation of semi-temporary stored procedures.
  • Sybase Driver : com.sybase.ejb.cmp.SybaseDriver
  • Oracle Driver: com.sybase.ejb.cmp.OracleDriver
  • Lots of new Parms.. Check the documentation
purpose of caching
Purpose of Caching
  • EJB.
    • Improve performance by avoiding the loading of instance state at the start of each transaction.
  • Servlet/JSP.
    • Allows Servlet and JSP content to be cached by the server.
    • Drastically improves speed at which content is served to the user.
    • Initial benchmarks show over 60 X increase.
    • Caching is based on 7 different key parameters and a timeout parameter.
    • The response data (a byte array) and all the response headers are saved in the cache.
    • The cache is not persistent, and is not synchronized among servers in a cluster.
benefits of object cache
Benefits of Object Cache
  • For update transactions, may be able to avoid any SQL “select” statements, while still having to execute a SQL “update” statement.
  • For read-only transactions, may be able to entirely avoid the execution of SQL statements.
  • For CMP entity finder methods that return collections, may be able to run one query instead of N+1 queries for finders returning a collection containing N entities.
performance gain depends on
Performance Gain Depends On
  • Frequency of re-use of objects with same key,e.g. how often does a new transaction use the same entity as a previous transaction for which an entry is still present in the object cache.
  • Ratio of update to read-only transactions.
  • Size of data set (e.g. database table).
  • Size of object cache.
  • Configured timeout for cache entries.
cache options simple cache
Cache Options/Simple Cache
  • Implement Java side Servlet cache which will cache outputs of Servlet/JSP in java core memory.
  • Fast response for Servlets or JSPs that the output will not be changed during the timeout period.

  • Default is false

  • Keep - If request includes session id, we'll try to get the session.
  • Create - If request includes session, we'll try to get the session.
  • No - Do not check or return "Set-Cookie" session header.
cache options simple caching continued
Cache Options/Simple Caching - Continued

  • The value is the number of K bytes indicates the limit of the content size.
    • Default is 8k
    • Limit – 100

  • The timeout in seconds.
    • Default 60
    • <= 0 means never expired.
cache options cache architecture
Cache Options/Cache Architecture
  • Interface CtsComponents::ObjectCache (basic operations: find, get, put, remove)
  • Component CtsComponents/ObjectCache (built-in implementation)
  • Configurable – each entity/stateful component can have its own cache configuration. Caching is disabled by default.
  • Pluggable - partners and end users can write their own cache implementations (components).
cache options objectcache component
Cache Options / ObjectCache Component
  • Built-in component is implemented in C++ for
  • two reasons:
    • Maximum performance
    • Cache data is not visible to Java VM garbage collector. This allows extremely large caches,e.g. 500Mb.
  • Cache implementations must use C++ or Java (requires the use of the “Bind Object” option).
role of dispatcher
Role of Dispatcher
  • Before xxxFindByPrimaryKey converts instance key to binary form and calls ‘find’ on cache.
  • Before xxxLoad converts instance key to binary form and calls ‘get’ on cache.
  • After xxxCreate/xxxStore converts instance key & state to binary form and calls ‘put’ on cache.
  • After xxxRemove converts instance key to binary form and calls ‘remove’ on cache.
transaction consistency for update transactions
Transaction Consistency (for update transactions)
  • Cache ‘put’ and ‘remove’ calls are only made after successful transaction completion, i.e. we never place uncommitted data in the cache.
  • Should be combined with optimistic concurrency control (OCC) - the default behaviour with Automatic Persistent State (CMP).
transaction consistency for read only transactions
Transaction Consistency (for read-only transactions)
  • Stale cache entries can cause problems for read-only transactions, which have no way to detect that they have used stale data. This can be handled:
    • By configuring Cache Timeout.
    • By configuring Cache Synchronization.
    • By arranging to be notified when updates are made to the underlying data, e.g. database trigger notifies cache to flush one or more entries.
component settings
Component Settings
  • CMP Performance Settings
    • When to load data from the database within a transaction

    • By default beforeInvoke, beforeRemove
    • When to store data to the database within a transaction

    • By default afterCreate, afterInvoke
component settings cmp settings continued
Component Settings/CMP Settings (Continued)
  • To reduce load and stores

  • Change to afterBegin to do loads only after a begin transaction

  • Change to beforeComplete to only do stores before the completion of a transaction
component settings ejb settings
Component Settings/EJB Settings
  • Use local interface instead of remote interface
    • Causes less marshalling
    • Parms are passed by reference instead of by copy
component settings pb components
Component Settings/PB Components
  • Deployment of PB Components creates

%JAGUAR%   Repository      Component         <Package Name>            <Component Name>.props            <Component Name>               C<n>                  <one or more PBDs implementing component>

component settings pb components1
Component Settings/PB Components
  • Sharing Class Group Loaders
    • Has a value of $PBD1.PBD;$PBD2.PBD;$PBD3.PBD;...
    • A unique instance of a class group loader is assigned to each distinct occurrence of a library list
    • The default will cause a unique library list for each PB component deployed because of the substitution that occurs
component settings pb components2
Component Settings/PB Components
  • Sharing class group loaders - solution.
    • Include all PBLs containing the NVOs that are sharing resources in a single, combined library list.
    • Deploy each component as you normally just ensure you use the same deployment options in terms of PBL consolidation.
    • Use jaguar manager to modify the com.Sybase.Jaguar.Component.pb.librarylist property in the properties file of each component to be the exact same list by referencing a fully qualified path to the constituent PBDs.
    • Refresh the components.
    • Backup the changes to the components' properties files.
web application settings
Web Application Settings
  • Increase Listener settings
    • It must be greater than the number of iterations of each client will run avoid unnecessary close of socket– key when doing stress testing.
    • If set to low can cause invalid server response
  • JSP Settings
    • Do not check if the JSP is outdated or not
web application settings1
Web Application Settings
  • Turn off HTTP logging
    • Done via Jaguar Manager
  • Insure the number of threads is set correctly
    • Do not check if the JSP is outdated or not

web application settings2
Web Application Settings
  • Turn on HTTP cache
    • Done via Jaguar Manager

  • Saves static HTML information
    • Pages
    • Images
    • Etc.
partial page caching
Partial page caching
  • Partial page caching allows you to cache parts of a response.
  • Supported by a tag library for use in JSPs, and a public API for use in servlets.
  • Uses CacehTags.jar

<%@ taglib uri="" prefix="ct"%>

  • To cache a portion of a page, surround it with this tag, as in:

<ct:cache attributes>

... page content ...


  • The API is implemented by class CacheManager
    • Create
    • Retrieve
    • Places Data in Cache
    • Flush
  • Tuning Tricks
  • Design Tricks
  • Troubleshooting Tricks
design issues
Design Issues
  • No pooling objects
    • Programmatic pooling is available for objects implementing the COM ObjectControl or EJB 0.4 ServerBean interface.
      • canBePooled for PB/COM
      • canReuse for CORBA objects
      • Called if the pooled flag is not set.
    • Declarative pooling is available via “Pooling” check-box in Component Properties.
    • Stateful components cannot be pooled
    • A min and max pooling value can be set to help manage memory.
design issues1
Design Issues
  • Develop small components
    • one ancestor object gets inherited and code specific logic
    • Most components can be developed with two pbls
  • Keep library list small.
    • Publish one component per application.
    • This keeps the size of the component down
  • Create all datastores in the components constructor event and initialize the dataobject.
design issues2
Design Issues
  • Don’t over design too many inter-component calls kill performance and take up too many resources.
  • Only use PB components for shared components if it is not called from other components or if it’s meant to synchronize the calls.
  • Don’t use PB components as services if the component will run in a loop.
design issues3
Design Issues
  • Single Threading of objects
    • Concurrency not enabled
      • More copies needed then necessary
      • In PB, the PBD is locked during execution
  • SQL Issues
    • Using Large ResultsSets
      • Take lots of memory possibility 2 copies of used with TabularResults.ResultSet
      • Conversion could require processing and looping of entire ResultSet
design issues4
Design Issues
  • Untuned SQL
    • Slow Performance of the SQL within the DB
  • Mis-use of the connection caches
    • Not returning connections to the cache
      • Causes more JCM_FORCE connections
    • Use of JCM Wait
      • Makes client think the server is hung
  • Lots of I/O to the log
    • Provide a switch that will turn debugging on/off
    • Write to the log via the MessageService
      • Time delay in when it is written to the log.
  • Tuning Tricks
  • Design Tricks
  • Troubleshooting Tricks
how to get the versions
How to Get the Versions
  • PB Version
    • Windows:
      • GetFileVersionInfo window API. See for the white paper
    • Solaris:
      • strings $JAGUAR/lib/ | grep Version
  • Turn on the verbose mode
    • Shows all of the classes that are loaded and when.
what is the log telling me
What Is the Log Telling Me
  • Starting Listeners

Listener # 1: TestServer_iiop: Active: yes Protocol: 'IIOP': 'localhost',9000 Security Profile: '*NONE*'

Jul 16 17:01:48 2002: Listener # 2: TestServer_http: Active: yes Protocol: 'HTTP': 'localhost',80 Security Profile: '*NONE*'

Listener File Name - TestServer_iiop

Protocol - IIOP

Machine Name - localhost

Port - 9000

what is the log telling me1
What Is the Log Telling Me
  • Start processes
    • Code set being used
      • Server's native codeset is iso_1
    • Java Library to use. Important for NT service
      • Library: 'libjjdk12.dll' for component type 'java'
    • JIT Compiler Option turned on
      • Java JIT Compiler enabled
    • Debug option turned on/off
      • Java component debugging disabled
    • JVM version
      • Java virtual machine initialized (version 10002)
    • Repository Location
      • Repository:C:\Program Files\Sybase\Jaguar CTS 3.5\Repository
what is the log telling me2
What Is the Log Telling Me
  • Other Processes
    • Jaguar IP address that is being used.
      • Host IP:
    • The URL for the name server
      • NameServiceURL: iiop://0:0
    • Timeout for
      • PermissionCache: Authorization cache timeout: 120 minutes
    • Starting EAServer Standard Services
      • Starting Services...
      • Started: Jaguar/Repository
      • Started: Jaguar/GarbageCollector
      • Started: Jaguar/JCM
      • Starting Jaguar Naming Services...
      • Started: CosNaming/NamingContext
      • Started: JaguarServlet/ServletService
what is the log telling me3
What Is the Log Telling Me
  • Other Processes (continued)

Executing the run method of the services

      • Running: services...
      • Running: CosNaming/NamingContext
      • Running: Jaguar/GarbageCollector
      • Running: JaguarServlet/ServletService

Name Services binding complete

      • Stopped: CosNaming/NamingContext

Setting Quality of Protection

      • Authentication timeout period is 3600 seconds.
      • Note: authentication timeout can be disabled.
      • Authentication lockout period is 600 seconds.
      • Note: authentication lockout can be disabled.
generating a java stack trace
Generating a Java Stack Trace
  • When java components (EJB or CORBA) have errors it is good practice to create stack traces.
    • Done in the catch block
      • } catch (Exception e) {

System.out.println (e.toString());


      • }
generating a java stack trace1
Generating a Java Stack Trace
  • The output is

java.lang.NoSuchMethodError: powersoft.powerj.db.Transaction: method setRegisterName(Z)V not found

at surfsidevideo.CleanupServiceImpl.create (

at (

at surfsidevideo._sk_SurfSideVideoPJ_CleanupService.invoke (

reading a java stack trace
Reading a Java Stack Trace
  • Error Message
    • java.lang.NoSuchMethodError:
  • Offending class/method
    • powersoft.powerj.db.Transaction: method setRegisterName
  • It Occurred at:
    • surfsidevideo.CleanupServiceImpl.create
  • In class
    • CleanupServiceImpl
  • At line 26
  • The rest is where what called the class that failed
how to get additional information
How to Get Additional Information
  • Getting the IIOP stack
    • Tells all of the IIOP information that is sent and used by the server
    • Client application issues, such as login failures
    • Component issues:
      • Method invocation errors
      • Result sets not returned as expected
      • Trouble connecting to the target database
      • Intercomponent call errors
    • Warning: This will create a LOT of output. Don’t leave on except for a short time.
is there a way to recover
Is There a Way to Recover
  • JagRepair
    • Read only version of the server
    • Allows you to make configuration changes that may be causing the server to crash (OTS, Connection Cache, Service Components, etc.)
    • How do I start it
      • Serverstart –servername JagRepair
    • How do I connect to it?
      • UserName: jagadmin
      • Hostname: localhost
      • Port Number: 9000
intercomponent calls
Intercomponent Calls
  • Naming Conventions
    • Proxy vs. Object Name
      • Always name the component something OTHER then the NVO name
      • Reduces confusion within the PBVM
      • May cause varying things to occur
  • Intercomponent Calls
    • Calling NVO should only access proxy
    • Compile into separate libraries
    • Name the Proxy different then the Object
html datawindow
HTML DataWindow
  • Always use the JavaScript files
    • Reduces the download of the page
  • Make the DataWindow updateable
    • The Dataobject must be updateable
    • For External DataWindow define the table as dummy
  • client side scripting
    • column must be on the dataobject
    • must have a tab order greater then zero
    • Not Visible
      • Define a visible expression to make column invisible at runtime
      • For example, set the visible property expression to 0
  • Pass the browser as an argument
    • HTML DataWindow get generate the best-looking view of your dataobject
html datawindow continued
HTML DataWindow (Continued)
  • To validate the DataWindow
    • User the HTMLContextApplied event
      • Validates the data before the action is applied
    • Use a user-defined button
      • Causes the client side script to pass the context and action to your component
      • You can call SetHTMLAction
        • which will apply the context
        • it does not know what the action is so it will be ignored
      • After calling SetHTMLAction
        • datastore contains all inserted data, modified and deleted rows
        • Then validate and perform action
jdk issues
JDK Issues
  • Some APIs require certain JDKs
    • All J2EE 1.2 API require JDK 1.2 or higher
    • Example
      • Getting a connection cache for a javax.sql.DataSource and using a 1.1 connect cache name.
  • Deployment of 1.3 objects
    • XML Descriptors for 1.3 objects will not deploy because of the DTD at the start of the file.
      • <!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN' ''>
  • Used by EAServer to find and load object
    • java.classes property
    • Found in:
      • Servers (4.0)
      • Packages
      • Components
      • Connectors
      • Servlet
      • Web Application
    • Defines the classes that are required to load a particular object
    • Defines the jar file(s) that are needed (in addition to the bootclasspath) for finding classes
classloader issues
ClassLoader Issues
  • When comparing classes they need to be loaded at the same level
    • Example
      • ServletA creates object Foo
      • EJB_A creates object Foo
      • ServletA passes it’s Foo to EJB_A as a parm. EJB_A tries to use Foo from ServletA
    • Resolution: Have the server class loader load Foo
debug flags
Debug Flags
  • Most functionality in the server has a debug flag
    • Documented and undocumented
    • Examples
    • Will impact performance