Live data from Hacker News

How fast is a macOS VM, and how small could it be?

eclecticlight.co

51–60 of 111 posts

Re: How fast is a macOS VM, and how small could it be?

#53

My only experience with VMs on macOS is colima+docker, and it's relatively painful and inefficient (but usable).

Try Apple's container CLI. I moved a project of mine from colima+docker to it relatively easily, a couple of weekends ago. https://github.com/apple/container

Thank you for this, will check it out!

Re: How fast is a macOS VM, and how small could it be?

#54

Honestly macOS probably can go much lower than that if you turn off some stuff that's not strictly necessary for a VM. The first iPhones only had 128 MiB of RAM and they ran a trimmed down version of macOS Tiger I believe. It's just that RAM has been quite abundant so far, so there was no real reason to try to trim it down, but it's definitely possible, and probably not that hard either, we just need to start trying…

Well early iPhones did not have app multitasking, so that‘s quite the difference. Any app was killed when when closed.

Re: How fast is a macOS VM, and how small could it be?

#55
post #49
post #41

Earlier quoted context omitted.

Even NT4 handles memory pressure than modern day Linux. It's just not a fair comparison; Linux has never dealt with userspace OOM well. As for macOS... https://old.reddit.com/r/MacOS/comments/1njf1aj/bravo_apple_... https://old.reddit.com/r/MacOS/comments/1nxh08n/impressive_m... https://old.reddit.com/r/MacOS/comments/1jo5pnq/passwords_ap... https://old.reddit.com/r/MacOS/comments/1gkwxe4/how_is_memor... https://old.…

Seeing there are thousands running those apps (incl. Freeform) without memory leaks, it could be something else at play here.

It's quite clearly a bug and likely not one easy to diagnose or reproduce given the length of time the bug has remained in macOS. Or a fix would be a drastic breaking change.

Or Apple doesn't really care, though I doubt that's the case.

Re: How fast is a macOS VM, and how small could it be?

#56
post #27
post #7

>Starting with 4 virtual cores and 8 GB vRAM, where the VM ran perfectly briskly with around 5 GB of memory used, I stepped down to 3 cores and 6 GB, to discover that memory usage fell to 3.9 GB and everything worked well. With just 2 cores and 4 GB of memory only 3.1 GB of that was used, and the VM continued to handle those lightweight tasks normally. Good reminder that there's a certain amount of memory tied up wit…

I'd bet for the null hypothesis: the memory behaviour changes would hold if the core count was kept constant and only the VM's memory size was adjusted.

There is a per-cpu data structure in the xnu kernel, but it is not big enough to tilt the scales when you are talking about RAM in units of gigabytes.

Re: How fast is a macOS VM, and how small could it be?

#57
post #7

>Starting with 4 virtual cores and 8 GB vRAM, where the VM ran perfectly briskly with around 5 GB of memory used, I stepped down to 3 cores and 6 GB, to discover that memory usage fell to 3.9 GB and everything worked well. With just 2 cores and 4 GB of memory only 3.1 GB of that was used, and the VM continued to handle those lightweight tasks normally. Good reminder that there's a certain amount of memory tied up wit…

As a general rule, also the amount of physical memory installed in a computer should be proportional with the number of hardware threads provided by its CPU. Besides the fact that the operating system may allocate some memory for each thread, when you launch a multi-threaded application that is able to use all available threads, for instance the compilation of a big software project, it frequently will allocate some…

Yes! I have also observed that with compilation VMs on a big server.

Re: How fast is a macOS VM, and how small could it be?

#59
post #11
post #5

Earlier quoted context omitted.

What will that help with if the host and guest combined need > physical ram?

If guest memory can be reclaimed, it doesn't need to be paged to disk once you hit RAM contention. It's mostly saving accounting overhead, but it'll have some effect on latency, which you're more likely to perceive under contention.

But if it can be reclaimed it's not actually needed. So i'd find the minimum amount of configured ram a mac os VM can boot with more significant than the actual usage while booted but doing nothing.

Re: How fast is a macOS VM, and how small could it be?

#60
post #48
post #17

Earlier quoted context omitted.

Not really. Larger page sizes mean more potential for wasted memory and it has had a long standing memory leak in some core component to where even Calculator can cause an OOM event.

I mean if there are faulty apps, but where do you get this idea from? The amount of IDE's, docker containers, all kinds of stuff you can run on macOS in just 16GB is astounding. And I've used this OS on the desktop for 23 years.

It's not really that interesting in the landscapes of OSes; modern (or even ancient) Windows and Linux distros have been doing these tasks simultaneously in one form or fashion since 16GiB was seen as a lot of RAM.

See my other post for just a tiny amount of references to OOTB faulty apps.

Post reply on HN