From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tanel Kokk Subject: Re: In kvm, a single process cannot allocate more than 3.6GB ram. Why? Date: Sat, 12 Dec 2009 12:11:00 +0200 Message-ID: <4B236C34.9010302@gmail.com> References: <4B220ADF.6030709@gmail.com> <4B235A73.9040303@redhat.com> <4B236118.6090305@gmail.com> <4B2363F5.5020103@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Avi Kivity Return-path: Received: from mail-ew0-f219.google.com ([209.85.219.219]:53159 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761453AbZLLKK5 (ORCPT ); Sat, 12 Dec 2009 05:10:57 -0500 Received: by ewy19 with SMTP id 19so1847425ewy.21 for ; Sat, 12 Dec 2009 02:11:03 -0800 (PST) In-Reply-To: <4B2363F5.5020103@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 12/12/09 11:35, Avi Kivity wrote: > On 12/12/2009 11:23 AM, Tanel Kokk wrote: >> On 12/12/09 10:55, Avi Kivity wrote: >> >>> On 12/11/2009 11:03 AM, Tanel Kokk wrote: >>> >>>> Does anybody have a glue why process are not able to allocate more than >>>> 3.6GB memory ? >>>> >>>> What should i do to allow process allocate more than 3.6GB memory? >>>> Is it >>>> possible at all? >>>> >>>> >>> A guest or host process? And what happens when you try? >>> >> guest process >> >> We discovered that if postgres process (on guest) used to use only 3.6GB >> memory regardless of guest had 8GB memory in common. >> >> > > > That's probably a postgres configuration error (or you're using 32-bit > postgres). postgres is 64bit: root@lu2-kvm-db1 ~]# file /usr/lib/postgresql/8.3/bin/postgres /usr/lib/postgresql/8.3/bin/postgres: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, not stripped > > >> Then I made simple python script, which just eat memory: >> ------------------------------------ >> #!/usr/bin/python >> import time, random >> >> i = 0 >> while (i< 100000000): >> a[i] = random.random() >> i = i + 1 >> >> time.sleep(600) >> ------------------------------------ >> And I get python MemoryError, when script has devoured about 3.6GB ram >> > > > Doesn't mean much - Python may allocate a lot more memory when extending > the array. > > What does 'cat /proc/meminfo' in the guest say? > [root@lu2-kvm-db1 ~]# cat /proc/meminfo MemTotal: 10267308 kB MemFree: 228944 kB Buffers: 19680 kB Cached: 6069524 kB SwapCached: 0 kB Active: 8175200 kB Inactive: 1374884 kB Active(anon): 3238044 kB Inactive(anon): 544104 kB Active(file): 4937156 kB Inactive(file): 830780 kB Unevictable: 0 kB Mlocked: 0 kB SwapTotal: 0 kB SwapFree: 0 kB Dirty: 15968 kB Writeback: 0 kB AnonPages: 3461108 kB Mapped: 327816 kB Slab: 171452 kB SReclaimable: 121756 kB SUnreclaim: 49696 kB PageTables: 244268 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 8727208 kB Committed_AS: 6056168 kB VmallocTotal: 34359738367 kB VmallocUsed: 38180 kB VmallocChunk: 34359645255 kB DirectMap4k: 4032 kB DirectMap2M: 10481664 kB Tanel