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

Changing memory size for running VM #1518

Closed
kirill9000 opened this Issue Dec 15, 2015 · 7 comments

Comments

Projects
None yet
2 participants
@kirill9000

Since it's possible, shouldn't VM Manager do it when user changes VM settings?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Jan 6, 2016

Member

What do you mean? It is exactly what Qubes Manager does.

Member

marmarek commented Jan 6, 2016

What do you mean? It is exactly what Qubes Manager does.

@kirill9000

This comment has been minimized.

Show comment
Hide comment
@kirill9000

kirill9000 Feb 2, 2016

I mean, it should give AppVM more (or less) RAM immediately, without the need to restart it. Like xl mem-set supposedly does (although it doesn't work for me on Qubes for some reason).

I mean, it should give AppVM more (or less) RAM immediately, without the need to restart it. Like xl mem-set supposedly does (although it doesn't work for me on Qubes for some reason).

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 2, 2016

Member

In Qubes OS we have dynamic memory management: https://www.qubes-os.org/doc/qmemman/
It gives memory to the VM when it needs it (according to memory usage in such VM), and of course if it is available. Up to the upper limit set in Qubes Manager.

Member

marmarek commented Feb 2, 2016

In Qubes OS we have dynamic memory management: https://www.qubes-os.org/doc/qmemman/
It gives memory to the VM when it needs it (according to memory usage in such VM), and of course if it is available. Up to the upper limit set in Qubes Manager.

@kirill9000

This comment has been minimized.

Show comment
Hide comment
@kirill9000

kirill9000 Feb 2, 2016

STR:

  1. Create new VM, max memory = 1 GB.
  2. Start It.
  3. Change it's max memory to 4 GB.
  4. Create tmpfs (size=4GB) and write 1+ GB data to it.
  5. There's still just 1 GB of memory allocated to AppVM. Data goes into swap. After swap runs out, VM becomes unresponsive.

Am I missing something?

STR:

  1. Create new VM, max memory = 1 GB.
  2. Start It.
  3. Change it's max memory to 4 GB.
  4. Create tmpfs (size=4GB) and write 1+ GB data to it.
  5. There's still just 1 GB of memory allocated to AppVM. Data goes into swap. After swap runs out, VM becomes unresponsive.

Am I missing something?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 2, 2016

Member

On Tue, Feb 02, 2016 at 02:59:28PM -0800, kirill9000 wrote:

STR:

  1. Create new VM, max memory = 1 GB.
  2. Start It.
  3. Change it's max memory to 4 GB.
  4. Create tmpfs (size=4GB) and write 1+ GB data to it.
  5. There's still just 1 GB of memory allocated to AppVM. Data goes into swap. After swap runs out, VM becomes unresponsive.

Am I missing something?

Ah, I see. Yes, max memory is changed only after VM restart. It is Xen
limitation.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

Member

marmarek commented Feb 2, 2016

On Tue, Feb 02, 2016 at 02:59:28PM -0800, kirill9000 wrote:

STR:

  1. Create new VM, max memory = 1 GB.
  2. Start It.
  3. Change it's max memory to 4 GB.
  4. Create tmpfs (size=4GB) and write 1+ GB data to it.
  5. There's still just 1 GB of memory allocated to AppVM. Data goes into swap. After swap runs out, VM becomes unresponsive.

Am I missing something?

Ah, I see. Yes, max memory is changed only after VM restart. It is Xen
limitation.

Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

@kirill9000

This comment has been minimized.

Show comment
Hide comment
@kirill9000

kirill9000 Feb 2, 2016

OK, thanks for clarification. Are there any downsides in setting max memory for all VMs equal to total physical RAM amount and letting qmemman handle it? Fragmentation maybe?

OK, thanks for clarification. Are there any downsides in setting max memory for all VMs equal to total physical RAM amount and letting qmemman handle it? Fragmentation maybe?

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Feb 3, 2016

Member

Yes, Linux kernel allocates some structures at boot time according to the max mem. AFAIR it's about 1% of that size.

Member

marmarek commented Feb 3, 2016

Yes, Linux kernel allocates some structures at boot time according to the max mem. AFAIR it's about 1% of that size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment