3 Replies Latest reply on Nov 28, 2018 5:32 AM by amischler

    Modeshape 5 and remote persistent JDBC store

    scott.reisdorf

      When configuring Modeshape 5.4 to use a remote MySQL JDBC store for the repository I have noticed it takes a very log time to query the data.

      Modeshape appears to be issuing thousands of sql select statements similar to the following:

       

      SELECT CONTENT from MODESHAPE_REPOSITORY where ID = ?

       

      This doesn't scale across the network.  Are there any options to increase performance when using Modeshape with a remote database?

      I have turned on various local indexes but that doesn't seem to reduce the number of queries to the database.

      It would be helpful if someone could outline why Modeshape has to make all those individual SELECT queries and if there is a way to optimize Modeshape so it can perform across a remote persistent JDBC store.

       

      Any help is appreciated.

       

      Thanks.

       

      -scott

        • 1. Re: Modeshape 5 and remote persistent JDBC store
          amischler

          Hi,

           

          We are experiencing the same issue. Did you find any solution/workaround to this performance issue ?

          • 2. Re: Modeshape 5 and remote persistent JDBC store
            dharrison

            I encountered this as well, using SQL Server. It is very chatty with the number of queries it issues ., especially starting up.  I found it worked best to keep the mode shape instance and database instance in the same data center . I ended up running modeshape In docker images in DC/OS and the database sever within same data center . In general, if there are lots of trips to the database , minimize the network latency and maximize the bandwidth between them. I’m unaware of modeshape optimizations that could be applied .

            • 3. Re: Modeshape 5 and remote persistent JDBC store
              amischler

              Thank you for sharing yor feedback on this.

               

              We did some profiling using a very simple configuration where the modeshape instance and the persistence database are hosted on the same server. We still get very bad performance results. According to the profiling sessions, it's dut to the fact that Modeshape is loading nodes one by one from the persistence layer, triggering many individual sql requests for each node that need to be evaluated instead of loading nodes in batches.

               

              I did not find any optimization that could be done either. I guess that it would require Modeshape to load nodes in batches from the underlying persistence layer, but I'm not sure that it is an "easy" change. Maybe a Modeshape developper feedback on this could help ?