<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I am personally content if you provide the total amount of memory for Pod and you as OSB designer decide of the -Xms/Xmx for the services. Unlike what Sanne said I think, Amazon and the like they don’t give you x GB of cache. They give you an instance of Redis or Memcached within a VM that has x amount of GB allocated. What you can stuck in is left as an exercise for the reader.</div><div class=""><br class=""></div><div class="">Not ideal but I think they went for the practical in this case.</div><div class=""><br class=""></div><div class="">For the pain JDG, then more options is fine.</div><br class=""><div><blockquote type="cite" class=""><div class="">On 28 Sep 2017, at 12:00, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com" class="">slaskawi@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">So how about exposing two parameters - Xms/Xmx and Total amount of memory for Pod (Request = Limit in that case). Would it work for you?</div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Sep 28, 2017 at 8:38 AM Emmanuel Bernard &lt;<a href="mailto:emmanuel@hibernate.org" class="">emmanuel@hibernate.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Sebastian,<div class=""><br class=""><div class="">What Galder, Sanne and others are saying is that in OpenShift on prem, there is no or at least a higher limit in the minimal container memory you can ask. And in these deployment, Infinispan should target the multi GB, not 512 MB.</div><div class=""><br class=""></div><div class="">Of course, *if* you ask for a guaranteed 512MB, then it would be silly to try and consume more.</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""></blockquote></div></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">On 25 Sep 2017, at 12:30, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com" target="_blank" class="">slaskawi@redhat.com</a>&gt; wrote:</div><br class="m_-8021213444855815764Apple-interchange-newline"></blockquote></div></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Sep 25, 2017 at 11:54 AM Galder Zamarreño &lt;<a href="mailto:galder@redhat.com" target="_blank" class="">galder@redhat.com</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't understand your reply here... are you talking about Infinispan instances deployed on OpenShift Online? Or on premise?<br class=""></blockquote><div class=""><br class=""></div><div class="">TBH - I think there is no difference, so I'm thinking about both.</div><div class="">&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can understand having some limits for OpenShift Online, but these templates should also be applicable on premise, in which case I should be able to easily define how much memory I want for the data grid, and the rest of the parameters would be worked out by OpenShift/Kubernetes?<br class=""></blockquote><div class=""><br class=""></div><div class="">I have written a couple of emails about this on internal mailing list. Let me just point of some bits here:</div><div class=""><ul class=""><li class="">We need to set either Xmx or MaxRAM to tell the JVM how much memory it can allocate. As you probably know JDK8 is not CGroups aware by default (there are some experimental options but they set MaxRAM parameter equal to CGroups limit; this translates to Xmx=MaxRAM(CGroups limit) / 4. I guess allocating Xmx=(CGroups limit)/4 is too high for us, so we need to set it explicitly.</li><li class="">in our Docker image we set Xmx = 50% of CGroups limit. This is better than settings above but there is some risk in certain scenarios.</li><li class="">As I mentioned in my previous email, in the templates we are setting Requests (not Limits!!!). So you will probably get more memory than specified in the template but it depends on the node you're running on. The key point is that you won't get less than those 512 MB.</li><li class="">You can always edit your DeploymentConfig (after creating your application from template) and adjust Limits (or even requests).</li><li class="">For simple scenarios and bigger containers (like 4 GB) we can go more than 50% (see internal mailing list for details).</li></ul><div class="">And as I said before - if you guys think we should do it differently, I'm open for suggestions. I think it's quite standard way of configuring this sort of stuff.</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
To demand on premise users to go and change their template just to adjust the memory settings seems to me goes against all the usability improvements we're trying to achieve.<br class=""></blockquote><div class=""><br class=""></div><div class="">At some point you need to define how much memory you will need. Whether it's in the template, your DeploymentConfiguration (created from template using oc process), Quota - it doesn't matter. You must write it somewhere - don't you? With current approach, the best way to do it is in Deployment Configuration Requests. This sets CGroups limit, and based on that, Infinispan bootstrap scripts will calculate Xmx.&nbsp;</div><div class="">&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">
Cheers,<br class="">
<br class="">
&gt; On 22 Sep 2017, at 14:49, Sebastian Laskawiec &lt;<a href="mailto:slaskawi@redhat.com" target="_blank" class="">slaskawi@redhat.com</a>&gt; wrote:<br class="">
&gt;<br class="">
&gt; It's very tricky...<br class="">
&gt;<br class="">
&gt; Memory is adjusted automatically to the container size [1] (of course you may override it by supplying Xmx or "-n" as parameters [2]). The safe limit is roughly Xmx=Xms=50% of container capacity (unless you do the off-heap, that you can squeeze Infinispan much, much more).<br class="">
&gt;<br class="">
&gt; Then there are Limits, Requests and QoS in Kubernetes [3][4]. We are in bustable memory category so if there is additional memory in the node, we'll get it. But if not, we won't go below 512 MB (and 500 mCPU).<br class="">
&gt;<br class="">
&gt; Thanks,<br class="">
&gt; Sebastian<br class="">
&gt;<br class="">
&gt; [1] <a href="https://github.com/jboss-dockerfiles/infinispan/tree/master/server#adjusting-memory" rel="noreferrer" target="_blank" class="">https://github.com/jboss-dockerfiles/infinispan/tree/master/server#adjusting-memory</a><br class="">
&gt; [2] <a href="https://github.com/jboss-dockerfiles/infinispan/blob/master/server/docker-entrypoint.sh#L303-L308" rel="noreferrer" target="_blank" class="">https://github.com/jboss-dockerfiles/infinispan/blob/master/server/docker-entrypoint.sh#L303-L308</a><br class="">
&gt; [3] <a href="https://www.youtube.com/watch?v=nWGkvrIPqJ4" rel="noreferrer" target="_blank" class="">https://www.youtube.com/watch?v=nWGkvrIPqJ4</a><br class="">
&gt; [4] <a href="https://docs.openshift.com/enterprise/3.2/dev_guide/compute_resources.html" rel="noreferrer" target="_blank" class="">https://docs.openshift.com/enterprise/3.2/dev_guide/compute_resources.html</a><br class="">
&gt;<br class="">
&gt; On Fri, Sep 22, 2017 at 2:33 PM Galder Zamarreño &lt;<a href="mailto:galder@redhat.com" target="_blank" class="">galder@redhat.com</a>&gt; wrote:<br class="">
&gt; Hi Sebastian,<br class="">
&gt;<br class="">
&gt; How do you change memory settings for Infinispan started via service catalog?<br class="">
&gt;<br class="">
&gt; The memory settings seem defined in [1], but this is not one of the parameters supported.<br class="">
&gt;<br class="">
&gt; I guess we want this as parameter?<br class="">
&gt;<br class="">
&gt; Cheers,<br class="">
&gt;<br class="">
&gt; [1] <a href="https://github.com/infinispan/infinispan-openshift-templates/blob/master/templates/infinispan-ephemeral.json#L308" rel="noreferrer" target="_blank" class="">https://github.com/infinispan/infinispan-openshift-templates/blob/master/templates/infinispan-ephemeral.json#L308</a><br class="">
&gt; --<br class="">
&gt; Galder Zamarreño<br class="">
&gt; Infinispan, Red Hat<br class="">
&gt;<br class="">
<br class="">
--<br class="">
Galder Zamarreño<br class="">
Infinispan, Red Hat<br class="">
<br class="">
</blockquote></div></div></div></blockquote></div></div></div></div><div style="word-wrap:break-word" class=""><div class=""><div class=""><div class=""><blockquote type="cite" class=""><div class="">
_______________________________________________<br class="">infinispan-dev mailing list<br class=""><a href="mailto:infinispan-dev@lists.jboss.org" target="_blank" class="">infinispan-dev@lists.jboss.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></div></blockquote></div></div></div></div>_______________________________________________<br class="">
infinispan-dev mailing list<br class="">
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank" class="">infinispan-dev@lists.jboss.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a></blockquote></div>
_______________________________________________<br class="">infinispan-dev mailing list<br class=""><a href="mailto:infinispan-dev@lists.jboss.org" class="">infinispan-dev@lists.jboss.org</a><br class="">https://lists.jboss.org/mailman/listinfo/infinispan-dev</div></blockquote></div><br class=""></body></html>