[squeak-dev] [Vm-dev] testOutOfMemorySignalExtreme
eliot.miranda at gmail.com
Wed Aug 4 18:49:06 UTC 2021
On Wed, Aug 4, 2021 at 12:22 AM Marcel Taeumel <marcel.taeumel at hpi.de>
> Hi all --
> 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.
> 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:
> self setMemoryLimit: 2 * 1024 * 1024 * 1024.
> self should: [self useUpAllMemory] raise: OutOfMemory.
> 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.
Are you sure? I think it is VM parameter 67, e.g.
#67 0 the maximum allowed size of old space (if zero there is no limit)
Smalltalk vmParameterAt: 67 put: 8 * 1024 * 1024 * 1024
#67 8,589,934,592 the maximum allowed size of old space (if zero there
is no limit)
> Of course, such a limit could be "undefined" to realize the current
> situation. And for backwards compatibility.
It is. But default the value is zero, which means "unlimited".
> Am 03.08.2021 22:19:14 schrieb Tobias Pape <das.linux at gmx.de>:
> > On 3. Aug 2021, at 20:05, Eliot Miranda wrote:
> > Hi All,
> > 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.
> macOS uses the dynamic_pager(8) to handle swap.
> It tries very very hard to satisfy your ram demands.
> just out of curiosity, do a
> ls -hal /var/vm
> and see all the swap files it happily creates when you ask for more ram
> than you have.
> The test really only makes sense if the OS does not pretend to have an
> infinite amount of random access bits.
> Thus probably only sensible on linux these days (it presume even iOS has
> the dynamic pager…)
> (Note: it seems dynamic_pager got stripped down over releases, and does
> not do much anymore;
> functionality still exists but is less configurable and problably
> in-kernel only.
> Main point stands tho)
> Best regards
> > _,,,^..^,,,_
> > best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev