Thursday, December 22, 2016

Appserver Performance Issues - Tuning and Analysis

40 % of issues from App server ,10%  of issues from web server ,20% from network ,30% from DB

Threads are being established to App Server and Connections are going to DB.

1) Threads

2) Memory

3) Connection pool

Similar  to java in  .net we have CLR ( common language runtime) it is similar to JVM.

CLR converts any microsoft language to talk with windows OS .

JVM and CLR are core of app servers.

Session and Connections are different .

Connection might be established to webserver . But session is connected to app server.In most cases sessions and users are same.

Appserver has more than 5000 in queue ,it would be a problem.check wait time also .

if contention is high response time also high.Contention is waiting to complete some specific task.

DB Connection Pools -

Main issue in app server is out of memory - this happens because lack of effective garbage collection.


Wednesday, December 21, 2016

Webserver Performance Issues - Analysis and Tuning

Web server:  -

It accepts the client requests and send to app server .But not all requests to go to app server.Only primary URL goes to app server.Images,gifs and jpegs all are stored in webserver. All secondary requests go to web server only.

For each user two connections established with web server. For example 100 users 200 connections for web server minimum , 30 to 40 for app server, 10 to 20 to DB server .

Web server Issues :

1) Connection pool management   -  No of connections increases CPU will be high,if number of connections low ,cpu usage also low but response time would be high,so we need effective way of connection management.
2) Caching  - load all images in memory of webserver .If we  retrieve every time from disk it would be ineffective caching management .

3) Images - Images should be less and file size should be less .So we need to compress files and reduce size. Do effective compress ratio to decrease high response time.

Zip and Rar compression formats.

Web server does compression and browser does un compression.Looking to header information we can say file is compressed or not.

4) Keep Alive Connection : Need to define suitable time for this.

5) Load Balancer : 

4) Threading issues

4) Memory leaks

5) High verbose


Counters:

Current Connections : The number of active connections 

cache hits % -  it should be 80 or 90% .Always try to keep max

cache misses - intially it should be high and gradullay it should come down

sizing - bytes sent/sec .bytes recieved/sec - it gives for specific web server and  we can determine using this load balancer effectively working or not.

requests/sec






Tuesday, December 20, 2016

Solaris performance bottle necks

prstat-a similar to ps in linux This gives overall cpu and memory utiliztion

vmstat -S 1 100 - it gives 100 reports with 1 sec interval for complete stats

iostat -xnm - x means extended statitics , n means show device paths, m means mount parition

main thigns to obeserve for io stat - %svc_time and %b

svc_time - above 30 milli seconds in a bottle neck

%b - if it is more than 20% the disk is busy


Linux Performance Tuning - Process Management

Process  - Executing a program code.Includes open files,process state.All processes are managed by task_strut.

Thread - Object of activity with in a process,it is a light weight process .It shares memory,open space and address space with other threads.It is less expensive than process creation.

We can use TOP or PS comamnd to see running processes.

PS - It provide information about the currently running processes, including their process identification numbers (PIDs). Both Linux and UNIX support the ps command to display information about all running process. The ps command gives a snapshot of the current processes.


TOP-Display and update sorted information about processes.


Type the following ps command to display all running process-   # ps aux | less
Where,
  • -A: select all processes
  • a: select all processes on a terminal, including those of other users
  • x: select processes without controlling ttys


see every process on the system - # ps -A   and # ps -e

See process run by user-  # ps -u user

See every process except those running as root - # ps -U root -u root -N

The top program provides a dynamic real-time view of a running system. Type the top at command prompt:

# top

  

Get info about threads - # ps -eLf  # ps axms

 

Context Switching : Commands for context switches


 Command for Run Queue