Re: Memory under KVM?

2009-12-16 Thread Avi Kivity
On 12/16/2009 01:21 AM, Thomas Fjellstrom wrote: The problem is it should be automatic. The balloon driver itself or some other mechanism should be capable of noticing when it can free up a bunch of guest memory. I can't be bothered to manually sit around and monitor memory usage on my host so

Re: Memory under KVM?

2009-12-16 Thread Thomas Fjellstrom
On Wed December 16 2009, Avi Kivity wrote: On 12/16/2009 01:21 AM, Thomas Fjellstrom wrote: The problem is it should be automatic. The balloon driver itself or some other mechanism should be capable of noticing when it can free up a bunch of guest memory. I can't be bothered to manually sit

Re: Memory under KVM?

2009-12-16 Thread Avi Kivity
On 12/16/2009 11:58 AM, Thomas Fjellstrom wrote: It depends on what your expectations are. If you have a lot of memory you might be surprised when you access an idle guest and have to wait for it to page itself back from disk. Why would it be swaping in that case? Only

Re: Memory under KVM?

2009-12-16 Thread Thomas Fjellstrom
On Wed December 16 2009, Avi Kivity wrote: On 12/16/2009 11:58 AM, Thomas Fjellstrom wrote: It depends on what your expectations are. If you have a lot of memory you might be surprised when you access an idle guest and have to wait for it to page itself back from disk. Why would it be

Re: Memory under KVM?

2009-12-15 Thread Avi Kivity
On 12/13/2009 07:16 PM, Thomas Fjellstrom wrote: Linux usually keeps very little RAM free (it's kept as cache). So there has to be some action on the part of the host to get the guest to free things. For Windows guests you can use ksm to reclaim free memory (since Windows will zero it).

Re: Memory under KVM?

2009-12-15 Thread Avi Kivity
On 12/14/2009 05:50 PM, rek2 wrote: VIRT includes a lot of shared memory, so it's not a very useful number to look at when trying to gauge how much memory a process is using. Ok, so then what stats should we look to calculate the amount of memory a server should have depending on how many

Re: Memory under KVM?

2009-12-15 Thread Thomas Fjellstrom
On Tue December 15 2009, Avi Kivity wrote: On 12/13/2009 07:16 PM, Thomas Fjellstrom wrote: Linux usually keeps very little RAM free (it's kept as cache). So there has to be some action on the part of the host to get the guest to free things. For Windows guests you can use ksm to reclaim

Re: Memory under KVM?

2009-12-14 Thread Thomas Fjellstrom
On Mon December 14 2009, rek2 wrote: VIRT includes a lot of shared memory, so it's not a very useful number to look at when trying to gauge how much memory a process is using. Ok, so then what stats should we look to calculate the amount of memory a server should have depending on how many

Re: Memory under KVM?

2009-12-13 Thread Avi Kivity
On 12/12/2009 10:37 PM, Thomas Fjellstrom wrote: I have the opposite happen, when a VM is started, RES is usually lower than -m, which I find slightly odd. But makes sense if qemu/kvm don't actually allocate memory from the host till its requested the first time That is the case. (if only

Re: Memory under KVM?

2009-12-13 Thread Thomas Fjellstrom
On Sun December 13 2009, Avi Kivity wrote: On 12/12/2009 10:37 PM, Thomas Fjellstrom wrote: I have the opposite happen, when a VM is started, RES is usually lower than -m, which I find slightly odd. But makes sense if qemu/kvm don't actually allocate memory from the host till its requested

Re: Memory under KVM?

2009-12-13 Thread Avi Kivity
On 12/13/2009 06:41 PM, Thomas Fjellstrom wrote: Use the balloon driver to return memory to the host. Will it actually just free the memory and leave the total memory size in the VM alone? Last I checked it would just decrease the total memory size, which isn't that useful. Sometimes it

Re: Memory under KVM?

2009-12-13 Thread Thomas Fjellstrom
On Sun December 13 2009, Avi Kivity wrote: On 12/13/2009 06:41 PM, Thomas Fjellstrom wrote: Use the balloon driver to return memory to the host. Will it actually just free the memory and leave the total memory size in the VM alone? Last I checked it would just decrease the total memory

Re: Memory under KVM?

2009-12-13 Thread rek2
Hi Thanks for the responses, but look: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin /usr/bin/kvm -S -M pc-0.11 -m 1024 -smp 1 -name vm_hsci -uuid 52ed4c7c-65e4-325e-0f96-87a5be6d854c -monitor unix:/var/run/libvirt/qemu/vm_hsci.monitor,server,nowait -boot c -drive

Re: Memory under KVM?

2009-12-13 Thread Thomas Fjellstrom
On Sun December 13 2009, rek2 wrote: Hi Thanks for the responses, but look: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin /usr/bin/kvm -S -M pc-0.11 -m 1024 -smp 1 -name vm_hsci -uuid 52ed4c7c-65e4-325e-0f96-87a5be6d854c -monitor

Re: Memory under KVM?

2009-12-13 Thread rek2
On 12/13/09 4:42 PM, Thomas Fjellstrom wrote: On Sun December 13 2009, rek2 wrote: Hi Thanks for the responses, but look: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin /usr/bin/kvm -S -M pc-0.11 -m 1024 -smp 1 -name vm_hsci -uuid 52ed4c7c-65e4-325e-0f96-87a5be6d854c

Re: Memory under KVM?

2009-12-12 Thread Thomas Fjellstrom
On Sat December 12 2009, Avi Kivity wrote: On 12/11/2009 11:43 PM, rek2 wrote: Hi everyone, I'm new to the list and I have a couple questions that we are wondering about here at work... we have notice that the KVM processes on the host take much more memory than the memory we have told

Memory under KVM?

2009-12-11 Thread rek2
Hi everyone, I'm new to the list and I have a couple questions that we are wondering about here at work... we have notice that the KVM processes on the host take much more memory than the memory we have told the VM to use.. a ruff example.. if we tell KVM to use 2 gigs for one VM it will end up

Re: Memory under KVM?

2009-12-11 Thread Brian Jackson
On Friday 11 December 2009 15:43:01 rek2 wrote: Hi everyone, I'm new to the list and I have a couple questions that we are wondering about here at work... we have notice that the KVM processes on the host take much more memory than the memory we have told the VM to use.. a ruff example.. if

Memory under KVM?

2009-12-10 Thread Christian Fernandez
Hi everyone, I'm new to the list and I have a couple questions that we are wondering about here at work... we have notice that the KVM processes on the host take much more memory than the memory we have told the VM to use.. a ruff example.. if we tell KVM to use 2 gigs for one VM it will end up