Title: E135 EAServer Goes to the Races: Performance Testing, Tuning, and Tweaking for Speed and Endurance
1E135 EAServer Goes to the Races Performance
Testing, Tuning, and Tweaking for Speed and
Endurance
- Karen Hartley
- Nomad Development, Inc.
- Khartley_at_NomadDev.com
2Agenda
- Examining Performance
- What are the best tools?
- Limitations of Component Generation
- Streamlining the Architecture
- Boosting Performance
3Performance What is it?
- Performance
- In system testing, this generally refers to the
ability of a system to meet the requirements
defined prior to testing. - Systems are usually said to exhibit good or poor
performance, depending on what criteria are used
to measure that performance. - Performance can be expressed in terms of
- Concurrent users
- Transactions per day
- Average response time
- Any other measure of speed
4The Starting Gate
- Why are we here? How did we get here?
- EAServer applications are in place
- Component-based design
- 3 tier?
- Based upon a framework?
Business Logic
Presentation
Data Access
5The Starting Gate
- Why are we here? How did we get here?
- EAServer applications are in place
- gtUsage is growing
- gtPerformance may be suffering
- EAServer limitations?
- Design Issues?
Usage
Performance
6The Starting Gate
- Why are we here? Why should we spend the time
and money to tweak and tune? - Customers who encounter a smooth, error-free
online experience are significantly more likely
to engage in repeat transactions - Lower-than-average performance means that they
will find a site with higher performance - By pinpointing performance bottlenecks and
differentiating between software-and
hardware-based problems, testing and monitoring
solutions allow the highest possible productivity
from existing equipment, bandwidth and personnel
7Examining Performance - Tools
- What are we looking for?
- Problem Components
- When performance problems are found, you need the
tools to quickly identify the component(s) at
fault in order to implement a timely and
effective remedy. - Architecture/Design Issues
- Settings and Standards that could be modified?
- How do pooling, caching, and component types
change testing results?
8Testing Tools Load Testing
- Load Testing will demonstrate the effects of
increasing the number of users and therefore the
number of components instantiated/activated
within a system - What are your options?
- Mercury Interactive LoadRunner, Astra LoadTest
- Rational - Quantify
- Segue - SilkPerformer
- Empirix e-Load
- Compuware QA Center Performance Edition
- RadView Webload Resource Manager
- Cyrano - OpenSTA
- Others
9Testing Tools Load Testing
- Lets look at some examples of what these tools
can do for you - Benefits?
- Pitfalls?
- Limitations?
10Testing with EAServers Monitors
- Build your own component test bed
- You can then use EAServers monitoring tools to
examine and tune your component performance - Changes can be made and tested concerning
- Connection Caches
- Instance Pools
- Property Settings
- For Example
- 1) One pool, more StateFull instances -gt Jaguar
crashes at about 2000 instances (-gt 2000
threads)2) More pools, one StateLess instance
per pool-gt Jaguar crashes at about 200 instances
(-gt 200 threads)
11Testing What can you learn?
- Memory utilization Check for memory leaks on
the application processes and JVM memory usage if
using a system designed around Java - CPU High CPU can be an indicator of a
well-designed system working very hard or a
poorly designed system trying to work but being
limited by other problems. - Connection pool Watch the pool of connections
to the database and verify they are being used
correctly (released, reused). - Queue Watch the queue. When requests start to
queue, you have hit a bottleneck. - Queue wait time A queue is acceptable, as long
as the wait time in the queue is not excessive. - Disk IO Verify that disk access is fast.
12Architecture and Design Issues Streamlining for
Better Performance
- Now that weve got some information on
performance, lets look at areas for improvement - First Lets take a look at your architecture
- How many are using frameworks?
- May have gotten into the mode of creating a
Component for each - Interface Object
- Business Object
- Data Access Object
13Framework Architecture Component Overload?
- Select a customer from a list, pull up one of
their orders - Component for the customer list (interface)
- Component for the customer business object
- Component for the actual data access to the
customer - Component for the data access of the order
- Component for the orders business object
- Component for the display of the order
(interface) - Misc other framework/support components
- What are the ramifications? How can this be
simplified?
14Component Overload Reversal
- Consider changing components to NVOs
- Do all of your objects inherit from COMPONENT
ancestors? - Lets talk through an example Interface objects
- Many are called up a via a director or factory,
returning their output to a JSP - Change their ancestor to an NVO may greatly
reduce components, no change in app structure or
code (other than call to instantiate)
15Component Overload Reversal
- Consider denormalizing the Business and Data
Access Layers - How often does the business object merely pass
along a get_data call to the data access layer? - Consider combining the access of simple data into
the business object - If the business object instantiates multiple data
access components, consider combining those
components into one - Can other simplifications or mergers be made?
16Component Overload Reversal Why?
- Lets look at what happens when a component
instance is loaded to see why reduction helps - When a component is loaded by the PBVM, the PB
classes are loaded from the PBDs specified in the
com.sybase.jaguar.component.pb.librarylist
property. - Within the PBVM, a class group loader is
responsible for accessing the PBDs and loading
the appropriate PB class definitions to execute
the business logic within a component. Those
definitions consist of - The virtual function table for the class
- The list of the prototypes for the functions and
events defined in the class - The p-codes for each routine defined in the class
17Component Overload Reversal Why?
- Component instance loading continued
- gtThe symbol tables, which contain information
about the variables of the class including shared
variables, instance variables, and local
variables - The instance image, which is the blueprint for
creating instances of a PowerBuilder class - The constant pools, which contain literal values
used explicitly within the PowerScript code as
well as function names, variable names, and
argument names
18Component Overload Reversal Why?
- In addition, a unique instance of a class group
loader is assigned to each distinct occurrence of
a library list. - This means that multiple instances of a single
component will share the resources loaded for
that component's definition because each instance
of a component shares the same library list. - Different components require different class
group loaders. - The com.sybase.jaguar.component.pb.librarylist
property of those components will differ - the
resolution of the in the property will point to
different subdirectories within the Repository
19Component Overload What else can be done?
- Sharing Class Group Loaders
- The instantiation of a class group loader is tied
to the uniqueness of a component's library list - Modify the com.sybase.jaguar.component.pb.libraryl
ist property of the affected components. (This
technique may help noticeably with component
frameworks or components that share many common
objects, such as 'helper' NVOs.) - Include all PBLs containing the NVOs that are
sharing resources in a single, combined library
list. - Place all of the component NVOs into the same PBL
and target, or - Modify the library lists of each component target
to essentially be the concatenation of all the
PBL(s) used to implement each individual
component.
20Component Overload What else can be done?
- Sharing Class Group Loaders continued
- Deploy each component normally from the PB
project painter - Ensure that the exact same deployment options in
terms of PBL consolidation are specified on the
Libraries tab of the EAServer Component Generator
(deployment project properties) dialog for each
project used to deploy these components.
21Component Overload What else can be done?
- Sharing Class Group Loaders continued
- After deployment 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 - Ensure that the designator is explicitly
converted to a full path. - Point to the PBDs within the Repository for one
of the deployments, or - Copy the PBDs elsewhere. If you do not qualify
the path to the PBDs, the Windows PATH will be
searched for those files.
22Component Overload What else can be done?
- Sharing Class Group Loaders continued
- Use Jaguar Manager to refresh the components for
which you made property file modifications. - Backup the changes to the components' properties
files, because each new deployment from the PB
development environment will overwrite your
changes to the com.sybase.jaguar.component.pb.libr
arylist property.
23Component Overload What else can be done?
- Sharing Class Group Loaders continued
- Use Jaguar Manager to refresh the components for
which you made property file modifications. - Backup the changes to the components' properties
files, because each new deployment from the PB
development environment will overwrite your
changes to the com.sybase.jaguar.component.pb.libr
arylist property.
24What else can be tuned?
- Connection Caches
- As you test, do you see an increasing number of
connections? - This may point to a problem in the way you are
handling transactional behavior. - EAServer appears to think those connections are
still part of an outstanding transaction - A new request will always give you a new
connection. - This combined with the default setting of
JAG_CM_FORCE for PowerBuilder's
GetConnectionOption, could result in a larger
number of active connections than allowed by the
cache.
25What else can be tuned?
- Connection Caches Continued
- Examine the transactional semantics of your
components - Make sure that you are disconnecting every
connection at the appropriate point in a
component's lifecycle
26What else can be tuned?
- Instance Limitations
- EAServer 4.0 allows for a limit to be placed on
the number of active instances of a component. - You can also specify a maximum wait time (time to
wait for an instance to become available). - If the maximum number is hit, the constructor
throws an exception - The client or factory should catch and can retry.
27Examples, Questions, and Additional Information
- Questions?
- For a copy of the latest version of these slides,
demos, etc. please visit - www.NomadDev.com