Re: [Users] hot add ram to a vm

2013-12-16 Thread Andrew Cathrow


- Original Message -
 From: Sander Grendelman san...@grendelman.com
 To: Michal Skrivanek michal.skriva...@redhat.com
 Cc: users@ovirt.org
 Sent: Friday, December 13, 2013 8:52:42 AM
 Subject: Re: [Users] hot add ram to a vm
 
 On Fri, Dec 13, 2013 at 1:42 PM, Michal Skrivanek
 michal.skriva...@redhat.com wrote:
  Too bad QEMU doesn't support it. So it's still a long way.
 
 qemu/libvirt kind of supports it (at least in F19).
 
 In virt-manager you can define current and maximum memory
 allocation.
 
 The VM only sees the current allocation and you can hot add memory up
 to the maximum allocation.


It isn't really hot-plug.
This allows you to statically set the physical ram but then use the balloon 
device to borrow some ram from the guest.
If max memory was 4gb and we set current memory to 2gb the VM would still see 
4gb of physical memory but the balloon driver would be taking up 2gb of memory 
in the guest, this memory would be returned to the host for other VMs to use.


 
 Example from the xml definition:
 
   memory unit='KiB'3145728/memory
   currentMemory unit='KiB'1048576/currentMemory
 
 After booting:
 
 [root@grkvm201 ~]# uname -a
 Linux grkvm201.plusine.intern 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed
 Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
 [root@grkvm201 ~]# free -lm
  total   used   free sharedbuffers
  cached
 Mem:   837296540  0  8
 84
 Low:   837296540
 High:0  0  0
 -/+ buffers/cache:203634
 Swap:  511  0511
 [root@grkvm201 ~]#
 
 memory increased to 2GB through virt-manager:
 
 [root@grkvm201 ~]# free -lm
  total   used   free sharedbuffers
  cached
 Mem:  1861295   1565  0  8
 84
 Low:  1861295   1565
 High:0  0  0
 -/+ buffers/cache:202   1659
 Swap:  511  0511
 [root@grkvm201 ~]# cat /proc/meminfo
 MemTotal:1906176 kB
 MemFree: 1603456 kB
 Buffers:9140 kB
 Cached:86860 kB
 SwapCached:0 kB
 Active:92564 kB
 Inactive:  68064 kB
 Active(anon):  68692 kB
 Inactive(anon):   12 kB
 Active(file):  23872 kB
 Inactive(file):68052 kB
 Unevictable:   21600 kB
 Mlocked:   11380 kB
 SwapTotal:524280 kB
 SwapFree: 524280 kB
 Dirty:12 kB
 Writeback: 0 kB
 AnonPages: 86232 kB
 Mapped:20436 kB
 Shmem:   288 kB
 Slab:  75132 kB
 SReclaimable:  14576 kB
 SUnreclaim:60556 kB
 KernelStack:1464 kB
 PageTables: 4224 kB
 NFS_Unstable:  0 kB
 Bounce:0 kB
 WritebackTmp:  0 kB
 CommitLimit: 1477368 kB
 Committed_AS: 547624 kB
 VmallocTotal:   34359738367 kB
 VmallocUsed:   20040 kB
 VmallocChunk:   34359688500 kB
 HardwareCorrupted: 0 kB
 AnonHugePages: 18432 kB
 HugePages_Total:   0
 HugePages_Free:0
 HugePages_Rsvd:0
 
 Memory decreased to 1,5GB through virt-manager:
 [root@grkvm201 ~]# free -lm
  total   used   free sharedbuffers
  cached
 Mem:  1349295   1054  0  8
 84
 Low:  1349295   1054
 High:0  0  0
 -/+ buffers/cache:201   1147
 Swap:  511  0511
 [root@grkvm201 ~]#
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
 
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-16 Thread Doron Fediuck


- Original Message -
 From: Andrew Cathrow acath...@redhat.com
 To: Sander Grendelman san...@grendelman.com
 Cc: users@ovirt.org
 Sent: Monday, December 16, 2013 2:05:00 PM
 Subject: Re: [Users] hot add ram to a vm
 
 
 
 - Original Message -
  From: Sander Grendelman san...@grendelman.com
  To: Michal Skrivanek michal.skriva...@redhat.com
  Cc: users@ovirt.org
  Sent: Friday, December 13, 2013 8:52:42 AM
  Subject: Re: [Users] hot add ram to a vm
  
  On Fri, Dec 13, 2013 at 1:42 PM, Michal Skrivanek
  michal.skriva...@redhat.com wrote:
   Too bad QEMU doesn't support it. So it's still a long way.
  
  qemu/libvirt kind of supports it (at least in F19).
  
  In virt-manager you can define current and maximum memory
  allocation.
  
  The VM only sees the current allocation and you can hot add memory up
  to the maximum allocation.
 
 
 It isn't really hot-plug.
 This allows you to statically set the physical ram but then use the balloon
 device to borrow some ram from the guest.
 If max memory was 4gb and we set current memory to 2gb the VM would still see
 4gb of physical memory but the balloon driver would be taking up 2gb of
 memory in the guest, this memory would be returned to the host for other VMs
 to use.
 
 

Right, currentMemory is how you manipulate the balloon:
http://libvirt.org/formatdomain.html#elementsMemoryAllocation

Note that is requires an agent, a driver and cooperation from the guest.

  
  Example from the xml definition:
  
memory unit='KiB'3145728/memory
currentMemory unit='KiB'1048576/currentMemory
  
  After booting:
  
  [root@grkvm201 ~]# uname -a
  Linux grkvm201.plusine.intern 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed
  Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
  [root@grkvm201 ~]# free -lm
   total   used   free sharedbuffers
   cached
  Mem:   837296540  0  8
  84
  Low:   837296540
  High:0  0  0
  -/+ buffers/cache:203634
  Swap:  511  0511
  [root@grkvm201 ~]#
  
  memory increased to 2GB through virt-manager:
  
  [root@grkvm201 ~]# free -lm
   total   used   free sharedbuffers
   cached
  Mem:  1861295   1565  0  8
  84
  Low:  1861295   1565
  High:0  0  0
  -/+ buffers/cache:202   1659
  Swap:  511  0511
  [root@grkvm201 ~]# cat /proc/meminfo
  MemTotal:1906176 kB
  MemFree: 1603456 kB
  Buffers:9140 kB
  Cached:86860 kB
  SwapCached:0 kB
  Active:92564 kB
  Inactive:  68064 kB
  Active(anon):  68692 kB
  Inactive(anon):   12 kB
  Active(file):  23872 kB
  Inactive(file):68052 kB
  Unevictable:   21600 kB
  Mlocked:   11380 kB
  SwapTotal:524280 kB
  SwapFree: 524280 kB
  Dirty:12 kB
  Writeback: 0 kB
  AnonPages: 86232 kB
  Mapped:20436 kB
  Shmem:   288 kB
  Slab:  75132 kB
  SReclaimable:  14576 kB
  SUnreclaim:60556 kB
  KernelStack:1464 kB
  PageTables: 4224 kB
  NFS_Unstable:  0 kB
  Bounce:0 kB
  WritebackTmp:  0 kB
  CommitLimit: 1477368 kB
  Committed_AS: 547624 kB
  VmallocTotal:   34359738367 kB
  VmallocUsed:   20040 kB
  VmallocChunk:   34359688500 kB
  HardwareCorrupted: 0 kB
  AnonHugePages: 18432 kB
  HugePages_Total:   0
  HugePages_Free:0
  HugePages_Rsvd:0
  
  Memory decreased to 1,5GB through virt-manager:
  [root@grkvm201 ~]# free -lm
   total   used   free sharedbuffers
   cached
  Mem:  1349295   1054  0  8
  84
  Low:  1349295   1054
  High:0  0  0
  -/+ buffers/cache:201   1147
  Swap:  511  0511
  [root@grkvm201 ~]#
  ___
  Users mailing list
  Users@ovirt.org
  http://lists.ovirt.org/mailman/listinfo/users
  
  
  
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users
 
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-13 Thread Michal Skrivanek
Too bad QEMU doesn't support it. So it's still a long way.

Balloon should be able to cover most of the use cases. You have overcommit and 
can reserve only a part of RAM, then change the reserved amount which adds more 
RAM resources.
OS still sees the same (maximum) size, but effectively it allows similar usage 
as hot add ram

Thanks,
michal

On Dec 12, 2013, at 23:38 , Sigbjorn Lie sigbj...@nixtra.com wrote:

 +1 for this feature
 
 On 10/12/13 10:00, Sven Kieske wrote:
 Hi,
 
 just want to say that we are also interested in this
 feature.
 
 
 
 ___
 Users mailing list
 Users@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-13 Thread Sander Grendelman
On Fri, Dec 13, 2013 at 1:42 PM, Michal Skrivanek
michal.skriva...@redhat.com wrote:
 Too bad QEMU doesn't support it. So it's still a long way.

qemu/libvirt kind of supports it (at least in F19).

In virt-manager you can define current and maximum memory allocation.

The VM only sees the current allocation and you can hot add memory up
to the maximum allocation.

Example from the xml definition:

  memory unit='KiB'3145728/memory
  currentMemory unit='KiB'1048576/currentMemory

After booting:

[root@grkvm201 ~]# uname -a
Linux grkvm201.plusine.intern 2.6.32-358.23.2.el6.x86_64 #1 SMP Wed
Oct 16 18:37:12 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@grkvm201 ~]# free -lm
 total   used   free sharedbuffers cached
Mem:   837296540  0  8 84
Low:   837296540
High:0  0  0
-/+ buffers/cache:203634
Swap:  511  0511
[root@grkvm201 ~]#

memory increased to 2GB through virt-manager:

[root@grkvm201 ~]# free -lm
 total   used   free sharedbuffers cached
Mem:  1861295   1565  0  8 84
Low:  1861295   1565
High:0  0  0
-/+ buffers/cache:202   1659
Swap:  511  0511
[root@grkvm201 ~]# cat /proc/meminfo
MemTotal:1906176 kB
MemFree: 1603456 kB
Buffers:9140 kB
Cached:86860 kB
SwapCached:0 kB
Active:92564 kB
Inactive:  68064 kB
Active(anon):  68692 kB
Inactive(anon):   12 kB
Active(file):  23872 kB
Inactive(file):68052 kB
Unevictable:   21600 kB
Mlocked:   11380 kB
SwapTotal:524280 kB
SwapFree: 524280 kB
Dirty:12 kB
Writeback: 0 kB
AnonPages: 86232 kB
Mapped:20436 kB
Shmem:   288 kB
Slab:  75132 kB
SReclaimable:  14576 kB
SUnreclaim:60556 kB
KernelStack:1464 kB
PageTables: 4224 kB
NFS_Unstable:  0 kB
Bounce:0 kB
WritebackTmp:  0 kB
CommitLimit: 1477368 kB
Committed_AS: 547624 kB
VmallocTotal:   34359738367 kB
VmallocUsed:   20040 kB
VmallocChunk:   34359688500 kB
HardwareCorrupted: 0 kB
AnonHugePages: 18432 kB
HugePages_Total:   0
HugePages_Free:0
HugePages_Rsvd:0

Memory decreased to 1,5GB through virt-manager:
[root@grkvm201 ~]# free -lm
 total   used   free sharedbuffers cached
Mem:  1349295   1054  0  8 84
Low:  1349295   1054
High:0  0  0
-/+ buffers/cache:201   1147
Swap:  511  0511
[root@grkvm201 ~]#
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] hot add ram to a vm

2013-12-09 Thread Nathanaël Blanchet

Hello,

Is hot add ram to a vm is supported by ovirt, or is it planned to be?

--
Nathanaël Blanchet

Supervision réseau
Pôle exploitation et maintenance
Département des systèmes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-09 Thread Dan Kenigsberg
On Mon, Dec 09, 2013 at 05:27:16PM +0100, Nathanaël Blanchet wrote:
 Hello,
 
 Is hot add ram to a vm is supported by ovirt, or is it planned to be?

Not at the moment, I'm afraid. For some use cases, the recomended
approach is to start a VM with way-too-much ram, but inflate a big
balloon in it. When more memory is required on the VM, set a higher
guaranteed level of RAM.

Dan.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-09 Thread Itamar Heim

On 12/09/2013 06:51 PM, Dan Kenigsberg wrote:

On Mon, Dec 09, 2013 at 05:27:16PM +0100, Nathanaël Blanchet wrote:

Hello,

Is hot add ram to a vm is supported by ovirt, or is it planned to be?


Not at the moment, I'm afraid. For some use cases, the recomended
approach is to start a VM with way-too-much ram, but inflate a big
balloon in it. When more memory is required on the VM, set a higher
guaranteed level of RAM.

Dan.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



we're working on hot add cpu now. then we'll start looking into hot add 
ram. may i ask which guest OS are you looking at and the use case you 
are trying to solve?


thanks,
   Itamar
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] hot add ram to a vm

2013-12-09 Thread Nathanaël Blanchet


Le 09/12/2013 19:32, Itamar Heim a écrit :

On 12/09/2013 06:51 PM, Dan Kenigsberg wrote:

On Mon, Dec 09, 2013 at 05:27:16PM +0100, Nathanaël Blanchet wrote:

Hello,

Is hot add ram to a vm is supported by ovirt, or is it planned to be?


Not at the moment, I'm afraid. For some use cases, the recomended
approach is to start a VM with way-too-much ram, but inflate a big
balloon in it. When more memory is required on the VM, set a higher
guaranteed level of RAM.

Dan.
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users



we're working on hot add cpu now. then we'll start looking into hot 
add ram. may i ask which guest OS are you looking at and the use case 
you are trying to solve?


thanks,
   Itamar
We run many centos guests with ton of tomcats on it, and they are in 
production. Downtime is forbidden but we need more and more RAM because 
we often add new applications.


--
Nathanaël Blanchet

Supervision réseau
Pôle exploitation et maintenance
Département des systèmes d'information
227 avenue Professeur-Jean-Louis-Viala
34193 MONTPELLIER CEDEX 5   
Tél. 33 (0)4 67 54 84 55
Fax  33 (0)4 67 54 84 14
blanc...@abes.fr

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users