* How much physical memory can be used to run domains in a KVM machine?
@ 2009-07-17 5:50 Zhang Qian
2009-07-17 7:17 ` Dor Laor
0 siblings, 1 reply; 5+ messages in thread
From: Zhang Qian @ 2009-07-17 5:50 UTC (permalink / raw)
To: kvm
Hi,
I have a KVM box which has 4GB physical memory totally, I'd like to
know how much I can use to run my domains, and how much will be
reserved by hypervisor(KVM) itself?
Thanks!
Regards,
Qian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How much physical memory can be used to run domains in a KVM machine?
2009-07-17 5:50 How much physical memory can be used to run domains in a KVM machine? Zhang Qian
@ 2009-07-17 7:17 ` Dor Laor
2009-07-17 9:56 ` sudhir kumar
0 siblings, 1 reply; 5+ messages in thread
From: Dor Laor @ 2009-07-17 7:17 UTC (permalink / raw)
To: Zhang Qian; +Cc: kvm
On 07/17/2009 08:50 AM, Zhang Qian wrote:
> Hi,
>
> I have a KVM box which has 4GB physical memory totally, I'd like to
> know how much I can use to run my domains, and how much will be
> reserved by hypervisor(KVM) itself?
> Thanks!
>
KVM and the Linux host use relatively low amount of memory.
Unlike other hypervisors you know, kvm does not reserve memory and also
is able to swap the guest memory, so you can even use more than 4G for
your guest. (Just note swapping will be slow)
>
> Regards,
> Qian
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How much physical memory can be used to run domains in a KVM machine?
2009-07-17 7:17 ` Dor Laor
@ 2009-07-17 9:56 ` sudhir kumar
2009-07-17 10:55 ` Amit Shah
2009-07-20 1:43 ` Sheng Yang
0 siblings, 2 replies; 5+ messages in thread
From: sudhir kumar @ 2009-07-17 9:56 UTC (permalink / raw)
To: dlaor; +Cc: Zhang Qian, kvm
On Fri, Jul 17, 2009 at 12:47 PM, Dor Laor<dlaor@redhat.com> wrote:
> On 07/17/2009 08:50 AM, Zhang Qian wrote:
>>
>> Hi,
>>
>> I have a KVM box which has 4GB physical memory totally, I'd like to
>> know how much I can use to run my domains, and how much will be
>> reserved by hypervisor(KVM) itself?
>> Thanks!
>>
>
> KVM and the Linux host use relatively low amount of memory.
> Unlike other hypervisors you know, kvm does not reserve memory and also is
> able to swap the guest memory, so you can even use more than 4G for your
Is that true? I think we can not allocate memory more than the
physical RAM. Or does upstream kvm supports it? My kvm version is not
that old but memory allocation failed for me when I tried to give the
whole memory on my host to the guest.
> guest. (Just note swapping will be slow)
>
>
>>
>> Regards,
>> Qian
>> --
>> To unsubscribe from this list: send the line "unsubscribe kvm" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Sudhir Kumar
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How much physical memory can be used to run domains in a KVM machine?
2009-07-17 9:56 ` sudhir kumar
@ 2009-07-17 10:55 ` Amit Shah
2009-07-20 1:43 ` Sheng Yang
1 sibling, 0 replies; 5+ messages in thread
From: Amit Shah @ 2009-07-17 10:55 UTC (permalink / raw)
To: sudhir kumar; +Cc: dlaor, Zhang Qian, kvm
On (Fri) Jul 17 2009 [15:26:49], sudhir kumar wrote:
> On Fri, Jul 17, 2009 at 12:47 PM, Dor Laor<dlaor@redhat.com> wrote:
> > On 07/17/2009 08:50 AM, Zhang Qian wrote:
> >>
> >> Hi,
> >>
> >> I have a KVM box which has 4GB physical memory totally, I'd like to
> >> know how much I can use to run my domains, and how much will be
> >> reserved by hypervisor(KVM) itself?
> >> Thanks!
> >>
> >
> > KVM and the Linux host use relatively low amount of memory.
> > Unlike other hypervisors you know, kvm does not reserve memory and also is
> > able to swap the guest memory, so you can even use more than 4G for your
> Is that true? I think we can not allocate memory more than the
> physical RAM. Or does upstream kvm supports it? My kvm version is not
> that old but memory allocation failed for me when I tried to give the
> whole memory on my host to the guest.
What was the error? Also kvm only allocates memory for the guest when
the guest needs it so even if you give all your host memory to the
guest, it doesn't mean the guest will start using it immediately.
Amit
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How much physical memory can be used to run domains in a KVM machine?
2009-07-17 9:56 ` sudhir kumar
2009-07-17 10:55 ` Amit Shah
@ 2009-07-20 1:43 ` Sheng Yang
1 sibling, 0 replies; 5+ messages in thread
From: Sheng Yang @ 2009-07-20 1:43 UTC (permalink / raw)
To: kvm; +Cc: sudhir kumar, dlaor, Zhang Qian
On Friday 17 July 2009 17:56:49 sudhir kumar wrote:
> On Fri, Jul 17, 2009 at 12:47 PM, Dor Laor<dlaor@redhat.com> wrote:
> > On 07/17/2009 08:50 AM, Zhang Qian wrote:
> >> Hi,
> >>
> >> I have a KVM box which has 4GB physical memory totally, I'd like to
> >> know how much I can use to run my domains, and how much will be
> >> reserved by hypervisor(KVM) itself?
> >> Thanks!
> >
> > KVM and the Linux host use relatively low amount of memory.
> > Unlike other hypervisors you know, kvm does not reserve memory and also
> > is able to swap the guest memory, so you can even use more than 4G for
> > your
>
> Is that true? I think we can not allocate memory more than the
> physical RAM. Or does upstream kvm supports it? My kvm version is not
> that old but memory allocation failed for me when I tried to give the
> whole memory on my host to the guest.
It's not specific to KVM. QEmu use malloc()/mmap() to allocate memory for KVM,
which is controlled by Linux kernel memory overcommit policy. Linux kernel
didn't support memory overcommit by default. You can refer to
Document/vm/overcommit-accounting and other related document to enable it.
--
regards
Yang, Sheng
>
> > guest. (Just note swapping will be slow)
> >
> >> Regards,
> >> Qian
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe kvm" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe kvm" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-20 1:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-17 5:50 How much physical memory can be used to run domains in a KVM machine? Zhang Qian
2009-07-17 7:17 ` Dor Laor
2009-07-17 9:56 ` sudhir kumar
2009-07-17 10:55 ` Amit Shah
2009-07-20 1:43 ` Sheng Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.