1 / 27

Karen Hartley Nomad Development, Inc. Khartley@NomadDev

E135 EAServer Goes to the Races: Performance Testing, Tuning, and Tweaking for Speed and Endurance. Karen Hartley Nomad Development, Inc. Khartley@NomadDev.com. Agenda. Examining Performance What are the best tools? Limitations of Component Generation Streamlining the Architecture

lois
Download Presentation

Karen Hartley Nomad Development, Inc. Khartley@NomadDev

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E135 EAServer Goes to the Races: Performance Testing, Tuning, and Tweaking for Speed and Endurance • Karen Hartley • Nomad Development, Inc. • Khartley@NomadDev.com

  2. Agenda • Examining Performance • What are the best tools? • Limitations of Component Generation • Streamlining the Architecture • Boosting Performance

  3. Performance – 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

  4. Custom Commercial PB Foundation Classes The 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

  5. The Starting Gate Why are we here? How did we get here? EAServer applications are in place >Usage is growing >Performance may be suffering •EAServer limitations? •Design Issues? Usage Performance

  6. The 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

  7. Examining 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?

  8. Testing 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

  9. Testing Tools – Load Testing Let’s look at some examples of what these tools can do for you… • Benefits? • Pitfalls? • Limitations?

  10. Testing with EAServer’s Monitors Build your own component test bed You can then use EAServer’s 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 -> Jaguar crashes at about 2000 instances (-> 2000 threads)2) More pools, one StateLess instance per pool-> Jaguar crashes at about 200 instances (-> 200 threads)

  11. Testing – 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.

  12. Architecture and Design Issues – Streamlining for Better Performance Now that we’ve got some information on performance, let’s look at areas for improvement First – Let’s 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

  13. Framework 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 order’s business object • Component for the display of the order (interface) • Misc other framework/support components What are the ramifications? How can this be simplified?

  14. Component Overload Reversal Consider changing components to NVOs Do all of your objects inherit from COMPONENT ancestors? • Let’s 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)

  15. Component 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?

  16. Component Overload Reversal – Why? Let’s 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

  17. Component Overload Reversal – Why? Component instance loading continued: >The 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

  18. Component 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

  19. Component 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.librarylist 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.

  20. Component 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.

  21. Component 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.

  22. Component 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.librarylist property.

  23. Component 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.librarylist property.

  24. What 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.

  25. What 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

  26. What 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.

  27. Examples, Questions, and Additional Information Questions? For a copy of the latest version of these slides, demos, etc. please visit www.NomadDev.com

More Related