Hi James<br><br>I put a lot of effort into this recently, and there does not appear to be any real practical solution to the problem.<br>The problem is caused by how zones use memory and kernel space.<br><br>In sparse zones, all kernels are the same kernel. There is only one instance of the kernel running, and as a result, only one chunk of memory visible to the kernel. <br>
<br>When you set a memory cap in your zone definition, and do a prtconf in the zone, it reports the value of the memory cap as the available memory.<br>So far, so good.<br><br>However, to determine free memory, we have to interrogate the kernel. This can be done a number of different ways. Xymon, by default uses vmstat.<br>
You can also use kstat -p unix:0:system_pages:freemem and I am sure there are others.<br>However, the kernel in question, is the kernel running in the global zone!<br>It's all one kernel.<br>So the reported memory free is the free memory available to the kernel. It should be the same value in all the zones too.<br>
<br>The error you are seeing occurs when free memory available to the global kernel is more than the memory cap you have placed on the zone.<br>In C (and many other programming languages), if you subtract big numbers from smaller numbers, you sometimes get strange results depending on how your variables are defined. I think that's where your multi-Petabyte memory is coming from. Any programmers out there that can confirm this?<br>
<br>The other problem this creates, is that any sane-looking zone memory percentages are meaningless. They do not represent the true memory utilisation within the zone. Your zone memory utilisation could be 100%, and you would not realise it, because your kernel is still seeing heaps of free memory, and reporting lots free.<br>
Imagine a 2gb cap, and the apps in the zone are using all 2gb.<br>However, the kernel can see 1.8gb free. <br>Do the maths. Xymon tells us your zone is only using 10% of memory, which is far from the truth.<br><br>The only real way round it might not fit with your policies and methods.<br>
You need to remove all memory caps.<br>This floats all memory, meaning that the memory "seen" in the zone, is the same as the kernel, and Solaris does the management of memory, ensuring all zones get enough.<br>
It also means that all of the zones will show identical memory graphs.<br><br>The other way, which I haven't had time to do yet, is to use prstat -Z in the global zone.<br>This gives a summary of what the zones are using, which might be worth tracking.<br>
<br>As a short-term workaround, because we need memory caps for certain apps, we have skipped memory monitoring on the zones. (It's pretty meaningless anyway - see above)<br>We have the global zone, and below it, all the zones, with the NOCOLUMNS:memory bb-hosts tag.<br>
<br>It's not really ideal, but I hope to find time to revisit this in the near future.<br><br>It would be nice to be able to disable just the memory test on these, and only keep an eye on swap. Swap is local to the zone, and if you start using heaps of it in the zone, or are doing lots of paging, chances are you are maxing out your memory allocation.<br>
So swap is probably a good indicator.<br><br>Sorry I could not be of any more help.<br><br>Regards<br>     Vernon<br><br><br><br><br><div class="gmail_quote">On Wed, Feb 24, 2010 at 1:35 AM, James Wade <span dir="ltr"><<a href="mailto:jkwade@futurefrontiers.com">jkwade@futurefrontiers.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">Has anyone see this problem. I’ve
just compiled 4.3.0.0.beta2 on a<br>
Solaris 10 system. I’m running on a Sun T5120 series in a Solaris<br>
sparse zone. </span></font></b></h3>

<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">When I run the server, I get
the following on the memory test.<br>
Fyi.. I don’t have 4.2 peta bytes of memory </span></font></b><font color="black" face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings; color: black; font-weight: normal;">J</span></font><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;"></span></font></h3>


<h3><b><font color="black" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: black; font-weight: normal;">Has anyone seen similar problems.
Running the client in the global zone works fine.</span></font></b></h3>

<h3><b><font color="black" face="Times New Roman" size="4"><span style="font-size: 13.5pt; color: black;">Tue Feb 23 10:52:43 CST 2010 - Memory CRITICAL</span></font></b></h3>

<pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;">   Memory              Used       Total  Percentage</span></font></pre><pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"><img src="cid:image001.gif@01CAB47C.4AFB0670" alt="red" width="16" border="0" height="16"> Physical     4294966186M      26624M 4294967292%</span></font></pre>
<pre><font color="black" face="Courier New" size="2"><span style="font-size: 10pt; color: black;"><img src="cid:image002.gif@01CAB47C.4AFB0670" alt="green" width="16" border="0" height="16"> Swap                148M      26623M          0%</span></font></pre>
<pre><font color="#d8d8bf" face="Courier New" size="2"><span style="font-size: 10pt;"> </span></font></pre>

<p class="MsoNormal"><font face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial;"> </span></font></p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"> </span></font></p>

<p class="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Thanks…James</span></font></p>

</div>

</div>


</blockquote></div><br>