0

Reading, possibly out of date info, elsewhere OS X seems to limit the maximum process size according to the total RAM and a fixed proportion of the available disk.

The new 2018 Mac Mini is very tempting, but what will the effect of limiting myself to a 128G or 256G in terms of process size?

I'm currently use Wolfram Mathematica to do so some weighty audio simulation on a 2009 16Gigabyte 2.88Ghz 4 Core Mac Pro with OS X El Capitan installed on a 256G SSD and piles of extra SATA HD. Every so often Wolfram come to a dead stop and quits, which may be a memory issue but I'm not sure.

  • One has nothing to do with the other. Swap space is spaced used when you run out of memory. An SSD or HDD has nothing to do with the process size, your memory does. – Allan Jan 3 at 15:13
  • I'm well aware of the theory behind virtual memory and the like, but if the only limit to process size was the width of the address bus then since OS X is 64 bit I should be able to address in excess of an Exabyte of memory. This plainly is not the case since processes do report they have run out of memory, well before any such limit. Discussions such as link imply there is an OS limit – Nick Jan 3 at 15:21
  • From that very link, someone has posted a link to official documentation that macOS can address up to 18 Exabytes of RAM. What you are missing in that equation is the maximum amount of RAM the CPU can support. See this answer for more details: apple.stackexchange.com/a/317994/119271 – Allan Jan 3 at 15:29
  • That said...what does an SSD drive have to do with it? Why is the SSD relevant here? – Allan Jan 3 at 15:31
  • If max VM is limited to a proportion the disk size, or SSD in Mini, then since in a Mini the SSD is hardwired and not upgradeable I'd like to know if I need a larger SSD to support larger VM sizes as I grow the simulation size. – Nick Jan 3 at 15:45
1

macOS does not limit the maximum process size (i.e. working set) according to total RAM and a fixed proportion of available disk. This is 100% not the case in any way at all.

You can set arbitrary limits on process size using the "ulimit" command in the Terminal, those are however limits chosen by the user - and thus can be changed as need be.

There are ofcourse actual, "physical" limits of a process size given by the hardware. Contrary to common belief, it is not actually possible for an ordinary 64-bit system to have processes that address 2^64-1 bytes of RAM. On macOS (and Windows other systems) processes are actually limited to 2^48-1 bytes instead. I.e. a given pointer only has 48 bits that are actually significant.

There are paging techniques to counter this, but in practice no ordinary program employs them.

In addition to the physical limits, there are other limits you'll run into. If you have meaningful data in RAM, the system needs somewhere to store it. The total RAM installed on the system as well as the free disk space available for swapping becomes a limit.

Note that this is not a fixed limit in any way. If your RAM contents are compressable (i.e. for example if it contains many repeated bytes), then you'll be able to have extremely large process sizes without problems. Much more than you have physical RAM and swap space.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .