<div dir="ltr">Oops, did not read your message carefully enough. My bad. I thought your problem was on AIX. <div><br></div><div>Everything I said about LDR_CNTRL was only for AIX.</div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Thu, Apr 18, 2013 at 8:17 AM, Steve Poole <span dir="ltr">&lt;<a href="mailto:spoole@linux.vnet.ibm.com" target="_blank">spoole@linux.vnet.ibm.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><div>I don&#39;t think I&#39;m setting LDR_CNTRL but I will check..</div><div><br></div><div>On AIX the minimum stack size being reported is <span style="font-size:11px;white-space:pre-wrap"> 768k</span></div>
<div><br></div><div><br></div><br><div><div>On 17 Apr 2013, at 19:22, Thomas Stüfe &lt;<a href="mailto:thomas.stuefe@gmail.com" target="_blank">thomas.stuefe@gmail.com</a>&gt; wrote:</div><br><blockquote type="cite"><div dir="ltr">
Hi,<div><br></div><div>Steve, did you maybe set LDR_CNTRL in your environment? If yes, and it forces C-heap pages to 64K, this may be the reason for the high default (1920k are 30 64K pages). A workaround may be to switch off 64K pages for the C-Heap (LDR_CNTRL=&quot;..DATAPSIZE=4K..&quot;)<br>

</div><div><br></div><div>Stacks for java threads on AIX are allocated by the pthread library from C-heap and are therefore subject to the C-heap data page size, which can be either 4K or 64K. This depends on the setting you are running in - it can be changed via the LDR_CNTRL environment variable (eg LDR_CNTRL=&quot;..DATAPSIZE=64K..&quot;, see <a href="http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.user.aix32.60%2Fuser%2Faix_ldr_cntrl_page_sizes.html" target="_blank">http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=%2Fcom.ibm.java.doc.user.aix32.60%2Fuser%2Faix_ldr_cntrl_page_sizes.html</a>) or in the XCOFF itself (with ldedit, I think).<br>

</div><div><div><br></div><div>I think the SAPJVM is able to cope with 64K pages in the C-Heap - we put some work into this - but the usual mode of operation is a C Heap page size of 4K. I think the wasteful stacks are the reason for that. For stacks, you want small pages.</div>

<div><br></div><div>Note that all this stuff is independent from -XX:+UseLargePages, which changes the page size of the java heap but leaves the C heap page size alone.</div></div><div><br></div><div>
<div>Kind Regards, Thomas<br></div></div><div><div></div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 17, 2013 at 7:40 PM, Volker Simonis <span dir="ltr">&lt;<a href="mailto:volker.simonis@gmail.com" target="_blank">volker.simonis@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Steve,<br>
<br>
I suspected you&#39;ll come back with this issue, especially after I<br>
pretended that it will be easy to fix :)<br>
<br>
You&#39;re actually right, the minimum stack size is computed at VM<br>
startup from various other parameters one of which is the OS page<br>
size.<br>
It&#39;s a long standing problem in HotSpot that at various places it is<br>
assumed that the default OS page size is 4k. That&#39;s obviously not true<br>
anymore (on Linux/PPC it&#39;s usually 64k) and that leads to such kind of<br>
errors (if you&#39;d divide 1920k by 16 you&#39;d get 120k which would be<br>
reasonable).<br>
<br>
We&#39;ve already changes this behavior in our SAP JVM  but that&#39;s quite a<br>
large shared code change which we&#39;ve omitted from the port so far.<br>
Please let me discuss this with Goetz tomorrow to see haw we can fix<br>
this for our port - but I think it would be reasonable to fix it in<br>
the HotSpot and not in the test.<br>
<br>
Regards,<br>
Volker<br>
<div><div><br>
On Wed, Apr 17, 2013 at 6:30 PM, Steve Poole &lt;<a href="mailto:spoole@linux.vnet.ibm.com" target="_blank">spoole@linux.vnet.ibm.com</a>&gt; wrote:<br>
&gt;<br>
&gt; hi.  we are  working though the last remaining jtreg test failures for<br>
&gt; PPCAIX.<br>
&gt;<br>
&gt; I have some that are failing on Linux PPC as the  test explicitly sets the<br>
&gt; minimum stack size  to &quot;-Xss256k&quot; . The VM then fails to launch with the<br>
&gt; usual error<br>
&gt;<br>
&gt; The stack size specified is too small, Specify at least 1920k<br>
&gt;   Error: Could not create the Java Virtual Machine.<br>
&gt;   Error: A fatal exception has occurred. Program will exit.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; So I can adjust the stack size in the testcases to suit this number or<br>
&gt; remove it altogether.  But...<br>
&gt;<br>
&gt; 1 - This number of 1920k seems a trifle  excessive  - is it something I&#39;m<br>
&gt; doing wrong in building hotspot or is this actually a reasonable number?<br>
&gt; 2 - Since it seems from reading the hotspot code that this number is<br>
&gt; calculated is there any Java API I can use to get this number so I can make<br>
&gt; the tests more flexible?<br>
&gt;<br>
&gt;<br>
&gt; Cheers<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>
</blockquote></div><br></div></blockquote></div><br></div>