Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932254AbZJ3OlN (ORCPT ); Fri, 30 Oct 2009 10:41:13 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932215AbZJ3OlM (ORCPT ); Fri, 30 Oct 2009 10:41:12 -0400 Received: from mail-bw0-f227.google.com ([209.85.218.227]:64793 "EHLO mail-bw0-f227.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932211AbZJ3OlL (ORCPT ); Fri, 30 Oct 2009 10:41:11 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:reply-to:organization:user-agent :mime-version:to:cc:subject:references:in-reply-to:x-age:x-location :x-os:x-face:content-type:content-transfer-encoding; b=Dz419wdcdYFjd6mq56JyrTsWaEdc4M6k6z7uQhM4N5ltn6xH1h985rlAlaGC7TWH6H /liA2tUeB77wmIR9hzujE6hqKvurHKFf9rQnZZlGtfb25gxT0xakXF3CzEIPQQ8EHeY2 lqL0K4qN6YUsxiJ20auh54OZpSkLzuvsP+MgU= Message-ID: <4AEAFB08.8050305@gmail.com> Date: Fri, 30 Oct 2009 15:41:12 +0100 From: =?UTF-8?B?VmVkcmFuIEZ1cmHEjQ==?= Reply-To: vedran.furac@gmail.com Organization: Home User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090701 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: Andrea Arcangeli CC: David Rientjes , Hugh Dickins , KAMEZAWA Hiroyuki , linux-mm@kvack.org, linux-kernel@vger.kernel.org, KOSAKI Motohiro , minchan.kim@gmail.com, Andrew Morton Subject: Re: Memory overcommit References: <4AE792B8.5020806@gmail.com> <4AE846E8.1070303@gmail.com> <4AE9068B.7030504@gmail.com> <4AE97618.6060607@gmail.com> <4AEAEFDD.5060009@gmail.com> <20091030141250.GQ9640@random.random> In-Reply-To: <20091030141250.GQ9640@random.random> X-Age: 25 X-Location: Lovran, Croatia X-OS: Debian GNU/Linux X-Face: +Lg7^E:?#]P.Y{N@61yW{aY#>fRcOE6MMqgAM|Kwk"fK!y!i4+h6&?E`Jt@uame[-SLu#*?k:)dZv X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1483 Lines: 42 Andrea Arcangeli wrote: > On Fri, Oct 30, 2009 at 02:53:33PM +0100, Vedran Furač wrote: >> % free -m >> total used free shared buffers cached >> Mem: 3458 3429 29 0 102 1119 >> -/+ buffers/cache: 2207 1251 >> >> There's plenty of memory available. Shouldn't cache be automatically >> dropped (this question was in my original mail, hence the subject)? > > This is not about cache, cache amount is physical, this about > virtual amount that can only go in ram or swap (at any later time, > current time is irrelevant) vs "ram + swap". Oh... so this is because apps "reserve" (Committed_AS?) more then they currently need. > In short add more swap if > you don't like overcommit and check grep Commit /proc/meminfo in case > this is accounting bug... A the time of "malloc: Cannot allocate memory": CommitLimit: 3364440 kB Committed_AS: 3240200 kB So probably everything is ok (and free is misleading). Overcommit is unfortunately necessary if I want to be able to use all my memory. Btw. http://www.redhat.com/advice/tips/meminfo.html says Committed_AS is a (gu)estimate. Hope it is a good (not to high) guesstimate. :) Regards, Vedran -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/