Jetty-demo deploy 5 times slower with MySQL than with HSQLDB
Posted: Fri Feb 14, 2014 3:45 pm
Hi There,
I have set up two eclipse-workspace DemoSite projects. The only difference between the two is that one runs on HSQLDB while the other runs on MySQL. In the dependencyManagement section of the root pom, the MySQL dependency is:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.28</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
The Eclipse Console readouts for a successful deploy on Jetty are similar, and the sector of interest in both cases is given below.
Ant site jetty-demo using HSQLDB:
[artifact:mvn] [ERROR] 14:52:45 SchemaExport - HHH000389: Unsuccessful: alter table BLC_CUSTOMER_PHONE add constraint key1 unique (CUSTOMER_ID, PHONE_NAME)
[artifact:mvn] [ERROR] 14:52:45 SchemaExport - nombre del objeto ya existe: KEY1 in statement [alter table BLC_CUSTOMER_PHONE add constraint key1 unique (CUSTOMER_ID, PHONE_NAME)]
[artifact:mvn] [ WARN] 14:52:52 SolrResourceLoader - Can't find (or read) directory to add to classloader: lib (resolved as: C:\Users\Keith\AppData\Local\Temp\Keith\solrhome\lib).
[artifact:mvn] 2014-02-14 14:52:55.248:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/},file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/
[artifact:mvn] 2014-02-14 14:52:55.342:INFO:/:Initializing Spring FrameworkServlet 'mycompany'
[artifact:mvn] 2014-02-14 14:52:56.998:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[artifact:mvn] [INFO] Started Jetty Server
[artifact:mvn] 2014-02-14 14:52:57.076:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[artifact:mvn] 2014-02-14 14:52:57.076:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8443
Ant site jetty-demo using MySQL:
[artifact:mvn] [ERROR] 15:06:13 SchemaExport - HHH000389: Unsuccessful: alter table SANDBOX_ITEM_ACTION drop foreign key FKB270D74A9797A024
[artifact:mvn] [ERROR] 15:06:13 SchemaExport - Table 'broadleaf.sandbox_item_action' doesn't exist
[artifact:mvn] [ WARN] 15:26:35 SolrResourceLoader - Can't find (or read) directory to add to classloader: lib (resolved as: C:\Users\Keith\AppData\Local\Temp\Keith\solrhome\lib).
[artifact:mvn] 2014-02-14 15:26:38.136:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/},file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/
[artifact:mvn] 2014-02-14 15:26:38.229:INFO:/:Initializing Spring FrameworkServlet 'mycompany'
[artifact:mvn] 2014-02-14 15:26:39.823:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[artifact:mvn] 2014-02-14 15:26:39.901:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[artifact:mvn] 2014-02-14 15:26:39.901:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8443
[artifact:mvn] [INFO] Started Jetty Server
Notice how in the HSQLDB case the SolrResourceLoader warning occurs a mere 7 seconds after the last entry of an error run. In the MySQL case however 20 minutes elapse at the end of the error run before the SolrResourceLoader warning is raised.
The foregoing indicates that the performance hit may be related to the SolrResourceLoader or MySQL or both. In the case of Solr it may be a version or configuration problem. In the case of MySQL it could be a configuration or optimization problem.
Has anyone in the community encountered and resolved this problem and would like to share the solution with me.
Regards,
Keith
I have set up two eclipse-workspace DemoSite projects. The only difference between the two is that one runs on HSQLDB while the other runs on MySQL. In the dependencyManagement section of the root pom, the MySQL dependency is:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.28</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
The Eclipse Console readouts for a successful deploy on Jetty are similar, and the sector of interest in both cases is given below.
Ant site jetty-demo using HSQLDB:
[artifact:mvn] [ERROR] 14:52:45 SchemaExport - HHH000389: Unsuccessful: alter table BLC_CUSTOMER_PHONE add constraint key1 unique (CUSTOMER_ID, PHONE_NAME)
[artifact:mvn] [ERROR] 14:52:45 SchemaExport - nombre del objeto ya existe: KEY1 in statement [alter table BLC_CUSTOMER_PHONE add constraint key1 unique (CUSTOMER_ID, PHONE_NAME)]
[artifact:mvn] [ WARN] 14:52:52 SolrResourceLoader - Can't find (or read) directory to add to classloader: lib (resolved as: C:\Users\Keith\AppData\Local\Temp\Keith\solrhome\lib).
[artifact:mvn] 2014-02-14 14:52:55.248:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/},file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/
[artifact:mvn] 2014-02-14 14:52:55.342:INFO:/:Initializing Spring FrameworkServlet 'mycompany'
[artifact:mvn] 2014-02-14 14:52:56.998:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[artifact:mvn] [INFO] Started Jetty Server
[artifact:mvn] 2014-02-14 14:52:57.076:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[artifact:mvn] 2014-02-14 14:52:57.076:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8443
Ant site jetty-demo using MySQL:
[artifact:mvn] [ERROR] 15:06:13 SchemaExport - HHH000389: Unsuccessful: alter table SANDBOX_ITEM_ACTION drop foreign key FKB270D74A9797A024
[artifact:mvn] [ERROR] 15:06:13 SchemaExport - Table 'broadleaf.sandbox_item_action' doesn't exist
[artifact:mvn] [ WARN] 15:26:35 SolrResourceLoader - Can't find (or read) directory to add to classloader: lib (resolved as: C:\Users\Keith\AppData\Local\Temp\Keith\solrhome\lib).
[artifact:mvn] 2014-02-14 15:26:38.136:INFO:oejsh.ContextHandler:started o.m.j.p.JettyWebAppContext{/,file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/},file:/C:/ProjectsDirectory/eclipse-workspace/DemoSite/site/target/mycompany/
[artifact:mvn] 2014-02-14 15:26:38.229:INFO:/:Initializing Spring FrameworkServlet 'mycompany'
[artifact:mvn] 2014-02-14 15:26:39.823:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[artifact:mvn] 2014-02-14 15:26:39.901:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2] of [SSLv2Hello, SSLv3, TLSv1, TLSv1.1, TLSv1.2]
[artifact:mvn] 2014-02-14 15:26:39.901:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8443
[artifact:mvn] [INFO] Started Jetty Server
Notice how in the HSQLDB case the SolrResourceLoader warning occurs a mere 7 seconds after the last entry of an error run. In the MySQL case however 20 minutes elapse at the end of the error run before the SolrResourceLoader warning is raised.
The foregoing indicates that the performance hit may be related to the SolrResourceLoader or MySQL or both. In the case of Solr it may be a version or configuration problem. In the case of MySQL it could be a configuration or optimization problem.
Has anyone in the community encountered and resolved this problem and would like to share the solution with me.
Regards,
Keith