Chuck, I thought the same thing so the code loads the data before starting the test run. Here are the steps:
Load 100,000 strings from a text file into a List<String>. Each String contains 55 columns of data. Start the timer Dispatch the strings to each "insert" threads Queue. Queue length is large enough that this will never block. The "insert" threads converts the string to an object - this does have some overhead but is stateless and should scale well. A PreparedStatement is used to insert into the table dedicated to the thread. When all "insert" threads are finished, stop the timer. Typical time from timer start to finish is 7 seconds. Greg On Sep 18, 11:25 am, Chuck Remes <[email protected]> wrote: > On Sep 18, 2009, at 10:43 AM, GregB wrote: > > > > > > > > > First off thanks Thomas for all the great work - after switching from > > Derby to H2 everything runs twice as fast! > > > Still I find that we are limited by insert performance. I wrote up a > > small test to insert 100,000 rows and found - > > with single thread and single table - 11,000 rows per second > > with 8 threads and single table - 14,000 rows per second > > with 8 threads and 8 tables - 14,000 rows per second > > > Tests were done on an 8 core Linux server with an embedded in-memory > > database. With the multi thread tests CPU usage was around 30%-40% > > per for each core. The db url is jdbc:h2:mem:testdb. > > > My biggest surprise was that the 8 table test was no faster. I would > > expect with no contention for table locks this would scale better. Is > > there any recommended configuration to allow better insert > > performance? > > I'm wondering if your I/O subsystem was saturated so that it was > impossible to insert any faster. Can you confirm that you had not hit > your I/O ceiling? > > cr --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/h2-database?hl=en -~----------~----~----~----~------~----~------~--~---
