-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Daad,

[EMAIL PROTECTED] wrote:
| i think i don't get the utility of a connection pooling, since i have
this situation: 30 threads try to perform at same time a db access with
the call:
|
| new Database().doSomething()

Are you sure you're using your Database class in this way? I wouldn't be
surprised if you are creating a single Database object and using it
repeatedly.

Are your threads actually running in parallel?

| [wed, 09 apr 2008 00:55:03] INFO      Database -> doSomething: 836
| [wed, 09 apr 2008 00:55:04] INFO      Database -> doSomething: 1444
| [wed, 09 apr 2008 00:55:04] INFO      Database -> doSomething: 2054
| [wed, 09 apr 2008 00:55:05] INFO      Database -> doSomething: 2417
| [wed, 09 apr 2008 00:55:05] INFO      Database -> doSomething: 3060
| [wed, 09 apr 2008 00:55:06] INFO      Database -> doSomething: 3647
| [wed, 09 apr 2008 00:55:07] INFO      Database -> doSomething: 4279
| [wed, 09 apr 2008 00:55:07] INFO      Database -> doSomething: 4967
| [wed, 09 apr 2008 00:55:08] INFO      Database -> doSomething: 5592
| [wed, 09 apr 2008 00:55:09] INFO      Database -> doSomething: 6208
| [wed, 09 apr 2008 00:55:09] INFO      Database -> doSomething: 7026
| [wed, 09 apr 2008 00:55:10] INFO      Database -> doSomething: 7455
| [wed, 09 apr 2008 00:55:10] INFO      Database -> doSomething: 8087
| [wed, 09 apr 2008 00:55:11] INFO      Database -> doSomething: 8705
| [wed, 09 apr 2008 00:55:12] INFO      Database -> doSomething: 9318
| [wed, 09 apr 2008 00:55:12] INFO      Database -> doSomething: 10040
| [wed, 09 apr 2008 00:55:13] INFO      Database -> doSomething: 11146
| [wed, 09 apr 2008 00:55:14] INFO      Database -> doSomething: 11702
| [wed, 09 apr 2008 00:55:14] INFO      Database -> doSomething: 12033
| [wed, 09 apr 2008 00:55:15] INFO      Database -> doSomething: 12658
| [wed, 09 apr 2008 00:55:16] INFO      Database -> doSomething: 13279
| [wed, 09 apr 2008 00:55:16] INFO      Database -> doSomething: 13897
| [wed, 09 apr 2008 00:55:17] INFO      Database -> doSomething: 14523
| [wed, 09 apr 2008 00:55:17] INFO      Database -> doSomething: 15139
| [wed, 09 apr 2008 00:55:18] INFO      Database -> doSomething: 15759
| [wed, 09 apr 2008 00:55:19] INFO      Database -> doSomething: 16411
| [wed, 09 apr 2008 00:55:19] INFO      Database -> doSomething: 17056
| [wed, 09 apr 2008 00:55:20] INFO      Database -> doSomething: 17672
| [wed, 09 apr 2008 00:55:20] INFO      Database -> doSomething: 18292

Every single operation takes more time than the previous operation. That
smells of a problem with resetting a counter. Isn't it interesting that
the logging statements show that all 30 threads completed within 18
seconds of each other, and each thread says that it took up to 18
seconds to complete? If these processes were sharing a single
connection, and they were taking 18 seconds to complete, the total time
would be 9 minutes, not 18 seconds.

Even if you had resource contention (which you shouldn't have with 600
shared connections), I would expect that some numbers would be low and
others were high -- essentially randomly distributed.

It's pretty clear to me that something else is going on... I'm guessing
that the connection pool (which one are you using?) is working just
fine, but either your "load test" code or your server-side database use
is being incorrectly used and/or incorrectly instrumented.

| so i can't understand the meaning of maxActive parameter.. i thought
| that could be at most 600 concurrent connection.

~From the documentation: "The maximum number of active connections that
can be allocated from this pool at the same time, or negative for no limit."

Your expectation that 600 connections should be available is correct.
Although, 600 connections in a connection pool is a /lot/ of connections. ;)

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

iEYEARECAAYFAkf8yAkACgkQ9CaO5/Lv0PAGtgCeL5O0jUrxfZZZM/3ix3pbmrWV
kgcAnR1wlDWpS9ez9FE/uNHzKptqTCmc
=mSOU
-----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]

Reply via email to