Hmm. I think the answer here is one of resource starvation - the resource in this case being the CPU. It seems that core of your test is

'Select * from table1'

Where is the database? Is it another application on the same box? What mechanism do you use to connect between the database and the app? (a pipe? tcp?) How big is 'table1'? How long does that select statement take? Why should anything else happen in the system until that select has finished?

Here's a guess. Look at a resource monitor and you will see that when you start your test the CPU goes to 100% and stays there.


I suspect that this is a case that you are queuing on processing the select statement in the database.

From a systems point of view the Java JVM on windows and linux is a *cooperative* multithreaded system. Connection pooling has nothing to do with concurrency. Its as someone said earlier a performance optimization to avoid the overhead of recreating the datasource each time you need it.

It you want to write a test which shows the connection pool being used CONCURRENTLY then you must write a concurrent test! For example, open the connection, sleep for a while, do something, sleep again and do something else and then close the connection. Turn on logging for the pool and watch concurrent requests being processed.

Alan Chaney



[EMAIL PROTECTED] wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daad,

[EMAIL PROTECTED] wrote:
| No, my test is done with threads that connect using sockets. Server
| listen with ServerSocket and 30 Threads are started connecting to it.

Er... did you write your own server, or are you using Tomcat?


I'm using tomcat.

I'm sorry... all the evidence you have presented does not support your
conclusions. There are other ways to get a log file looking like the one
you posted.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkf9PnsACgkQ9CaO5/Lv0PBAPACfR8qL7tD33mFTWCdY99D6p8ic
shoAn3v0C49JvF2muOefUF5Q+QbBhVdD
=kLLa
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



!DSPAM:47fddbcd240221497319589!


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to