Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Book Image

IBM DB2 9.7 Advanced Administration Cookbook

Overview of this book

IBM DB2 LUW is a leading relational database system developed by IBM. DB2 LUW database software offers industry leading performance, scale, and reliability on your choice of platform on various Linux distributions, leading Unix Systems like AIX, HP-UX and Solaris and MS Windows platforms. With lots of new features, DB2 9.7 delivers one the best relational database systems in the market. IBM DB2 9.7 Advanced Administration Cookbook covers all the latest features with instance creation, setup, and administration of multi-partitioned database. This practical cookbook provides step-by-step instructions to build and configure powerful databases, with scalability, safety and reliability features, using industry standard best practices. This book will walk you through all the important aspects of administration. You will learn to set up production capable environments with multi-partitioned databases and make the best use of hardware resources for maximum performance. With this guide you can master the different ways to implement strong databases with a High Availability architecture.
Table of Contents (21 chapters)
IBM DB2 9.7 Advanced Administration Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Resolving CPU bottlenecks


High CPU activity is normal and desirable. However, when a machine is 95 percent busy, we have to check if this is for all processors or if there is one processor that has a large load.

CPU % time is divided into 4 components:

Component

Name

Description

Us

User time

Time used by all user processes (non-kernel)

Sy

System

Time spent by operating system kernel

Id

Idle

Time spent idle

Wa

Wait

Time spent waiting for I/O

Getting ready

For this example, I compiled a C program named pos.exe. This program executes a SQL with a cartesian join to ensure that we have CPU activity for a while, so we have the time to track it down. You can open a command-line processor window and issue a SQL from there.

How to do it...

  1. Get vmstat results. Issue the following command, and note the CPU columns on the right. In this example, the user CPU maintains a constant 90 percent or more activity, so immediate attention is required:

    [db2instp@nodedb21 ~]$ vmstat 5 100
    procs ----...