On Fri, Feb 10, 2012 at 11:00 AM, Zhi Yong Wu <zwu.ker...@gmail.com> wrote: > On Fri, Feb 10, 2012 at 6:35 PM, Stefan Hajnoczi <stefa...@gmail.com> wrote: >> On Fri, Feb 10, 2012 at 9:47 AM, Zhi Yong Wu <zwu.ker...@gmail.com> wrote: >>> Today i tried to create one VM with the option "-m 4000", and found it >>> failed with the following errors: >>> >>> Failed to allocate 4194304000 B: Cannot allocate memory >>> Aborted (core dumped) >> >> Did you run on a 32-bit host? > No, it is one x86_64 host.
That is weird. Have you tried strace(1) to find out which system call is failing and why? >> until you begin dirtying more host pages than the host has resources >> for. >> >> But normally for KVM you want sum(vms) < host_ram, unless you are > here host_ram is the free ram of host? I meant that for predictable, good performance it is normal to size hosts so they have more physical RAM than the sum of guest RAM. For example, 2 GB VM and 4 GB VM => make sure you have more than 6 GB RAM. If you go under that threshold you will hit swap when the guests utilize their memory. Stefan