<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 06-02-14 14:17, Mats Nor&eacute;n wrote:<br>
    </div>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi,
        <div>I have a use case where multiple users need to run multiple
          simultaneous solvers.</div>
        <div>Is there a best practice in scaling out Optaplanner for
          multitenancy?</div>
        <div>Just to be clear I'm not interested in scaling out a single
          optimization run but instead multiple solvers.</div>
        <div>So I'm looking for pros and cons for:</div>
        <div>- multiple solvers in the same JVM</div>
      </div>
    </blockquote>
    Provide 1 CPU core per Solver that's running in parallel.<br>
    1 Solver saturates 1 CPU core entirely<br>
    and it is ussually happy if it has 300mb of free heap space on top
    of it needs as a bare minimum.<br>
    If there is no such free heap space, you're basically trading more
    cpu for less memory (due to higher GC activity).<br>
    <br>
    So provide 1 CPU core per Solver that's running in parallel.<br>
    If you need to run 8 jobs and have 4 CPU cores, I would probably run
    4 at the same time for half the time.<br>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>- multiple JVM:s on a single machine (with multiple
          solvers)</div>
      </div>
    </blockquote>
    I see no reason to do that. By using 1 JVM you pool class instances,
    etc so use less memory overall.<br>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>- multiple machine setup</div>
      </div>
    </blockquote>
    Definitely the way to increase Solvers running in parallel.<br>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>- virtual machine vs lxc (Docker) vs bare metal</div>
      </div>
    </blockquote>
    No data on that yet.<br>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>I'm also interested in provisioning of rules etc <br>
        </div>
      </div>
    </blockquote>
    Let me know what works well for you and what doesn't with
    multitenancy!<br>
    <blockquote
cite="mid:CAAE3K7WyxLNyXKpvkbYoiorBQQyuVAuDU7i+6vy0vzXfDN+e_g@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>Regards,</div>
        <div>Mats</div>
        <div><br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>