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

[Feature]: Add a way to bypass RAM check for systems with ZFS #522

Closed
1 task done
janek202 opened this issue May 19, 2024 · 7 comments
Closed
1 task done

[Feature]: Add a way to bypass RAM check for systems with ZFS #522

janek202 opened this issue May 19, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@janek202
Copy link

janek202 commented May 19, 2024

Is there no existing feature request for this?

  • I have searched the existing feature requests

Is your proposal related to a problem?

The script checks for the amount of available memory, before running the VM.
However, on systems with ZFS, ARC memory is marked as used, but is released as needed.
This means the real available memory amount is bigger than reported by free.

Describe the solution you'd like.

Add an environment variable, that would disable this check.
Alternatively, it could check for Total memory in the system.

Describe alternatives you've considered.

As a workaround, before running the VM, I use head -c 4G /dev/zero | tail to temporarily allocate memory in a dummy process, so gets freed, when I exit it.

Additional context

No response

@janek202 janek202 added the enhancement New feature or request label May 19, 2024
@kroese
Copy link
Contributor

kroese commented May 19, 2024

Good point! But to check for Total Memory is not really an alternative, because QEMU needs to allocate the RAM and thats why I check how much is available. You can have lots of RAM in total, but almost nothing available.

If you plan to run this container continously 24/7, the obvious solution would be to lower the amount that you configured for ZFS/ARC, so that there is always enough room for the container. That should have no downsides at all, since ZFS would not have been able to use it anyway while the container is running.

If you only want to run the container periodically, then a feature to disable the memory check would make sense. I will add a flag for that in the next release (might take a while).

@janek202
Copy link
Author

janek202 commented May 19, 2024

Thanks for a reply.

Good point! But to check for Total Memory is not really an alternative, because QEMU needs to allocate the RAM and thats why I check how much is available. You can have lots of RAM in total, but almost nothing available.

Yes, I worded it poorly. I meant, to introduce an environmental variable that would change which value from free is used, or disable the check entirely.
The current behavior makes sense in majority of systems, and I think it should stay unchanged, as a default. :)

I only run this container periodically, not 24/7, that's why I run into this issue.

@kroese
Copy link
Contributor

kroese commented May 20, 2024

If you re-pull the latest image and set:

environment:
  RAM_CHECK: "N"

it should skip the check now. Please let me know if it works!

@janek202
Copy link
Author

It seems to be working, thank you!

I got the error, re-pulled the image, started the container, and Windows booted just fine.

@kroese kroese closed this as completed May 20, 2024
@nazdridoy
Copy link

environment

where are the scripts that checks for RAM?

@kroese
Copy link
Contributor

kroese commented May 30, 2024

@nazdridoy
Copy link

2024-05-31_01-20

found it. thanks

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

No branches or pull requests

3 participants