I can say some more point (I had such problem) related to Oracle and Java performance.
When you try a loop of requests over the database as suggested Maarten, try to see also how is configured Oracle. For instance, Oracle can have two levels of pool of connections : - one from the application point of vue (using dbcp.BasicDataSource for instance as you said) - another one using thread pool of connection directly in Oracle Both can be used. By default, in Oracle, 1 connection from the application is 1 thread/connection in Oracle, so 10000 connections = 10000 threads.connections in the Oracle server. In this mode, Oracle can have a limitation on accepting multiple connections (perhaps 8 in your case ?). Using thread pool in Oracle, 1 connection from the application is still 1 thread/connection but using a pool of 200 directly in Oracle, 10 000 connections from applications will means 200 connections. In fact, in this mode, requests are multiplexed so using less thread/connection in Oracle. What I want to say is looking only at the Java code might not be enough... Also, if you can, recheck you use pooled connection since connect/disconnect can be very heavy. Finally, try to use a prepared statement instead of a standard statement since Oracle will perform really faster. Even more, if you can, try to use a stored procedure. Frederic ----- Original Message ----- what are the other values for BasicDataSource ? initialSize, maxIdle, minIdle ? How much threads is your mina app using ? You could try to see how much insert/transactions your app can do per second without using mina and loadrunner: just start x threads INSIDE your application that do the db operations in a loop. Then you know if it's mina related or not. Maarten On 10/24/07, tiandike <[EMAIL PROTECTED]> wrote: > > > I use org.apache.commons.dbcp.BasicDataSource and set maxActive =1000 > > i don't know why is 8? why not other number? > > > > Maarten Bosteels wrote: > > > > Hello, > > > > With 8 users or less your server is doing 2600 inserts per second ? > > And each insert is a new database transaction ? > > First of all, I think that ain't bad at all ! > > > > Are you using a database connection pool ? > > Check the size of the pool. > > > > Since you don't have problems when you don't perform db operations, I > > think > > your problem is not related to MINA. > > > > The bottleneck in our MINA based server also turned out to be Oracle, > more > > specifically the number of commits that Oracle could do per second. I am > > not > > saying that Oracle is bad (quite the opposite) just that I think that's > > where you should look: it has A LOT of tuning options. > > > > Maarten > > > > On 10/24/07, tiandike <[EMAIL PROTECTED]> wrote: > >> > >> > >> I use loadruner to test my server ,my handler performs database > >> operations(insert a row a request) > >> i disable the default ThreadModel setting following > >> http://mina.apache.org/configuring-thread-model.html > >> > >> when i use loadruner to run performance test , a strange phenomenon is > >> that > >> when the number of Running Vusers > >> in loadruner is less than 8 (include 8) the tps is about 2600 ,but > when > >> the number of Running Vusers is greater than 8 in loadruner ,the tps > >> reduce > >> to very low and number of the records that inserted in oracle also > >> reduce > >> to very low . > >> I don't know why, anyone can help me? > >> > >> my server is 4 cpu (Intel(R) Xeon(R) CPU 5110 1.60GHz), > linux > >> my database is oracle > >> jvm version is 6.0 > >> > >> (But : if my handler not perform database operations the condition > above > >> never happen!) > >> > >> -- > >> View this message in context: > >> > http://www.nabble.com/a-question--when-running-performance--test-by-loadruner-tf4683007s16868.html#a13381592 > >> Sent from the Apache MINA Support Forum mailing list archive at > >> Nabble.com > >> . > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/a-question--when-running-performance--test-by-loadruner-tf4683007s16868.html#a13383246 > Sent from the Apache MINA Support Forum mailing list archive at Nabble.com > . > >
