|
Re: Slow connection in Linux 64 bit oracle 9i [message #447354 is a reply to message #447353] |
Sat, 13 March 2010 21:14 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
>Some time, it is taking up to 40 to 50 seconds
Where is time being spent?
Find & fix slowness.
Slow from all clients?
Slow for application but fast for sqlplus or simple JDBC thin client?
Is slowness network related or DB related?
Enable SQL*Net tracing.
Enable SQL_TRACE=TRUE
In case it might be relevant, DNS timeout is 30 seconds in some/many/most cases.
Are connections faster using IP# instead of hostname?
[Updated on: Sat, 13 March 2010 21:29] Report message to a moderator
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447357 is a reply to message #447354] |
Sat, 13 March 2010 22:01 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
We could reproduce this slow connection from all type of clients such as OLE DB, OCI driver, java thin client, and sqlplus. We have tested the connection time both with IP address and host name, and the result is same. tnsping and ping to the server is very fast. We have done tracerout and did not notice any problem with the network. This is a random problem and happens only with concurrent connections 10 and above. However, we have noticed there is a relationship between long connection time and CPU usage in the machine. During slow connection CPU usage spikes to 100% and R value of the machine crosses number of CPU. We are unsure whether this is a Linux bug or database bug. We are able to reproduce this problem with a simple java testing tool, which opens 10 concurrent connections simultaneously. These connections are immediately closed after launch.
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447361 is a reply to message #447359] |
Sat, 13 March 2010 22:38 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
We have noticed query execution performance has been dramatically improved in the new environment as new environment has faster IO. We are puzzled why the connection is very slow. We are thinking of switching to shared mode. However, we are bit worried to implement shared connection as query execution time might get deteriorated with shared mode.
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447377 is a reply to message #447363] |
Sun, 14 March 2010 07:57 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
As I mentioned before, new system has faster IO and more memory compare to old system. We are very sure that there is no bottleneck in the IO, memory or in Network. However, we have noticed bottleneck in CPU. Connection slowness we are observing is in random in nature. With same load connection time varies from 600 milli-seconds to 50000 milli-seconds( 50 seconds).
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447625 is a reply to message #447378] |
Tue, 16 March 2010 20:01 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
I have investigated this issue further. I have recorded both CPU usage and the R vale at every second over a period of 10 minutes. During this period, I was running my load test utility.
From the collected data, I found OS CPU is not a bottleneck. I have observed slow connection during normal R value.
I am suspecting some resource contention in the database level causing sporadic slow connection.
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447726 is a reply to message #447641] |
Wed, 17 March 2010 10:10 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
I am attaching my collected data enclosed. I wrote a perl script to record the usage of R value at every seconds. I use the sar utility to record the CPU usage at every seconds. My tool lunch 20 concurrent connections at one go from 20 different threads. These twenty threads does not use any shared resources. Hence, you can rule out the possibility of any inter threads contention. Out of twenty threads one of the thread record the connection time. Collected data showed sporadic slowness of connection with normal R value. For example, in run 2, we have noticed 23.576 seconds of connection opening time. This connection time was recorded at 03/16/2010 17:21:19.00. If you see the CPU usage and R value of OS from (03/16/2010 17:21:19.00 - 23.576 seconds) onwards, you will not notice anything wrong.
I hope, I am able to explain.
|
|
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447930 is a reply to message #447786] |
Thu, 18 March 2010 09:31 |
naren.sarkar
Messages: 16 Registered: April 2008
|
Junior Member |
|
|
In fact, trace file is for slow connection which took 8 seconds to create the connection.
Trace file proves there is no post login slowness. Problem could be related with prelogin activities. I am an application developer and certainly not the DB expert. This is my guess. Can we anyway trace the pre-login activities?
|
|
|
|
|
|
|
Re: Slow connection in Linux 64 bit oracle 9i [message #447944 is a reply to message #447930] |
Thu, 18 March 2010 11:25 |
|
BlackSwan
Messages: 26766 Registered: January 2009 Location: SoCal
|
Senior Member |
|
|
> Problem could be related with prelogin activities.
This is much more difficult to resolve.
Is slowness at client?
Is slowness at DB server (prior to starting SQL_TRACE)?
is slowness due to intervening networking component between client & DB server?
You may need assistance from Network Engineer to do packet tracing & timing captures between client & DB server using Ethereal or similar tool.
|
|
|