Abstract: This article discusses various deployment tips to optimize IBM DB2 on the Sun Fire T2000 server running the Solaris 10 1/06 Operating System (OS). Contents: Introduction
This article is for users planning to deploy DB2 on the Solaris 10 platform using a Sun Fire T2000 server. The information here is based on experiments carried out on DB2 with the Solaris 10 OS on the Sun Fire T2000 server in Sun's Market Development Engineering (MDE) and Strategic Applications Engineering (SAE) Labs in Burlington, Massachusetts. These tests used various workloads to identify configurations that allow the right mix of performance and ease-of-use. Results may vary for other users and environments. Tips are provided here to help system administrators and DBAs optimize DB2 deployed with the Solaris 10 OS and the Sun Fire T2000 architecture. A detailed list of the article's contents follows:
Background
UltraSPARC T1 Processor
The UltraSPARC T1 processor with CoolThreads technology has up to 8 cores with 4 hardware threads each, allowing it to process up to 32 threads simultaneously. While each core can execute one hardware thread per clock cycle, each thread has its own set of registers. The optimizations allow each core to scale from 1X to 4X, depending upon the nature of application workload running on the processor, with the four hardware threads each with their own registers. The T1 architecture has been optimized to take advantage of cycles wasted due to memory access. A hardware thread is parked by the hardware if it is stalled for such an instruction. The UltraSPARC T1 processor can use those critical cycles to service other hardware threads on the core. The mileage varies depending on the nature of the application. Applications utilizing large datasets with excessive pointer chasing, such as modern commercial applications, are good candidates. Highly network-dependent datasets, with uneven flow processed by multiple processes or threads, also scale well on the UltraSPARC T1 processor. Sun Fire T2000 Server
The Sun Fire T2000 server sets a new industry standard for throughput performance, energy efficiency, and compute density. The Sun Fire T2000 server breaks through constraints for data center space, power, and cooling by providing an optimal platform for online transactions and web services. Using Sun's chip multithreading technology (CMT), the Sun Fire T2000 server can offer high levels of compute density and price performance. For more information, see sun.com. The Sun Fire T2000 server has one UltraSPARC T1 CPU with 4, 6, or 8 core options (16, 24, or 32 threads), and supports up to 32 Gbytes of memory. (Note: There are plans to support up to 64 Gbytes.) Since applications with high network traffic and/or large datasets are the target audience of the UltraSPARC T1 processor, the Sun Fire T2000 server supports the processor with four 10/100/1000-Mbit/sec Ethernet adapters, three PCI-E slots, and two PCI-X slots. The combination of these features allows this server to support high network traffic for OnLine Transaction Processing (OLTP) or also high storage demands for decision support system (DSS) workloads. In a storage-centric configuration, the Sun Fire T2000 server can support three optional Dual Channel 4-Gbit FC PCI-E Host Adapters, along with two optional Dual Channel 4-Gbit FC PCI-X Host Bus Adapters, offering a capacity of approximately 20 Gbit/sec of I/O bandwidth. Typically a well-tuned I/O-intensive application system combination can achieve about 80 percent of the theoretical I/O bandwidth, which in the case of a Sun Fire T2000 server is about 1.6 Gbytes/sec of usable I/O bandwidth. Internal tests have achieved up to 1.8 Gbytes/sec of I/O bandwidth. Similarly, using the 2-Gbit/sec HBA, the Sun Fire T2000 server achieved about 800 Mbytes/sec of I/O bandwidth. For network-centric applications, four Gbit Ethernet adapters are available on all configurations of the Sun Fire T2000 server. Typically using a combination of the four adapters is sufficient to load the system without requiring any additional network adapters for the system. However, an optional Sun 10-Gbit Ethernet 133-MHz PCI-X Card is also available for the Sun Fire T2000 server. Solaris 10 OS
The Solaris 10 OS is proven to support 144+ processing units and has features such as Dynamic Tracing (DTrace), Solaris Zones, and Resource Pools that allow administrators to quickly configure the Solaris platform for the application workload to run well on the underlying server system. The Solaris 10 OS utilizes scheduler optimizations that allow it to schedule threads on virtual CPUs based on the cores so that it does not stress one core out while other cores are still being underutilized. Using Resource Pools, the Solaris 10 OS allows administrators to control the usage of an application and provides them with dedicated resources and also further optimizes the system by isolating applications from impacting other applications. Zones allow further abstraction with multiple isolated, virtualized operating environments with their own root password with a common kernel of the Solaris OS. This lets different administrators control their own applications without fear of being impacted by other applications. Together, Resource Pools and Solaris Zones provide secured operating environments known as Solaris Containers. For performance or debugging issues, DTrace helps users to quickly figure out root causes even on production systems. DB2 Universal Database
DB2 Universal Database (UDB) is a database management system that delivers a flexible and cost-effective database platform to build robust, on-demand business applications. DB2 UDB can leverage resources with broad support for open standards and popular development platforms such as the Java 2 Platform, Enterprise Edition (J2EE), and Microsoft .NET. The DB2 UDB family also includes solutions tailored for specific needs such as business intelligence and advanced tooling. For more information on DB2 UDB, see the IBM web site.
DB2 UDB is scalable with SMP types of machines in multiple ways, and the CMT-based UltraSPARC T1 chip qualifies as SMP. Every DB2 connection is scalable through a new agent process that is spawned to service the DB2 connection. For DB2 connections that require complex computations, DB2 can scale by way of the Thus, the combination of these various technologies allows DB2 to utilize all the resources available in a system. DB2 With Solaris 10 OS on Sun Fire T2000 Server Containing UltraSPARC T1 Processor
This section looks at deployment optimizations for DB2 on the Solaris 10 OS with the T1 processor. Solaris 10 1/06 OS and Patches
Starting in June 2006, all Sun Fire T2000 servers are shipped with the Solaris 10 1/06 OS. This release of the Solaris OS has the 118822-25 revision of the kernel patch. To get the best performance with DB2, it is recommended that you use the latest kernel patch 118822-30 and patch 118833-03, which provides the fix for large, anonymous page problems. Also, upgrade the
Tuning
/etc/system
Following is a sample of a good
The tuning is primarily for the network adapter and the high-water shared memory and semaphore settings required for DB2 with a high number of connections. (Hint: Use the
Although the IPC resource settings output from Tuning Network Parameters
The network parameters are tuned by adding the following to a startup file
Tuning Project Resource Parameters
Here are suggestions:
The recommended way of setting IPC resource control limits is now through With the aforementioned basic setup configurations, the Solaris 10 OS can be configured to allow DB2 to scale in terms of resource usage to more than 5000 connections in practice. Various other types of fine-tuning can be done that are more workload specific than generic, and hence, not mentioned in this section. Creating a Resource Pool for the Project
Set up the resource pool especially for the DB2 project with the FX scheduler. This also helps to improve performance by separating interrupts from the strands running DB2.
This can be achieved by creating a
Then apply the commands to the resource manager as follows.
The last command shows which CPU IDs are assigned to the
If the CPU ID of the default pool is 29,30,31, then interrupts can be turned off using
Then assign
The
With the aforementioned configuration, a Tuning DB2 Environment Values (
db2set)DB2 environment values can help you get the best out of DB2 on a Sun Fire T2000 server. The most common values typically set for DB2 on the Solaris platform are as follows.
Tuning DB2 Table Spaces
If the DB2 table spaces are created on UFS file systems, the following tips can help improve the system's performance.
Use either the
Using the Tuning DB2 DBM and DB Configuration Parameters
The DB2 and DB configuration parameters need to be tuned according to the application profiles. Recommended settings depending on the type of workload are covered in the following sections of the paper. OLTP Workload-Specific Tuning Tips
OLTP types of workloads are more transactional in nature -- for example, order-processing systems, shopping cart applications, and so on. OLTP workloads typically are more flow oriented than complex processing-oriented. The most common metrics for these types of workloads are response time, transactions per second, business-metric per minute, and so on. They are characterized as the quick in-and-out type of SQL queries, which typically return a single row or relatively low numbers of rows from the perspective of the database. The settings for tuning typically are applied in the following areas of the system:
In the case of DB2 with the Solaris 10 OS on the Sun Fire T2000 server, we have already applied the basic network tuning and other types of tuning for scalability that are required to handle the high load. Now let's look at how to make DB2 more efficient with the connections on this system. The DB2 tunables that help in making it more efficient for OLTP workloads are as follows. Tuning DBM Parameters for OLTP Applications
Following are example DB parameters that may need to be tweaked from default values.
Tuning DB Parameters for OLTP
Following are example DB parameters that may need to be tweaked from default values. (Note: Exact values needed will depend on the type of application running.)
Other DBM and DB parameters can be tuned to make each agent process more memory efficient to allow high connections to occur. Hence, parameter settings are very dependent on the high water specifications planned for the database along with the type of SQL statements planned for the database. (OLTP workloads typically have a known set of SQL statements that are expected from the application running on top of the database.) In case a physical RAM shortage is created due to a high number of database connections, the following parameters can be tweaked to a lower value so that each agent requires less memory, freeing up RAM to allow more agents to be created.
DSS Workload-Specific Tuning Tips
DSS workloads typically have more complex and/or computational queries running on the database. These workloads are characterized by long-running queries. The typical metrics used for measuring DSS types of workloads are in terms of throughput per hour, queries per hour, data processed per hour, and so on. Typically the goal in cases of DSS queries is to process a single query faster rather than tuning the database to handle hundreds of client applications. Queries in DSS typically return multiple rows back rather than a single row or a few rows as in the case of OLTP queries. Hence, tuning for DSS is different than OLTP tuning. The Solaris OS can be tweaked a bit more to get more out of DSS-type queries.
For example,
The second option is used by Solaris Volume Manager; this option is not needed if you are not using volumes defined by
If you use
To indicate that UFS should use the bigger I/O size, the file system also needs to be tuned as follows.
Tuning DB2 Table Spaces for DSS
To use the bigger I/O size, which is typically helpful in DSS-type workloads, you can do either of the following:
Tuning DB2
INTRA_PARALLEL Option
The DB2
Use the default degree of parallelism (
If there is a greater number of heavy DSS users, then higher values of
Using DB2 Database Partitioning Feature (DPF) Option
Another way to improve the performance of DSS-type queries with DB2 on the Sun Fire T2000 server is to partition the database using the optional DB2 DPF feature that uses the scale-out philosophy of scaling. For a dedicated DB2 database on the Sun Fire T2000 server, the recommended number of partitions to be used is "number of cores". Use the Using DB2 DPF With Resource Pools
DB2 partitions are project aware. The resources for each DB2 partition can be controlled by assigning projects in An example of these settings is shown in the DB2 Information Center. Summary
The configuration and tuning tips mentioned here can help system administrators and DB2 DBAs quickly configure IBM DB2 to get optimum performance with the Solaris 10 OS on a Sun Fire T2000 server. References
Acknowledgments
The author would like to thank Dennis Sheahan and Chien Yen (from Sun Microsystems) and Gennady Yakub and Berni Schiefer (from IBM) for their help reviewing this document. About the Author
Jignesh Shah works in Sun Market Development Engineering, helping ISV partners on the technical side to integrate products into specific solutions involving Sun. You can see his weblog on blogs.sun.com. | ||||||||||||||||||||||||||||||||||
|
| ||||||||||||