Showing posts with label Solaris. Show all posts
Showing posts with label Solaris. Show all posts

Wednesday, January 17, 2007

Solaris Performance Monitoring & Tuning - iostat , vmstat & netstat

This is a reading note from an article on: http://www.adminschoice.com/docs/iostat_vmstat_netstat.htm

iostat
=========
iostat -xtc 5 2

The values to look from the iostat output are:

* 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

1.)Tune the application to use disk i/o more efficiently by modifying the disk queries and using available cache facilities of application servers .

2.) Spread the file system of the disk on to two or more disk using disk striping feature of volume manager /disksuite etc.

3.) 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

4.) Move the file system to another faster disk /controller or replace existing disk/controller to a faster
one.


vmstat
========
A. CPU issues:

Following columns has to be watched to determine if there is any cpu issue

* Processes in the run queue (procs r)
* User time (cpu us)
* System time (cpu sy)
* Idle time (cpu id)

Problem symptoms:
-----------------
1.) If the number of processes in run queue (procs r) are consistently greater than the number of CPUs on the system it will slow down system as there are more processes then available CPUs .

2.) if this number is more than four times the number of available CPUs in the system then system is facing shortage of cpu power and will greatly slow down the processess on the system.

3.) If the idle time (cpu id) is consistently 0 and if the system time (cpu sy) is double the user time (cpu us) system is facing shortage of CPU resources.


B. Memory Issues:

Memory bottlenecks are determined by the scan rate (sr) . The scan rate is the pages scanned by the clock algorithm per second. If the scan rate (sr) is continuously over 200 pages per second then there is a memory shortage

netstat
=======
netstat -rn

Friday, September 22, 2006

Solaris OS commands

Some command under Solaris

# prtdiag -- Show some hardware info
# swap –s 查看交换区空间大小
# df -k tmp 查看tmp空间大小
# prtconf grep Memory size 查看内存大小
# df –k 查看系统磁盘空间
# isainfo –kv 查看系统内核是否是64位
# pkginfo -i SUNWarc SUNWlibms SUNWil0f SUNWbtool SUNWsprot SUNWi1cs SUNWhea SUNWsprox

This article describes how to set swap memory:
Note: swap files != SWAP memory

Setting SWAP Memory Under Solaris