1

I am running Mac OS Catalina 10.15.6 with APFS formatted disk on an unsupported MAC using dosdude1 guide. My experience from windows is I had to make careful calculations on pagefile.sys and run into limits on swap and memory. Since I’m new to Mac, I wish to avoid any mistakes and learn how to manage things properly.

This is the view of my disk

Disk View

I have 4 Gigs of RAM on my system.

I want to increase the sizeof the Virtual Memory VM (which is 3.22 GB currently).

I have searched the internet in vain. Even a question in Ask Different has not been answered. My terms to solve this on windows aren’t helping me on Mac.

How do I achieve my goals and choose which size I should allocate?

bmike
  • 235,889
  • Is there a way for one to define a size for your Virtual Memory in Mac OS? Like we do in Windows? If I could define a size I would increase it, therefore my questions exists. – Hikmat E Ustad Aug 23 '20 at 15:00
  • 1
    Why would you define or impose a limit on virtual RAM when OS X provides approximately 18 exabytes of addressable space for 64-bit processes? It’s not clear how 17 exabytes os not enough for your workload. I’m not going to vote to close your question, but this isn’t something that’s needed on iOS or macOS. They went full 64 bit 8+ years ago – bmike Aug 23 '20 at 15:01
  • Why/How is not what I'm after, I'm exploring can – Hikmat E Ustad Aug 23 '20 at 15:08
  • Perfect. Edit in your actual memory allocation. I can help with that. I don’t doubt you have a problem, you just haven’t shown it to us with any sort of detail to begin to help you. – bmike Aug 23 '20 at 15:10
  • 2
    If you want to improve performance, then add more RAM and fit an SSD. Don't spend your time being an Operating System. Let the OS do that. – benwiggy Aug 23 '20 at 15:30
  • 1
    I so appreciate your clarifications. Forgive my large edit. This deserves +1 and some great answers and votes. It’s never wrong to not know or be willing to learn. Welcome to Ask Different! – bmike Aug 23 '20 at 15:38
  • 1
    Thanks @bmike . You make me feel welcome – Hikmat E Ustad Aug 23 '20 at 15:42

1 Answers1

7

The short answer, is you do nothing. The system decides what memory gets swapped to disk and allocates space as needed. The system allocates virtual memory addresses up to ~18 exabytes so that it can then swap as needed.

Note: Unlike most UNIX-based operating systems, OS X does not use a preallocated disk partition for the backing store. Instead, it uses all of the available space on the machine’s boot partition.

You may just have to choose programs that use macOS better if your system is under memory pressure and you can’t wait for things to work. Virtual memory and swap guarantee that programs eventually run when you overload the actual resources available. There is no need to change any tuning or limits on iOS or macOS.

Even better, containers let you share space and not get jammed with pagefile.sys blocking space. I recommend exactly what you propose, APFS containers to share all possible space. Add an inexpensive external drive and let the time machine back everything up so you are free to experiment without losing any games or data.

user
  • 133
bmike
  • 235,889
  • I have 320Gigs of disk with single container disk 1 with 5 volumes. Lets say I want to add a volume for storing all my games. I am going to allocate 60 Gigs to Catalina (containing Mac OS + Mac OS Data)(does that 60 Gig include the 3.22 GB VM?), therefore I would be left with the remaining volumes to store and play my epic games. Now when I play epic games the VM size would expand; so am I shooting my leg allocating 60 Gigs to Catalina or should I allocate more? Also will VM be pressurized since it is within those 60 Gigs or will it pick up free space from my Game Volume. Please consider – Hikmat E Ustad Aug 23 '20 at 15:22
  • @HikmatEUstad you are free to allocate at will on APFS. All volumes share free space and the space on disk does not contain the VM system other than if swap exhausts all free space. Let’s cross that bridge if you ever reach it. I say game on - you are micromanaging storage that’s not needed – bmike Aug 23 '20 at 15:24
  • Now I’m beginning to get why you ask - astute questions and apologies if my understanding of your situation takes me time to process. – bmike Aug 23 '20 at 15:25
  • That's OK Coming from a Windows OS one is constrained by the size of partition where Windows is installed. Additionally I like to keep all my epic games(on windows machine in separate partitions since OS may fail but my downloaded game data should not). In Windows I also have the cushion of allocating the Virtual Memory (Pagefile.sys) which is allocated within the OS partition I'm trying to replicate that same model on Catalina.Maybe I'm paranoid about loosing games. But the windows model has worked well for me. Separate OS and data partition in the same disk. If Windows fails I save my games. – Hikmat E Ustad Aug 23 '20 at 15:30
  • You are going to love containers and memory coming from windows. Even windows 10. No need for cushion or micromanaging files and disks. Apple’s os work like appliances. Imagine if there were a serious bug in this - it would brick millions and millions of iPhones the moment they update over the air. This code runs on way more devices than windows last time I saw good census numbers on active devices @HikmatEUstad – bmike Aug 23 '20 at 15:32
  • 1
    If your drive fails, it all fails. Use an external Time Machine drive for disaster recovery. macOS is not like Windows in so many ways. An APFS container beats a traditional partitioning structure hands down, as the sizes are continually flexible, not constrained like partitions. – Tetsujin Aug 23 '20 at 15:35
  • I suppose I should also mention that the upside of all this is that you really don't need to farm out your games, or anything else, to a different volume on the same disk. You would only need to do that if your total disk space was low, so you'd work to a separate physical drive. [Though, personally, long before that I'd have bought a bigger drive to avoid the situation entirely]. – Tetsujin Aug 23 '20 at 16:25
  • @Tetsujin steam is an exception to the rule IMO - being able to wipe that seems attractive, but it might still put hooks in the other containers. I haven’t dared install it lately - too much breakage last time I tried it. – bmike Aug 23 '20 at 16:26
  • @bmike - I'll bow to your experience on that one. I have Steam but I haven't used anything on it in a long time. I've used GoG recently & that seemed OK. I'm not a big gamer, but most of the stuff I do have just sits in Applications with everything else. [I'm not short on drive space, overall, I've 2 1TB SSDs & 12TB HD in this machine, so I don't try to push artificial 'separation' for things that 'want' to be on the boot drive] – Tetsujin Aug 23 '20 at 16:34
  • 1
    There’s hope they’ll be ready for Big Sur. I’m willing to try just about anything that supports the new OS today... https://steamcommunity.com/discussions/forum/2/2577697524294908642/ @Tetsujin may be water under the bridge now... – bmike Aug 23 '20 at 16:36
  • @bmike If I create a separate game volume on this container does that separate it from the lets call it the Mac OS volume (containing Mac OS + Mac OS Data + VM)? Then is the game volume immune to failures/update of Mac OS volume (Mac OS corruption / update to Big Sur )? – Hikmat E Ustad Aug 24 '20 at 11:48
  • @HikmatEUstad Yes - upgrade scripts only run on the paired system+data - as long as the overall APFS container remains the same (which is does unless you erase everything before you install) - you’re good. – bmike Aug 24 '20 at 14:50