Chapter 10 Achieving Optimum Performance with PowerDynamo


Performance requirements

PowerDynamo includes features that have been specially designed to make the creation and optimization of high volume Web sites practically effortless.

Dynamo Web sites that are designed without thought to performance or site specifications generally experience a slow down due to one or all of the following reasons:

Processing of scripts

Web sites that are required to support large volumes of traffic must contain documents that have been created with the criterion of the Web site in mind.

As a general rule, a Web document should take no longer to execute than the time between requests to the Web site. For example, if a Web site has an average of one request every three seconds, each Web document should be written so that no document takes longer than three seconds to execute from start to finish.

Note  

The ideal script design
This section describes the ideal design where each script is the only request being processed at any time. In reality, multiple requests will arrive for processing by the Web site. PowerDynamo's multithreaded architecture allows for efficient processing of these scripts.

If only one Web document is being executed by PowerDynamo, 100% of Dynamo's CPU time may be available for the processing of that document. This results in the shortest possible execution time of a document. When two or more documents are being processed concurrently, CPU time is shared. The sharing of CPU time increases the time required to complete the request. If the average volume of requests is once every two seconds and the average document takes three seconds to execute, a backlog is created as each subsequent request takes longer to execute.

Figure 10-1 illustrates how the length of time required to execute a script increases as the load on the Web server increases.

Figure 10-1: Relationship between load and processing time

For more information on minimizing the processing time of your scripts, see "Writing cacheable documents" and "Scheduling your scripts".

For more information about running PowerDynamo on a multiple processor system, see "Load balancing".

Minimizing the calls to the database

Yet another cause for performance degradation is the time required to execute queries against the database. PowerDynamo does not have control over the time required to issue a query, but it does provide ways to control the number of times a database is accessed.

Setting an efficient document cache size as well as defining cachedOutputTimeOut values where appropriate can significantly minimize the number of calls to a database. Further improvements can be made to the efficiency of a Web site by scheduling certain documents to execute on a special time frame.

If you do not optimize scripts and minimize database calls when you create a high-volume Web site, you may experience the time lag demonstrated in the first time line in Figure 10-2.

Figure 10-2: Optimizing scripts

For more information about minimizing calls to your database, see "Optimizing your document cache".

Working with Connections to increase performance

The third most common cause of performance degradation is the creation and use of connections within a Web site. Connections are the link between users and the information that they request from a Web site. Each time a user makes a request to a dynamic Web site, connections are created. Creating connections, while necessary, requires costly processing time.

With minimal effort from the Web author, PowerDynamo is able to optimize its connections and work with them in such a way that required processing time for creating connections need not be an issue to the performance of the Web site.

For more information about working with connections, please see "Working with connections".

 


Copyright © 1999 Sybase, Inc. All rights reserved.