Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
   
Iostat (Input Output statistics) on Solaris




By Vigyan Kaushik
Jan 31, 2006

Digg! digg!     Print    email to friend Email to Friend

Note: This article was written for educational purpose only. Please refer to the related vendor documentation for detail.




Download Free Confio Software

Iostat (Input Output statistics) on Solaris

The iostat command is used for monitoring system input/output device. The iostat command generates reports that can be used to change system configuration to better balance the input/output load between physical disks. It is a very useful utility for DBAs as we need it to check tablespace I/O for better database performance.

The first report generated by the iostat command provides statistics concerning the time since the system was booted. Each subsequent report covers the time since the previous report. All statistics are reported each time the iostat command is run. The report consists of a CPU header row followed by a row of CPU statistics. On multiprocessor systems, CPU statistics are calculated system-wide as averages among all processors. A device header row is displayed followed by a line of statistics for each device that is configured.


Syntax:

The basic synctax is below.

# iostat <options> interval count

Where:

option
- is the device for which information is needed like CPU, Disk or Terminal (-c, -d , -t or -cdt ).
You can also use x options to report the extended statistics .

e.g. iostat -cdtx

interval - is time period in seconds between two samples .

e.g. "iostat 2" will give data at each 2 seconds interval.

count - is the number of times the data is needed .

e.g. "iostat 2 4" will give data 4 times at each 2 seconds interval.

An example of the iostat is below.

#iostat -xd 2 4
                  extended device statistics
device       r/s    w/s   kr/s   kw/s wait actv  svc_t  %w  %b
fd0          0.0    0.0    0.0    0.0  0.0  0.0    0.0   0   0
lofi1       11.5    0.0   44.9    0.0  0.0  0.0    0.1   0   0
lofi2        0.4    0.3    0.3    0.1  0.0  0.0    1.0   0   0
md10         0.0    0.1    0.3    0.1  0.0  0.0   14.3   0   0
md11         0.0    0.1    0.3    0.1  0.0  0.0   14.3   0   0
sd21         0.0    0.0    0.0    0.0  0.0  0.0  241.8   0   0
sd30         0.0    0.0    0.3    0.3  0.0  0.0   10.7   0   0
sd60         0.0    0.0    0.0    0.0  0.0  0.0    4.5   0   0
sd61         0.0    0.0    0.0    0.0  0.0  0.0    4.5   0   0
sd62         0.0    0.0    0.0    0.0  0.0  0.0    4.5   0   0
sd63         0.0    0.0    0.0    0.0  0.0  0.0    4.4   0   0

Where

device       Disk device name
r/s             Reads per second
w/s           Writes per second
Kr/s          kb read per second
Kw/s        kb written per second
wait          Average number of transactions waiting for service (Q length)
actv          Average number of transactions actively being serviced (removed from the queue but not yet completed)
svc_t        Service time (ms). Includes everything: wait time, active queue time, seek rotation, transfer time
%w          Percent of time there are transactions waiting for service (queue non-empty)
%b           Percent of time the disk is busy (transactions in progress)

Analysis the results:

The following are main areas to focus in the report.

Reads/writes per second (r/s , w/s)
Percentage busy (%b)
Service time (svc_t)

If a disk shows consistently high reads/writes along with , the percentage busy (%b) of the disks is greater than 5 percent, and the average service time (svc_t) is greater than 30 milliseconds, then one of the following action needs to be taken

  • Modifying the disk queries and using available cache facilities of application servers to use disk i/o more efficiently.

  • Implement the RAID or similar solution.

  • Increase the system parameter values for inode cache, ufs_ninode, which is Number of inodes to be held in memory. Inodes are cached globally (for UFS), not on a per-file system basis.

  • Replace the existing disk/controller with a faster one or move files to another file system.

     

 



Comments/Reviews on this article:
Budi  Raharjo
Feb 01, 2006

It is a nice article...

Sahay  !
Feb 01, 2006

Great!

Though I have been with Solaris Environment for quite a long time, not come across such a command / requirement. Thanks to Vigyan!! Keep it up with more surprises!!

- Sahay

jitendra  kumar
Feb 06, 2006

Good, its really very good article for Oracle DBA

VILAS  VARPE
Feb 09, 2006

hi ........
it is very good article.
sir, i am a student in final year ,information tech.
i want to do something new in database..
4 this i want u r guidline.
i hope that u will be co prative 4 me .
thank u.

Jagdish  Varodia
Jun 25, 2006

Good article!!

Vinod  Gopinath
Mar 08, 2006

Very good and a useful tip. We are planning Sun and Apps 11i. More tips like this are welcome.....

 
About author:

Vigyan Kaushik is an Oracle certified professional serving IT industry for more than 11 years as an Oracle DBA and System Administrator. He has expertise in Database Designing, Administration, Networking, Tuning, Implementation, Maintenance with web deployment activities on different Unix flavors as well as on Windows Operating Systems.

 

Please login to post your comments





  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software