tnsping response time can be misleading.

On several occasions, I have ran into situations where Sun customers are using tnsping as an indicator of network performance. While tnsping does show if a connection to a database exists, the response time is not a true indicator of connect time.

"tnsping" works in the idle loop of the Oracle listener and will not respond until all connections queued by the listener have completed. On a busy system, new connections will be serviced before tnsping responses. This is especially apparent when the "queuesize" parameter has been increased in the listener.ora file. Generally, it is good to service real clients before a ping request, however if you are using this to determine response time, it is not valid. A real performance issue still may exist, but you won't know until digging further.

To get true connect times, I wrote a simple script with a "timex" in front of "select \* from dual;" through a listener. "myping.sh" measures the true connect time as well as getting the session count and timestamp. You have to modify the connect strings to connect to your database.

I hope this is helpful,
Glenn

oracle@sumocat:~% myping.sh
Usage:  ./myping.sh  intvl  count

oracle@sumocat:~% myping.sh 20 10
Date_and_Timestamp      SessionCNT      Connect_Time(sec)
09/19/05 11:08:05               20      0.260000
09/19/05 11:08:25               19      0.280000
09/19/05 11:08:46               19      0.270000
09/19/05 11:09:06               20      0.260000
09/19/05 11:09:27               20      0.270000
Comments:

Thanks

Posted by guest on August 30, 2006 at 06:22 AM PDT #

Thank You for clearify this out.
I took the script and use it to monitor our production

Posted by bed on January 30, 2008 at 06:36 PM PST #

Post a Comment:
Comments are closed for this entry.
About

This blog discusses performance topics as running on Sun servers. The main focus is in database performance and architecture but other topics can and will creep in.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
News

No bookmarks in folder

Blogroll

No bookmarks in folder