Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory is not being freed on VZ #2789

Open
okch-codes opened this issue Oct 23, 2024 Discussed in #2720 · 4 comments
Open

Memory is not being freed on VZ #2789

okch-codes opened this issue Oct 23, 2024 Discussed in #2720 · 4 comments

Comments

@okch-codes
Copy link

Discussed in #2720

Originally posted by Muzosh October 10, 2024
I ran some memory intensive task today and it maxed out at 8GB (which was defined in my config). I was this in MacOS Activity Monitor next to a "Virtual Machine Service for limactl" process.

However, once those memory intensive tasks finished, the process stayed at 8GB indefinitely (until colima restart), slowing down my host Mac.

Is this intended behavior? I would expect the process to jump down to some idle value (around ~800-1000MB after fresh start).

@okch-codes okch-codes changed the title Memory is not being freed? Memory is not being freed on VZ Oct 23, 2024
@afbjorklund
Copy link
Member

afbjorklund commented Oct 23, 2024

It is normal for memory that you dedicate to a virtual machine to be locked, the alternative is a feature*.

* called "ballooning" in QEMU, but I am not sure if it is available in Vz yet? Either way, it is not the default.

@okch-codes
Copy link
Author

Apparently it's available but it doesn't work.

@balajiv113
Copy link
Member

Yes its a macOS bug. Even docker desktop has the same problem.

Somehow orbstack fixed it with a custom memory management
https://orbstack.dev/blog/dynamic-memory

@afbjorklund
Copy link
Member

Lima does create a VZVirtioTraditionalMemoryBalloonDeviceConfiguration, but I am not sure if it is used yet?

https://developer.apple.com/documentation/virtualization/vzvirtiotraditionalmemoryballoondevice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants