Remix.run Logo
cogman10 3 hours ago

Ok, so a lot of this boils down to the fact that this sort of software really wants to be running on linux. For both windows and mac, the only way to (really) do that is creating a VM.

It seems to me that the main issue here is painful disconnects between the VM and the host system. The kernel in the VM wants to manage memory and disk usage and that management ultimately means the host needs to grant the guest OS large blocks of disk and memory.

Is anyone thinking about or working on narrowing that requirement? Like, I may want the 99% of what a VM does, but I really want my host system to ultimately manage both memory and disk. I'd love it if in the linux VM I had a bridge for file IO which interacted directly with the host file system and a bridge in the memory management system which ultimately called the host system's memory allocation API directly and disabled the kernels memory management system.

containers and cgroups are basically how linux does this. But that's a pretty big surface area that I doubt any non-linux system could adopt.

lxgr 3 hours ago | parent | next [-]

Given that Claude Code runs without issues on macOS, I'd guess that it's more about sandboxing shell sessions (i.e. not macOS applications or single processes, for which solutions exist).

Unfortunately, unlike Linux, macOS doesn't have a great out-of-the-box story there; even Apple's first-party OCI runtime is based on per-container Linux VMs.

jjfoooo4 2 hours ago | parent | next [-]

The upgrade to the native installer gave me some issues, I had Claude fail to return any responses and continuously eat memory until my computer crashed! The only fix I could figure out is nuking my entire .claude dir, losing all my history etc with it

cogman10 2 hours ago | parent | prev [-]

I think only BSD really has a good sandboxing solution beside linux (jails).

And after looking into Jails, it looks like BSD also supports linux cgroups... that's actually really impressive. [1]

[1] https://docs.freebsd.org/en/books/handbook/linuxemu/#linuxem...

kccqzy 2 hours ago | parent | prev [-]

It’s a solved problem in the VM world too. Memory ballooning is a technique where a driver inside the VM kernel cooperates with the hypervisor to return memory back to the host by appearing to consume the memory from the VM. And disk access is even easier; just present a network filesystem to the VM.

cogman10 2 hours ago | parent [-]

The network file system to host is usually pretty slow no? That was my impression.

As for memory ballooning, the main issue with it is that it (generally) only gets triggered when the host runs out of memory.

For a host which is only running VMs, this is fine. But for the typical consumer host it becomes cumbersome as you still need to give the VM a giant memory block and hope that your VM of choice is good enough to free on time. It's also uncoordinated. When swapping needs to happen, if the VM was using the host for allocation the host could much more efficiently decide what needs to go into swap.

And if the host was in charge of both the memory and file system, then things like a system cache could be done more efficiently on top of all that.