Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed


follow us on Twitter





Brocade Doubles Down on 16 Gbps Fibre Channel

Microsoft Wants iOS Apps to Run on WP7

Avaya Debuts New Virtual Services Switch
Database Journal |DBA Support |SQLCourse |SQLCourse2







Technical Specialist – Pre-sales (MA)
Next Step Systems
US-MA-Littleton

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

Oracle

July 21, 2010

Solve Database Performance Tuning Problems by Monitoring CPU Resource Consumption

By James Koopmann

Constantly watching CPU utilization is critical to a database administrator's understanding of their database system. The sar utility, while seemingly small and insignificant can and should be used to help initially determine if any high-level CPU resource usage is out of balance, potentially pointing to database processing that requires tuning.

Being an effective database administrator means that we must at times be able to use system level utilities to find things like CPU, memory, and I/O bottlenecks/issues to help point us in the proper direction.

Database administrators will often dive straight into the database to determine performance problems, forgetting about the operating system and the wealth of information it contains. An effective DBA must be able to use system level utilities to find things like CPU, memory, and I/O bottlenecks/issues to help point us in the proper direction. These three high-level resources are the main limiting factors to database performance that cannot be altered; we have only so many CPU cycles, so much memory, and a specific disk configurations. Without properly understanding how they are currently behaving, before looking inside the database, will almost always get us in trouble. This article looks at how we as DBAs might monitor CPU utilization from the operating system and when it might signal issues we need to look into.

The sar utility is part of the sysstat package and will collect, store in logs, and report on a wide variety of system activities. Of all the system level commands that you can use, the sar utility has multiple switches/options that allow the DBA to quickly and easily monitor those resources (CPU, context switches, interrupts, paging, memory usage, buffer usage, network usage) that can give us quick insight into the health of our database systems. What makes sar very nice to use is that sar constantly collects and logs system activity. To see this, and get some rudimentary, but powerful, commands out of the way, the following examples help show how to call sar for days and time intervals; remembering that sar maintains daily logs for each day in a file such as /var/log/sa/sa<dd>, where <dd> is the day of the month.

Use sar to look at today’s collected activity.

[oracle@wagner ~]$ sar 

Use sar to look at today’s collected activity; reporting every 10 seconds for 15 times.

[oracle@wagner ~]$ sar 10 15

Use sar to look at the daily activity on the 13th.

[oracle@wagner ~]$ sar -f /var/log/sa/sa13

Use sar to look at today’s collected activity between 6:00am and 7:00am.

[oracle@wagner ~]$ sar -s 06:00:00 -e 07:00:00

Use sar to look at the daily activity on the 13th and between 6:00am and 7:00am.

[oracle@wagner ~]$ sar -s 06:00:00 -e 07:00:00 -f /var/log/sa/sa13

View article

» See All Articles by Columnist James Koopmann

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 



Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Is there any Issues in Oracle10g regarding UNION Mahesh A 2 January 18th, 05:54 PM
Activate SQLPLUS h4bibfigueredo 3 December 20th, 02:04 PM
DB Activity Monitoring cyrusking 4 December 14th, 09:07 PM
Monitor DBA Access to PHI data Tomson48187 1 November 7th, 03:03 PM