From owner-freebsd-questions@FreeBSD.ORG Wed Mar 8 17:53:31 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 412E516A420 for ; Wed, 8 Mar 2006 17:53:31 +0000 (GMT) (envelope-from genie@geniechka.ru) Received: from turists.ru (turists.ru [83.222.5.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id 272ED43D76 for ; Wed, 8 Mar 2006 17:53:19 +0000 (GMT) (envelope-from genie@geniechka.ru) Received: from genie (genie.yauza.ru [85.192.18.27]) (authenticated bits=0) by turists.ru (8.13.1/8.13.1) with ESMTP id k28HrHw9083433; Wed, 8 Mar 2006 20:53:17 +0300 (MSK) (envelope-from genie@geniechka.ru) X-AntiVirus: Checked by Dr.Web [version: 4.33, engine: 4.33.2.02271, virus records: 105394, updated: 8.02.2006] Message-ID: <002001c642d9$320fcab0$1b12c055@genie> From: "Eugene" To: , References: <005b01c642bb$23e007c0$1b12c055@genie> <200603081756.36597.dgw@liwest.at> Date: Wed, 8 Mar 2006 20:52:57 +0300 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="koi8-r"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Cc: Subject: Re: Strange memory problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2006 17:53:31 -0000 >> With Apache stopped, it goes down to RSS=0.5GB and VSZ=0.6G -- but >> Inactive >> Memory remains above 2.5GB. >> Is it a memory leak somewhere or what? > > That looks quite normal to me, apart from the zombie process. FreeBSD > always > attempts to occupy most of the RAM, because it's a very fast way of saving > information, and after all a lot of RAM is of no use if there's nothing in > it. So long as no other program needs it for more "important" information, > there's nothing wrong with keeping a lot of "unimportant" stuff around in > case it is needed again quickly. Ok, that's nice. However, I was concerned not so much with low Free memory as with Act+Inact being 1.5-4 times greater than size of running processes. What data is there, exactly? I don't think it has more than 1GB of unsynced disk writes? Also, a more general question: how do I estimate 'real' memory load? Sum(RSS) + 0.5*DiskCache ? For example, I would like to know (in advance) e.g. how many Apache processes we can handle before memory becomes a problem. Do you think it would be nice if top(1) could give some consolidated measure -- probably taking into account usage statistics and/or response time? Or at least two measures -- e.g. "How much memory can be allocated off-hand without any disk I/O" and "How much memory can be allocated so that swapped data would not have to be re-read again in reasonable time"? Thanks a lot Eugene