EclipseLink
EclipseLink Performance Summary
The following charts show the performance of EclipseLink (in green) relatively to other JPA/DBMS combinations (in gray).
Position #1 on the X-Axis (the fastest) is about 100 times faster than position #33 (the slowest).
The configurations in which EclipseLink has been tested are listed in the following table:
Database + JPA Provider | Normalized Score 100 - Best, 0 - Worst | Final Position 1 - Best, 33 - Worst | Failed Tests | |
---|---|---|---|---|
1 | EclipseLink with H2 embedded | 18.4 | 3 (out of 33) | 0 |
2 | EclipseLink with HSQLDB embedded | 17.9 | 4 (out of 33) | 0 |
3 | EclipseLink with Derby embedded | 13.6 | 6 (out of 33) | 0 |
4 | EclipseLink with PostgreSQL server | 10.5 | 8 (out of 33) | 0 |
5 | EclipseLink with Derby server | 6.6 | 17 (out of 33) | 0 |
6 | EclipseLink with H2 server | 4.5 | 21 (out of 33) | 0 |
7 | EclipseLink with MySQL server | 2.3 | 29 (out of 33) | 0 |
8 | EclipseLink with SQLite embedded | 0.52 | 33 (out of 33) | 39 |
About EclipseLink
EclipseLink is a persistence framework that includes also object-relational mapping (ORM), based on Orcale's TopLink object-relational mapping product. EclipseLink is developed in the Eclipse organization. It is also the reference implementation of JPA 2.0.
EclipseLink is available as open source under the Eclipse Public License (EPL) and the Eclipse Distribution License (EDL).
In this benchmark EclipseLink 2.3.2 (which was released in December 2011) has been tested.
EclipseLink Performance Tuning
The EclipseLink default configuration is generally optimized for high performance, and works very well also with no tuning.
To maximize performance we followed the Using EclipseLink JPA Extensions instructions:
-
The
eclipselink.cache.size.default
property was set to5000
to support large transactions. -
The
eclipselink.flush-clear.cache
property was set toDrop
, which according to the instructions is "the fastest and uses the least memory". -
Target databases have been defined using the
eclipselink.target-database
property. -
The
eclipselink.jdbc.native-sql
property was set totrue
. -
The
eclipselink.jdbc.batch-writing
property was set toOracle-JDBC
. -
The
eclipselink.jdbc.cache-statements
property was set totrue
and theeclipselink.jdbc.cache-statements.size
property was set to100
. - All the entity classes have been woven (enhanced) by running the tests with a Java Agent (javaagent:eclipselink.jar). Class enhancement time was completely excluded from the test time measurement.
-
Logging was disabled by setting the
eclipselink.logging.level
property tofalse
.
Note: Database schema generation was completed before time measurement started.
Solved Problems and Issues
The stack traces below demonstrate some exceptions that have been thrown when using EclipseLink in previous runs of this benchmark and have been fixed by upgrading software and setting.
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: user lacks privilege or object not found: PERSON Error Code: -5501 Call: INSERT INTO PERSON (ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [1, CIPUPKQIKER, QGSHJQRJRQY, 708733964, 134036188972027, 1983-01-05, NYMIGRADOXLQ, ZT, 94, QEJSJKOIVRYODJXSU, KTJPTPAIWD, 1950-03-07, [email protected], 1947-10-31, SLCIBTPWESS] Query: InsertObjectQuery(SLCIBTPWESS CIPUPKQIKER QGSHJQRJRQY) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63) at org.jpab.Test.persist(Test.java:216) at org.jpab.Test.persist(Test.java:199) at org.jpab.Runner$PersistAction.run0(Runner.java:528) at org.jpab.Runner$TestAction.run(Runner.java:507) at java.lang.Thread.run(Thread.java:619) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: user lacks privilege or object not found: PERSON Error Code: -5501 Call: INSERT INTO PERSON (ID, MIDDLENAME, LASTNAME, ZIP, PHONE, LASTLOGINDATE, STREET, STATE, LOGINCOUNT, CITY, COUNTRY, JOINDATE, EMAIL, BIRTHDATE, FIRSTNAME) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) bind => [1, CIPUPKQIKER, QGSHJQRJRQY, 708733964, 134036188972027, 1983-01-05, NYMIGRADOXLQ, ZT, 94, QEJSJKOIVRYODJXSU, KTJPTPAIWD, 1950-03-07, [email protected], 1947-10-31, SLCIBTPWESS] Query: InsertObjectQuery(SLCIBTPWESS CIPUPKQIKER QGSHJQRJRQY) at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:683) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:526) at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:980) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:206) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:192) at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.insertObject(DatasourceCallQueryMechanism.java:341) at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:162) at org.eclipse.persistence.internal.queries.StatementQueryMechanism.insertObject(StatementQueryMechanism.java:177) at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:465) at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80) at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90) at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:290) at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58) at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:736) at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:643) at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:108) at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:85) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2909) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1291) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1273) at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1233) at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:224) at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:123) at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3348) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1422) at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:546) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithChangeSet(UnitOfWorkImpl.java:1527) at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:200) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1148) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84) ... 6 more Caused by: java.sql.SQLException: user lacks privilege or object not found: PERSON at org.hsqldb.jdbc.Util.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCPreparedStatement.(Unknown Source) at org.hsqldb.jdbc.JDBCConnection.prepareStatement(Unknown Source) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1401) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1350) at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:652) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:576) ... 35 more Caused by: org.hsqldb.HsqlException: user lacks privilege or object not found: PERSON at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.SchemaManager.getTable(Unknown Source) at org.hsqldb.ParserDQL.readTableName(Unknown Source) at org.hsqldb.ParserDML.compileInsertStatement(Unknown Source) at org.hsqldb.ParserCommand.compilePart(Unknown Source) at org.hsqldb.ParserCommand.compileStatement(Unknown Source) at org.hsqldb.Session.compileStatement(Unknown Source) at org.hsqldb.StatementManager.compile(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) ... 41 more
javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`jpab8441120340`.`node`, CONSTRAINT `FK_NODE_CHILD1_ID` FOREIGN KEY (`CHILD1_ID`) REFERENCES `node` (`ID`)) Error Code: 1451 at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:102) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:63) at org.jpab.Test.doAction(Test.java:272) at org.jpab.Runner$RemoveAction.run0(Runner.java:578) at org.jpab.Runner$TestAction.run(Runner.java:508) at java.lang.Thread.run(Thread.java:619) Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.1.1.v20100817-r8050): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`jpab8441120340`.`node`, CONSTRAINT `FK_NODE_CHILD1_ID` FOREIGN KEY (`CHILD1_ID`) REFERENCES `node` (`ID`)) Error Code: 1451 at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeJDK12BatchStatement(DatabaseAccessor.java:830) at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:139) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1632) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.commitTransaction(DatabaseAccessor.java:399) at org.eclipse.persistence.internal.sessions.AbstractSession.basicCommitTransaction(AbstractSession.java:504) at org.eclipse.persistence.sessions.server.ClientSession.basicCommitTransaction(ClientSession.java:155) at org.eclipse.persistence.internal.sessions.AbstractSession.commitTransaction(AbstractSession.java:686) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransaction(UnitOfWorkImpl.java:1581) at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitTransaction(RepeatableWriteUnitOfWork.java:559) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1604) at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:207) at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1148) at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commitInternal(EntityTransactionImpl.java:84) ... 5 more Caused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`jpab8441120340`.`node`, CONSTRAINT `FK_NODE_CHILD1_ID` FOREIGN KEY (`CHILD1_ID`) REFERENCES `node` (`ID`)) at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1693) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1108) at org.eclipse.persistence.platform.database.MySQLPlatform.executeBatch(MySQLPlatform.java:198) at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeJDK12BatchStatement(DatabaseAccessor.java:817) ... 17 more