Re: [h2] NPE/performance degradation with version 1.4.185?
Thank you that fixed the problem! h2-1.5.188.jar: 103.34user 16.55system 1:10.39elapsed 170%CPU (with MV_STORE=FALSE) Johann On Friday, 21 August 2015 14:11:14 UTC+2, Noel Grandin wrote: > > > > On 2015-08-21 02:03 PM, Johann Petrak wrote: > > > > Any ideas? I will stay with version h2-1.3.176 for now, but is this > something you can confirm? > > Am I doing it wrong? Is there something that can be done to make the 1.4 > version work as > > fast as the 1.3 version? > > For now, turn off the new MVStore engine by appending MV_STORE=FALSE to > your DB URL. > > > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] NPE/performance degradation with version 1.4.185?
On 2015-08-21 02:03 PM, Johann Petrak wrote: Any ideas? I will stay with version h2-1.3.176 for now, but is this something you can confirm? Am I doing it wrong? Is there something that can be done to make the 1.4 version work as fast as the 1.3 version? For now, turn off the new MVStore engine by appending MV_STORE=FALSE to your DB URL. -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
Re: [h2] NPE/performance degradation with version 1.4.185?
Have been away from this problem for a while but now I made a new performance comparison, loading about 9 million rows into a table with just two columns. The table looks like this: CREATE TABLE t1 ( f1 VARCHAR(100) NOT NULL PRIMARY KEY, t2 VARCHAR(100) NOT NULL ); The code I use prepares the statement INSERT INTO t1 (f1,f2) VALUES(?,?) and then, for each row, executes insertSt.setObject(1,v1) insertSt.setObject(2,v2) A single commit is executed at the very end of al inserts. The connections is opened in embedded mode and before anything is inserted into the table the following statements are executed: SET AUTOCOMMIT FALSE SET UNDO_LOG 0 SET LOCK_MODE 0 SET LOG 0 SET CACHE_SIZE 1048576 Exactly the same code is run on a newly created database file for each of the following jar versions: h2-1.3.174.jar: 105.28user 18.24system 1:10.56elapsed 175%CPU h2-1.3.176.jar: 112.24user 18.32system 1:12.28elapsed 180%CPU h2-1.4.188.jar: 1242.22user 32.65system 17:29.98elapsed 121%CPU As you can see, the 1.4 jar is more than 10 times slower for this and the slowdown seems to come mainly from CPU. Any ideas? I will stay with version h2-1.3.176 for now, but is this something you can confirm? Am I doing it wrong? Is there something that can be done to make the 1.4 version work as fast as the 1.3 version? Many thanks, Johann On Wednesday, 4 March 2015 07:43:30 UTC+1, Thomas Mueller wrote: > > Hi, > > Could you please re-try with the latest version (1.4.186)? A memory leak > was fixed there, which could also cause performance problems with a large > (well, medium size) database. If it is still a problem, then could you > please post a test case (or describe what you do in more details)? > > Regards, > Thomas > > > On Monday, March 2, 2015, Johann Petrak > > wrote: > >> Has anyone else seen a degradation in performance when moving from >> version 1.3.174 to version 1.4.185? >> A simple java program which simple does a large number of inserts (in >> embedded mode) appears to be at >> least 20 times slower using the newer version with my configuration. >> >> Also, I have seen situations with the newer version where the program >> appears to hang on shutdown >> and eventually I get the following exception: >> Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: >> "java.lang.NullPointerException" [5-185] >> at >> org.h2.message.DbException.getJdbcSQLException(DbException.java:345) >> at org.h2.message.DbException.get(DbException.java:168) >> at org.h2.message.DbException.convert(DbException.java:295) >> at >> org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93) >> at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2384) >> at >> org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2570) >> Caused by: java.lang.NullPointerException >> at org.h2.mvstore.db.ValueDataType.compare(ValueDataType.java:102) >> at >> org.h2.mvstore.db.TransactionStore$ArrayType.compare(TransactionStore.java:1744) >> at org.h2.mvstore.MVMap.areValuesEqual(MVMap.java:601) >> at org.h2.mvstore.MVMap.replace(MVMap.java:615) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:806) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) >> at org.h2.mvstore.MVMap.rewrite(MVMap.java:782) >> at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:1796) >> at org.h2.mvstore.MVStore.compact(MVStore.java:1688) >> at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2380) >> >> but i have never seen this with the older version. >> >> This is happening with Java 1.8.0_20-b26 on 64 bit intel server with the >> database file residing on an SSD drive. >> The program that executes the insert statements first executes the >> following >> SET AUTOCOMMIT FALSE >> SET UNDO_LOG 0 >> SET LOCK_MODE 0 >> SET LOG 0 >> SET CACHE_SIZE 1048576 >> and it never executes a commit until the very end (before shutdown). >> It uses a prepared INSERT statement and sets the value of its fields >> using statement.setObject(col,val) where value in >> that case is always a String object. >> >> Thanks, >> johann >> >> -- >> You received this message because you are subscribed to the Google Groups >> "H2 Database" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to h2-database+unsubscr...@googlegroups.com. >> To post to this group, send email to h2-database@googlegroups.com. >> Visit this group at http://groups.google.com/group/h2-database. >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...
Re: [h2] NPE/performance degradation with version 1.4.185?
Hi, Could you please re-try with the latest version (1.4.186)? A memory leak was fixed there, which could also cause performance problems with a large (well, medium size) database. If it is still a problem, then could you please post a test case (or describe what you do in more details)? Regards, Thomas On Monday, March 2, 2015, Johann Petrak wrote: > Has anyone else seen a degradation in performance when moving from > version 1.3.174 to version 1.4.185? > A simple java program which simple does a large number of inserts (in > embedded mode) appears to be at > least 20 times slower using the newer version with my configuration. > > Also, I have seen situations with the newer version where the program > appears to hang on shutdown > and eventually I get the following exception: > Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: > "java.lang.NullPointerException" [5-185] > at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) > at org.h2.message.DbException.get(DbException.java:168) > at org.h2.message.DbException.convert(DbException.java:295) > at > org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93) > at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2384) > at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2570) > Caused by: java.lang.NullPointerException > at org.h2.mvstore.db.ValueDataType.compare(ValueDataType.java:102) > at > org.h2.mvstore.db.TransactionStore$ArrayType.compare(TransactionStore.java:1744) > at org.h2.mvstore.MVMap.areValuesEqual(MVMap.java:601) > at org.h2.mvstore.MVMap.replace(MVMap.java:615) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:806) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) > at org.h2.mvstore.MVMap.rewrite(MVMap.java:782) > at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:1796) > at org.h2.mvstore.MVStore.compact(MVStore.java:1688) > at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2380) > > but i have never seen this with the older version. > > This is happening with Java 1.8.0_20-b26 on 64 bit intel server with the > database file residing on an SSD drive. > The program that executes the insert statements first executes the > following > SET AUTOCOMMIT FALSE > SET UNDO_LOG 0 > SET LOCK_MODE 0 > SET LOG 0 > SET CACHE_SIZE 1048576 > and it never executes a commit until the very end (before shutdown). > It uses a prepared INSERT statement and sets the value of its fields using > statement.setObject(col,val) where value in > that case is always a String object. > > Thanks, > johann > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to h2-database+unsubscr...@googlegroups.com > > . > To post to this group, send email to h2-database@googlegroups.com > . > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
[h2] NPE/performance degradation with version 1.4.185?
Has anyone else seen a degradation in performance when moving from version 1.3.174 to version 1.4.185? A simple java program which simple does a large number of inserts (in embedded mode) appears to be at least 20 times slower using the newer version with my configuration. Also, I have seen situations with the newer version where the program appears to hang on shutdown and eventually I get the following exception: Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: "java.lang.NullPointerException" [5-185] at org.h2.message.DbException.getJdbcSQLException(DbException.java:345) at org.h2.message.DbException.get(DbException.java:168) at org.h2.message.DbException.convert(DbException.java:295) at org.h2.mvstore.db.MVTableEngine$1.uncaughtException(MVTableEngine.java:93) at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2384) at org.h2.mvstore.MVStore$BackgroundWriterThread.run(MVStore.java:2570) Caused by: java.lang.NullPointerException at org.h2.mvstore.db.ValueDataType.compare(ValueDataType.java:102) at org.h2.mvstore.db.TransactionStore$ArrayType.compare(TransactionStore.java:1744) at org.h2.mvstore.MVMap.areValuesEqual(MVMap.java:601) at org.h2.mvstore.MVMap.replace(MVMap.java:615) at org.h2.mvstore.MVMap.rewrite(MVMap.java:806) at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) at org.h2.mvstore.MVMap.rewrite(MVMap.java:823) at org.h2.mvstore.MVMap.rewrite(MVMap.java:782) at org.h2.mvstore.MVStore.compactRewrite(MVStore.java:1796) at org.h2.mvstore.MVStore.compact(MVStore.java:1688) at org.h2.mvstore.MVStore.writeInBackground(MVStore.java:2380) but i have never seen this with the older version. This is happening with Java 1.8.0_20-b26 on 64 bit intel server with the database file residing on an SSD drive. The program that executes the insert statements first executes the following SET AUTOCOMMIT FALSE SET UNDO_LOG 0 SET LOCK_MODE 0 SET LOG 0 SET CACHE_SIZE 1048576 and it never executes a commit until the very end (before shutdown). It uses a prepared INSERT statement and sets the value of its fields using statement.setObject(col,val) where value in that case is always a String object. Thanks, johann -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to h2-database+unsubscr...@googlegroups.com. To post to this group, send email to h2-database@googlegroups.com. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.