YOUR FEEDBACK
Two great PDF creators
Michael Jahn wrote: related to the snapscan - are their an samples of the ...
SOA World Conference
Virtualization Conference
$50 Savings Expire May 23, 2008... – Register Today!


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
POWERBUILDER LINKS YOU MUST CLICK ON


The Lost Art of Performance

Digg This!

Page 1 of 2   next page »

I have been spending a lot of time at a particular client of mine lately addressing stability and performance issues on a particular Web-based PowerBuilder application. After identifying many issues with the application system, I'm pleased to report an exponential gain in both the stability and, in particular, identified performance.

This started me thinking about the various projects that I have been working on over the past five years - with a subsequent amount of the same issues as the ones I have just been addressing. Many of my friends and fellow developers using similar application development tools (like Java, VB, Delphi, C#, etc.) have also encountered many of the same intrinsic problems. The interesting theme throughout many of these projects though is how they fell into the stability and performance trap.

One of the things I have noticed over the past decade in the IT industry and in particular with our educational institutions is the lack of leadership in educating new developers in the "art" of performance in their application design. It seems like the emphasis has been more on how to complete a functional piece of code than how you might go about designing the same code segment for optimum performance. When the coding assignment works, the student is rewarded even though the stability and performance is dismal. I have often heard professors (and even current IT management) say, "Oh, that's okay, we can just throw some more hardware at the problem." Ouch, that really strikes a chord with me. Maybe it's because the first language I learned was "assembler" and the machines I used originally were 16, 32, and maybe if we were lucky 64K in memory size. Disk drives, readers, monitors, and networking were very slow compared to today's speeds. This forced us to really pay attention to code simplicity and utilizing as many CPU and I/O saving tricks as we could. With today's high-end hardware this attention to coding for performance is dramatically overlooked.

However, when you develop application systems that have extremely high transaction rates, large number of users, massive databases, etc. - you need to pay attention to designing for stability, performance, and recoverability. Today, I would recommend to all IT management that they first start their new developers off coding for the PocketPC. I had a real eye-opener a few years ago when I started coding with PocketBuilder on 200Mhz CPUs with 32M of memory. Wow, was that ever a "blast from the past" and brought back memories of how I used to code for performance. Using the Assembler language, PPE (Problem Program Evaluator) Analyzer, Capex Optimizer, structured programming (Nazi-Sneiderman), etc., tools really helped us in earlier decades develop applications that would "sizzle" on low-end hardware. The PocketPC really forces the developers to code for minimal I/O, CPU efficiency, screen control (painting operations), and database access in order to build applications that handheld users would accept. Just like the Internet today, if a person starts waiting consistently for more than five seconds, most likely they will leave your site and never return.

Once you learn the art of performance in designing applications that run on minimal hardware, these techniques become instinctive and can be applied to mission-critical applications that run on corporate high-end hardware. I'm speaking about applications that support thousands of concurrent user sessions, hundreds of logical business transactions per second, or complex database queries and updates on terabytes of data. A good lesson that I witnessed recently was the new Canada Old Age pension system that was rewritten in Java using a RDBMS that I shall leave unnamed. It concentrated on functional testing and only addressed the performance testing three months before production. Performance and stress testing, however, pointed out average transaction rates of 14-30 second response times and some transactions that were taking 10-14 minutes for a dialog to respond (yes, you read that right). All the development effort of the past two years went down the drain, as management was forced to "junk" the system. The only happy ending was the third rewrite of the application in PowerBuilder with an average of less than a two second response time with 4,500 concurrent users in the peak demand each day.

Why was the PowerBuilder rewrite so successful and what type of things should an application development team look for when designing high-volume systems for maximum performance? The following are items on a short critical success list that I would use to ensure that your next production application meets its mark:

  • Solicit developers who have experience in performance coding techniques.
  • Design for performance, stability, and recoverability early in your development project and make it part of your application's critical success factors. Agree to a basic service level for your transactions with the user and have the developers design and code to meet that mark.
  • Use the "Explain" feature of PB's database painter to locate troublesome SQL before you use it.
  • Try to make sure that any business transaction stays below a maximum of five I/Os (guideline). When you multiply the number of concurrent transactions times the average I/O, you can imagine the intense workload that you are imposing on the database server.
  • Optimize your database page size and table page ranges. Add indexes where needed.
  • Tune your database server for things like buffer sizes, network packet size, dispatch priority (O/S), RAID disk type, etc. You can also apply this to your application server as well.
  • Cache frequently used data in data stores or internal arrays. If you are using EAServer, increase your "Connection Cache" size.
  • Tune your JVM if you use applets, servlets, and/or JSP.
  • Grab pointers to other components and service objects once and hold them as long as you can in "instance" variables.
  • Use the "Application Profiling" feature of PowerBuilder to get a roadmap of your application's CPU and I/O usage.
  • Address the top 20% of your application performance bottlenecks first (law of "diminishing returns").
  • Use the SQLExpert product from Quest Software and also sold by Sybase to thoroughly tune your SQL. Note: You can download a bridging tool (SQLExtract) from CodeXchange to interface your DW's PBSelect statements to SQLExpert.
  • Use "hints" in your SQL statements where appropriate to your DBMS.
  • Stick to DBMS vendors that support "native" database drivers. Note: Microsoft's SQLServer no longer supports this feature. My timings on ODBC and OLE-DB find them still lacking way behind, especially the new ADO.NET, which offers another layer of slowness.
  • Use "binary" searching techniques instead of linear searches - even for the DataWindows' Find ( ) method. Binary searching can usually locate a given row in 3-4 operations, whereas linear searching a large buffer may take thousands of operations.


Page 1 of 2   next page »

About Chris Pollach
Chris Pollach is the president of Software Tool & Die Inc. (a consulting company based in Ottawa, Ontario, Canada) and has been using PB since November 1989 (version 0.8). When not developing in PB, Chris enjoys fishing and martial arts.

PBDJ LATEST STORIES . . .
3rd International Virtualization Conference & Expo: Themes & Topics
From Application Virtualization to Xen, a round-up of the virtualization themes & topics being discussed in NYC June 23-24, 2008 by the world-class speaker faculty at the 3rd International Virtualization Conference & Expo being held by SYS-CON Events in The Roosevelt Hotel, in midtown
The PB Future: More on Graphs in PowerBuilder 11.5
Last week I posted a screen shot of the new 3D Rendering capabilities being added to some of the 3D graphs in PowerBuilder 11.5. It was met with mixed reviews on the PowerBuilder Futures newsgroup (forums.sybase.com) so I went back to the drawing board to see what I could come up with.
BluePhoenix Expands Modernization Collaboration with Microsoft
BluePhoenix announced that it has expanded its collaboration with Microsoft on legacy modernization projects. The collaboration provides customers moving their applications or databases to .NET-based environments the best in both modernization services and technical support. BluePhoeni
Sybase PowerBuilder Delivers AJAX and .NET Enhancements Enabling Rich Internet Application Development
Sybase announced that AJAX development capabilities and further Microsoft .NET enhancements have been added to the latest version of Sybase PowerBuilder 11, the premier 4GL rapid application development (RAD) tool. PowerBuilder 11.2 represents another milestone in the PowerBuilder road
PowerBuilder 11.2 Released: Sybase's Flagship IDE
Sybase has released the production version of its flagship .NET development tool - PowerBuilder version 11.2. This latest release of its premier IDE for RAD includes not only standard fixes but also a good list of new features. Here is the 'Coles Notes' version of these new features.
PowerBuilder Takes You To .NET
In June of 2007, Sybase released PowerBuilder 11. PowerBuilder developers can now deploy PowerBuilder components as .NET Assemblies or as .NET Web Services. A PowerBuilder developer can now create these .NET resources so that those who develop .NET solutions can benefit from PowerBuild
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING POWERBUILDER / SYBASE NEWS
Sybase and Sun Set Guinness World Record for World's Largest Data Warehouse
Sybase, Inc. (NYSE:SY), the largest enterprise software and services company exclusively