Wednesday, 11 April 2012

Guide to Use this blog

> Start with "first post" to start reading on performance tuning ==steps to top down approach in performance tuning..
> Frequently Asked topics == this post needs to be updated with the internal links and highlights of each topic
>Format all posts and highlight important points

Wednesday, 14 March 2012

Server Tuning

iostat (disk)
vmstat (RAM)
netstat(network)
top(CPU)  and prstat
SAR

iostat stands for input output statistics and reports statistics for i/o devices such as disk drives .
vmstat gives the statistics for virtual Memory and
netstat gives the network statstics .

Tuesday, 15 March 2011

Input Output statistics ( iostat )

iostat reports
>terminal and disk I/O activity and
>CPU utilization.

iostat’s activity class options default to tdc (terminal, disk, and CPU).

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.

Tuesday, 15 February 2011

VMSTAT

vmstat stands for virtual memory statistics;

It collects and displays summary information about
memory,
processes,
 interrupts,
 paging and
 block I/O information.

By specifying the interval, it can be used to observe system activity interactively.
Most commonly people will use 2 numeric arguments in vmstat;
first is delay or sleep between updates and
the second is how many updates you want to see before vmstat quits.
Please note this is not the full syntax of vmstat and also it can vary between OSs. Please refer your OS man page for more information.
To run vmstat with 7 updates, 10 seconds apart type
#vmstat 10 7

Monday, 14 February 2011

TOP , PRSTAT , LOAD Average

TOP

TOP command is use to see the process status..But it is not
used in solaris 10 in solaris 10 it is replaced by prstat

top for checking the current system status like process,cpu
and memory...
if you want to run in Solaris.we need add the pkg.
the pkg is "SUNW SMCtop".
PRSTAT

you can use prstat to identify which processes are consuming the CPU resources. The prstat -s cpu -n 5 command is used to list the five processes that are consuming the most CPU resources. The -s cpu flag tells prstat to sort the output by CPU usage. The -n 5 flag tells prstat to restrict the output to the top five processes.
$ prstat -s cpu -n 5


Load Average::

For example, one can interpret a load average of "1.73 0.50 7.98" on a single-CPU system as:
·         during the last minute, the CPU was overloaded by 73% (1 CPU with 1.73 runnable processes, so that 0.73 processes had to wait for a turn)
·         during the last 5 minutes, the CPU was underloaded 50% (no processes had to wait for a turn)
·         during the last 15 minutes, the CPU was overloaded 698% (1 CPU with 7.98 runnable processes, so that 6.98 processes had to wait for a turn)
This means that this CPU could have handled all of the work scheduled for the last minute if it were 1.73 times as fast, or if there were two (the ceiling of 1.73) times as many CPUs, but that over the last five minutes it was twice as fast as necessary to prevent runnable processes from waiting their turn.
In a system with four CPUs, a load average of 3.73 would indicate that there were, on average, 3.73 processes ready to run, and each one could be scheduled into a CPU

Sunday, 13 February 2011

SAR

The SAR suite of utilities originated in Solaris. It became popular and now runs on most flavors of UNIX, including AIX, HP-UX, and Linux.
(System Activity Reporter)

The reason for sar creation was that gathering system activity data from vmstat and iostat is pretty time-consuming. If you try to automate the gathering of system activity data, and creation of periodic repots you naturally come to creation of a tool like sar.

System Activity Recorder can monitor half-dozen metrics related to overall system performance, for example:
cpu utilization (it's pretty effective tool for spotting CPU bottlenecks)
hard disk utilization
terminal IO
number of files open
      processes running