Read an Excerpt
Chapter 4: OAS Configuration and Tuning
When I wrote my original outline for this book, I estimated that this chapter would be about 30 pages. I never imagined that I could write an entire book on OAS configuration, management, and tuning. To obtain the short answer in tuning OAS, read the first section of this chapter.The configuration of OAS can be the success factor for your site. Why, you might ask? If OAS is not configured correctly, you are likely to run into problems. Problems with performance are the primary potential issues, but intermittent errors and security risks could be others. Because performance of OAS is a factor in the success of most projects, this chapter will address not only the configuration of OAS but also how to configure OAS to retrieve the best overall performance. Chapter 2 provides the steps for a complete OAS installation, which should be completed prior to the steps in this chapter. The goal of this chapter is to discuss the configuration specifics once you have installed OAS and designed your application (Chapter 3). The components that require configuration are the Listeners (Chapter 8), the cartridges (discussed in a number of chapters, such as Chapters 14 and 17-21, which cover the PL/SQL, Forms, Reports, Java, Perl, and LiveHTML cartridges), applications, nodes, DADs, authentication services or security (Chapter 15), and the Logger (Chapter 26).
The following are three ways to categorize performance relating to the processing of Hypertext Transfer Protocol (HTTP) and Internet Inter-ORB Protocol (IIOP) requests. This chapter addresses the following performance categories:
- Request latency The time processing a request.
- Request throughput The number of requests processed per unit of time.
- Scalability The capability to handle increasing numbers of requests without adversely affecting latency and throughput.
In this chapter, the following topics will be covered:
- Jumping straight to the short tuning answer
- Analyzing and tuning performance
- Administering OAS processes
- Managing Listeners
- Configuring applications and cartridges
- Managing and configuring database access descriptors (DADs)
- Adding miscellaneous OAS objects
(1)Jumping Straight to the Short Tuning Answer If you prefer to read the short answer rather than reading the entire chapter, this section summarizes the major points of configuration for optimum performance and security. Because it is difficult to summarize an entire chapter into one section, it is highly recommended that you read the entire chapter. If you do not have time, the following is the "Cliff Note" version:
- Size your hardware properly.
- At a minimum distribute OAS, database, and FTP onto individual servers.
- Hardware components should operate at no more than 75 percent to 80 percent of capacity.
- Use the OAS Monitor to monitor OAS usage.
- Use top, vmstat, netstat, sar, and ps to manage memory usage, paging, swapping, and TCP/IP parameters on UNIX.
- Use Task Manager and Performance Monitor to manage memory usage, paging, and swapping on NT.
- Set the operating system swap size to three times the physical memory.
- Use directio for maximum disk performance
- Set TCP/IP parameters per the hardware vendor's specification for a Web server.
- Obtain the latest operating system patches, especially those for TCP/IP.
- Collapse process model for memory usage; do not collapse process model for stability and failure recovery.
- Distribute the load across multiple nodes.
- Require that clients use HTTP 1.1.
- Use Multithreaded Server (MTS) for SQL*Net.
- Tune Cartridge Server, instance, and thread parameters.
- Tune specific cartridge parameters.
- Tune your SQL code.
- Monitor logs for errors.
- Keep logs small (1-5MB).
- Turn off DNS resolution.
- Set up autoredirection based on system hitting 80 percent.
- Minimize directory rescans.
- Read this entire chapter when you have the time.
TIP: This chapter will help you to become an experienced OAS Webmaster. Because the OAS Manager is entirely Web-based, you should consider hiring an outside consultant if you do not have time to learn the intricacies of OAS configuration. An experienced OAS Webmaster can make an amazing difference in the performance and stability of your Web site.
(1)Analyzing and Tuning Performance You can use the OAS Manager to analyze performance, including process CPU and memory usage and connection and request statistics. A number of other ways exist to monitor the performance of your applications, servers, and sites. The following sections cover the general tuning items.
(2)Reviewing Hardware Recommendations In addition to the following general recommendations, make sure your hardware resources are adequate for the requirements of your specific applications. To avoid hardware-related performance bottlenecks, each hardware component should operate at no more than 75 percent to 80 percent of capacity. In the beginning of a system's life, the 80 percent of capacity rule is common sense, but is often forgotten once the application goes into production. Loading the last 20 percent of the system is what can cause the worst of performance problems.
The following is the absolute minimum hardware configuration for most OAS deployments on the Sun Solaris platform:
- Sun UltraSparc II at 168MHz or Pentium Pro at 200MHz
- 128MB of memory
- 0.5GB of disk space
- 100-Mbps network connection
Processor and memory resources should be more than adequate to handle the maximum traffic your network connections can handle. If your network becomes a bottleneck, you can upgrade to faster network interface cards, or install multiple network interface cards on each machine.
(2)Using the OAS Monitor By selecting an object and clicking the Monitor icon, shown to the left, you can monitor an OAS object. For example, if you select a specific site (or you can select all sites) and click the Monitor icon, a browser window similar to the OAS Monitor form shown in Figure 4-1 will appear. Each of the named objects is displayed as a hyperlink. By clicking the link, further detailed information about the OAS object will appear. To reload the page, click the Reload icon, shown to the left...