<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 4, 2021 at 12:22 AM Marcel Taeumel <<a href="mailto:marcel.taeumel@hpi.de">marcel.taeumel@hpi.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_4638330493892163388__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr">
                                        Hi all --<div><br></div><div>If we really want to test an out-of-memory event, we might want to implement a configurable boundary in the VM to accommodate today's operating systems as Tobias explained.</div><div><br></div><div>In the past, this test relied on an implementation detail in the OS that is no longer valid. Such tests are never a good idea. Instead, let's replace this test with something like:</div><div><br></div><div><span style="font-size:10pt">testOutOfMemorySignalExtreme</span><br></div><div><span style="font-size:10pt">   self setMemoryLimit: 2 * 1024 * 1024 * 1024.</span></div><div><span style="font-size:10pt">   self should: [self useUpAllMemory] raise: OutOfMemory.</span></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">+1000</div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_4638330493892163388__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><span style="font-size:10pt"><br></span></div><div><span style="font-size:10pt">At the moment, such a memory limit is currently not configurable in recent VMs. If we had such a limit, one could set it to match a machine's physical memory -- or 80% of it -- to not stress SSDs too much because of paging.</span></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Are you sure?  I think it is VM parameter 67, e.g.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">    #67<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>0<span class="gmail-Apple-tab-span" style="white-space:pre">     </span>the maximum allowed size of old space (if zero there is no limit)</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">Smalltalk vmParameterAt: 67 put: 8 * 1024 * 1024 * 1024<br></div><div class="gmail_default"><br></div><div class="gmail_default" style="font-size:small">    #67<span class="gmail-Apple-tab-span" style="white-space:pre">       </span>8,589,934,592<span class="gmail-Apple-tab-span" style="white-space:pre"> </span>the maximum allowed size of old space (if zero there is no limit)</div><div class="gmail_default" style="font-size:small"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_4638330493892163388__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><span style="font-size:10pt"><br></span></div><div><span style="font-size:10pt">Of course, such a limit could be "undefined" to realize the current situation. And for backwards compatibility.</span></div></div></blockquote><div><br></div><div class="gmail_default" style="font-size:small">It is.  But default the value is zero, which means "unlimited".</div><div class="gmail_default" style="font-size:small"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div id="gmail-m_4638330493892163388__MailbirdStyleContent" style="font-size:10pt;font-family:Arial;color:rgb(0,0,0);text-align:left" dir="ltr"><div><span style="font-size:10pt"><br></span></div><div><span style="font-size:10pt">Best,</span></div><div><span style="font-size:10pt">Marcel</span></div><div></div>
                                        <blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-top:20px;margin-left:0px;padding-left:10px;min-width:500px">
                        <p style="color:rgb(170,170,170);margin-top:10px">Am 03.08.2021 22:19:14 schrieb Tobias Pape <<a href="mailto:das.linux@gmx.de" target="_blank">das.linux@gmx.de</a>>:</p><div style="font-family:Arial,Helvetica,sans-serif">Hi<br><br><br>> On 3. Aug 2021, at 20:05, Eliot Miranda <u></u> wrote:<br>> <br>> Hi All,<br>> <br>>     something needs to be done about this test.  Whenever I run it on macos it never runs out of memory before the system starts complaining. I've just been presented with a dialog telling me that the system is out of application memory and something needs to quit, while the Squeak process is 236 Gb big.  A test that locks up the system isn't very useful.<br><br>macOS uses the dynamic_pager(8) to handle swap.<br>It tries very very hard to satisfy your ram demands.<br>just out of curiosity, do a <br><br>    ls -hal /var/vm<br><br>and see all the swap files it happily creates when you ask for more ram than you have.<br><br>The test really only makes sense if the OS does not pretend to have an infinite amount of random access bits.<br>Thus probably only sensible on linux these days (it presume even iOS has the dynamic pager…)<br><br>(Note: it seems dynamic_pager got stripped down over releases, and does not do much anymore;<br>functionality still exists but is less configurable and problably in-kernel only.<br>Main point stands tho)<br><br>Best regards<br> -Tobias<br><br><br><br>> _,,,^..^,,,_<br>> best, Eliot<br><br><br><br><u></u></div></blockquote></div><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></div></div>