Jump to content

unraid VM dynamic memory allocation

manikyath

So... me and my unique issues again...

 

i've got an unraid server with 32GB physical memory, and a quite varied load, sometimes there's docker containers running, sometimes i've got a higher load in VMs, etc.

 

so, to make this capacity switching a bit more automated i'd like to have dynamic memory allocation on one of my VM's, but i've been actually turning my hair gray trying to figure out how the heck this works...

 

i've got my VM set up in unraid with 2GB initial memory, and 16GB max memory.

the VM is running the latest and greatest (cough...) debian 11 with a very basic terminal-only installation.

 

when i boot the VM i can see it start out with 16GB memory in htop and unraid's webUI directly after boot, and this then sinks down to just below 2GB as the system is idle.

however when i load up the VM, it'll just stuff things into swap until things start to crash and it never gets any extra memory allocation back.

 

i've found that i can manually change the memory allocation for the VM from unraid's console manually.

 

so.. this is where literally 5 hours of research happened, and i came to the below conclusion:

- the little info i found on how unraid implement this seems to "imply" it works the way i want it to.

- the cesspit on info on the underlying tech ranges in opinions between "it doesnt exist", to "thats not how it works at all", to "it's built into the kernel", to explanations of how it works that contradict how unraid appears to be doing things.

 

at this point i've reached a level of infuriated with conflicting sources that i'm seriously contemplating ditching unraid and shoehorning PCIe passtrough into something else, instead of trying to migrate the rest of my server workload onto unraid.

 

Has anyone here managed to make this work? Ideally i'd want the guest's memory size to adjust to have about 500MB free memory at all times, for whichever load scenario. but at this point just about any dynamic allocation of memory that doesnt require manually punching in commands each time is good enough for me.

 

if the solution is a different guest OS, i'm *very* open to that, because using debian is still like having to carve a spoon before you can stir your coffee.

Link to comment
Share on other sites

Link to post
Share on other sites

Eww..

Umm I'd recommend trying to move on to more containers and not use VM's as containers will share memory allocation of the host and be more efficient. Prob your best bet.

 

Made it work? Yes, I've put many Jails on FreeBSD hosts in tiny amounts of ram. like as many as 8 jails per 1 gig of ram. They are extremely efficient.

"Only proprietary software vendors want proprietary software." - Dexter's Law

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×